User prompt
Dans photoframe, utilisez les variables globales xmin, xmax, ymin et ymax.
User prompt
Add three other frame borders to make a rectangle in the photo frame
User prompt
Rename FrameGraphics to FrameBorder
User prompt
Add a new class named PhotoFrame.
User prompt
In the result state, show the target again at the target shot positions
User prompt
Changez le background à un bleu pastel.
User prompt
clean playing state before passing to result state
User prompt
After the target finished passing, switch to result state.
User prompt
In InitNewRoundState, set the background visibility to true
User prompt
In clean playing state, set the background visibility to false.
Code edit (1 edits merged)
Please save this source code
User prompt
Let target go totally out of screen before destroying it.
Code edit (1 edits merged)
Please save this source code
User prompt
target y should be between yMin and yMax
User prompt
place the debugmarker at xMin, yMin
User prompt
set the limits to be the same as the Hud corners ones
User prompt
create 4 global variables to store the photo limits : xMin, xMax, yMin, yMax
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: target is not defined' in or related to this line: 'target.update();' Line Number: 307
Code edit (1 edits merged)
Please save this source code
User prompt
reduce scale of circle3 to 0.85
User prompt
reduce scale of circle2 to 0.9
User prompt
change the tint of circle2 to black
User prompt
rename shotButtonGraphics to circle1 in shot button and add 2 other circles
User prompt
remove the isRoundActive
/**** * Classes ****/ var CameraHUD = Container.expand(function () { var self = Container.call(this); function createCorner(x, y, rotation) { var corner = new Container(); var line1 = LK.getAsset('line', { width: 100, height: 20, anchorX: 0, anchorY: 0 }); var line2 = LK.getAsset('line', { width: 100, height: 20, anchorX: 0, anchorY: 0 }); line2.rotation = Math.PI / 2; line1.alpha = 0.5; line2.alpha = 0.5; corner.addChild(line1); corner.addChild(line2); corner.x = x; corner.y = y; corner.rotation = rotation; return corner; } var topLeft = createCorner(256, 700, 0); var topRight = createCorner(2048 - 256, 700, Math.PI / 2); var bottomLeft = createCorner(256, 2732 - 700, -Math.PI / 2); var bottomRight = createCorner(2048 - 256, 2732 - 700, Math.PI); self.addChild(topLeft); self.addChild(topRight); self.addChild(bottomLeft); self.addChild(bottomRight); }); //<Assets used in the game will automatically appear here> // Class for the moving target var MovingTarget = Container.expand(function () { var self = Container.call(this); var targetGraphics = self.attachAsset('target', { anchorX: 0.5, anchorY: 0.5 }); self.speedX = 3; self.update = function () { self.x += self.speedX; if (self.x > 2048) { self.destroy(); } }; }); // Class for the shot button var ShotButton = Container.expand(function () { var self = Container.call(this); var circle1 = self.attachAsset('shotButton', { anchorX: 0.5, anchorY: 0.5 }); var circle2 = self.attachAsset('shotButton', { anchorX: 0.5, anchorY: 0.5, tint: 0x000000 }); var circle3 = self.attachAsset('shotButton', { anchorX: 0.5, anchorY: 0.5 }); }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ var background = LK.getAsset('background', { anchorX: 0, anchorY: 0, x: 0, y: 0 }); game.addChild(background); var cameraHUD = new CameraHUD(); game.addChild(cameraHUD); // Initialize variables var score = 0; var scoreTxt = new Text2('Score: 0', { size: 100, fill: "#ffffff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var target = new MovingTarget(); target.x = -target.width; // Spawn out of the screen on the left target.y = Math.random() * 2732; // Random vertical position game.addChild(target); var shotButton = new ShotButton(); shotButton.x = 1024; shotButton.y = 2500; game.addChild(shotButton); game.down = function (x, y, obj) { // Add a black flash effect LK.effects.flashScreen(0x000000, 600); // Flash duration of 600ms LK.setTimeout(function () { target = new MovingTarget(); target.x = -target.width; // Spawn out of the screen on the left target.y = Math.random() * 2732; // Random vertical position game.addChild(target); }, Math.random() * 2000 + 1000); // Random delay between 1 to 3 seconds }; game.update = function () { target.update(); };
===================================================================
--- original.js
+++ change.js
@@ -60,9 +60,10 @@
anchorY: 0.5
});
var circle2 = self.attachAsset('shotButton', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ tint: 0x000000
});
var circle3 = self.attachAsset('shotButton', {
anchorX: 0.5,
anchorY: 0.5
a forest.
flying Red-bellied Woodpecker.
flying Yellow-headed Blackbird.
flying Painted Bunting.
Underwater. only water and corals. NO animals
Countryside. 1 flower in foreground.
A Butterfly flying.
a fish swimming.
full dragonfly flying to the right.
full drone flying to the right.
a full hot air balloon with a basket flying to the right.
roofs of an empty modern city. day light
a satellite.
stary dark space. NO OBJECTS
a multitude of polaroids in bulk, with photos of birds, fishes, butterflies, planes, hot air baloons, satelites, dragonflies.....
A flying owl.
A flying parrot.
hippocampe.
shark. lateral view
diodon hystrix swimming. lateral view
fighting fish swimming. lateral view
a hang glider flying. full lateral view
un cerf-volant multicolore.
une coccinelle volante.
un scarabée vert irisé volant. side view
une gueppe volante. side view
un astronaute volant. full side view
une navette spaciale volante. full side view
un astéroïde volant dans l'espace. full side view
remove