Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
add landcape1 to the game, horizontal center, top tier
User prompt
apply currentCoinType to CoinAnimation (add necessary asset2)
User prompt
when currentCoinType == 0 set coinGraphics.alpha to 1 and coinGraphics2.alpha to 0 when currentCoinType == 1 set coinGraphics.alpha to 0 and coinGraphics2.alpha to 1
User prompt
when coinsCollected >= nextCoinTypeThreshold, set currentCoinType = 1
User prompt
add a global nextCoinTypeThreshold = 5
User prompt
add a global currentCoinType = 0
Code edit (2 edits merged)
Please save this source code
User prompt
Retire le texte de Start du bouton Start.
Code edit (1 edits merged)
Please save this source code
User prompt
Dieu a fait le contraire. Dieu a activé les pièces et les obstacles au lieu d'activer la route et le joueur.
User prompt
Tu n'as pas modifié au bon endroit. On recommence. Je te rappelle qu'il faut que le joueur et la route soient mis à jour avant que le start soit appuyé.
Code edit (1 edits merged)
Please save this source code
User prompt
Finalement, tu peux laisser l'animation de la route et du joueur avant qu'on appuie sur start
User prompt
Apparemment tu as ignoré l'animation des coins plusieurs fois avant le start alors que les obstacles bougent toujours. Corrige cela.
User prompt
Rien ne doit être animé avant qu'on appuie sur Start.
Code edit (3 edits merged)
Please save this source code
User prompt
Ajoute un gros bouton au central qui s'appelle Start Button. Et lorsqu'on appuie sur l'écran, ce bouton disparaît et IsPlaying passe à tout.
User prompt
add a global isPlaying
Code edit (3 edits merged)
Please save this source code
User prompt
En utilisant une vérification globale, empêche les obstacles de toucher les pièces.
User prompt
Essayez également de rendre les déplacements latéraux fluides.
User prompt
Remplace l'utilisation de scaleX et scaleY par les changements de largeur et de hauteur pour l'animation de l'ombre pendant le saut.
===================================================================
--- original.js
+++ change.js
@@ -7,10 +7,17 @@
var self = Container.call(this);
var coinGraphics = self.attachAsset('coin', {
//'dollarsBundle'
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ alpha: 1
});
+ var coinGraphics2 = self.attachAsset('dollarsBundle', {
+ //'dollarsBundle'
+ anchorX: 0.5,
+ anchorY: 0.5,
+ alpha: 0
+ });
var speed = 5;
var leftStartX = 1024 - 350;
var leftEndX = 1024 - 700;
var rightStartX = 1024 + 350;
@@ -20,8 +27,10 @@
var startSize = coinGraphics.width;
var endSize = coinGraphics.width * 1.5;
coinGraphics.width = startSize;
coinGraphics.height = startSize;
+ coinGraphics2.width = startSize;
+ coinGraphics2.height = startSize;
self.pathIndex = 0;
self.update = function () {
// Road should animate even if the game hasn't started
if (!isPlaying) {
@@ -29,8 +38,10 @@
}
self.progress = (self.y + 50) / (2732 + 50); // Update progress property
coinGraphics.width = startSize + (endSize - startSize) * self.progress;
coinGraphics.height = startSize + (endSize - startSize) * self.progress;
+ coinGraphics2.width = startSize + (endSize - startSize) * self.progress;
+ coinGraphics2.height = startSize + (endSize - startSize) * self.progress;
var newSpeed = currentSpeed; // + 10 * self.progress;
self.y += newSpeed;
// Move innerLineLeft x progressively to innerLeftLineEndX
if (self.pathIndex == 0 && self.x != leftEndX) {
@@ -47,8 +58,10 @@
self.y = -50;
self.progress = 0; // Initialize progress property
coinGraphics.width = startSize;
coinGraphics.height = startSize;
+ coinGraphics2.width = startSize;
+ coinGraphics2.height = startSize;
self.pathIndex = Math.floor(Math.random() * 3);
if (self.pathIndex === 0) {
self.x = leftStartX;
} else if (self.pathIndex === 2) {
@@ -472,8 +485,9 @@
* Game Code
****/
// Initialize arrays and variables
var isPlaying = false;
+var currentCoinType = 0;
var isNight = false;
var background;
var coins = [];
var obstacles = [];
Directly overhead, plumb view of a beggar heading top (we see his back).. Zenith view, directly overhead, plumb view. NOT PERSPECTIVE! Fantasy theme. Pixel art
a traffic cone. video game sprite
face view of a big start button in the shape of a dollar bill. video game style
a tree. video game style
a black garbage bag. video game style
Dollar bill. Perspective. video game sprite
perspective of a simple snake rolled up on itself.. video game sprite
Ball of dry desert bushes. video game sprite
tractor. high definition video game sprite
street ad billboard with 1 or 2 posts with "Get rich!" on it. high definition video game sprite
a dog sleeping on a street. video game sprite
desert bush. video game sprite
profile view of an empty motorcycle helmet. black with a white vertical central band and another thiner orange band on the center. NOT PERSPECTIVE!. Pixel art high definition
simple red and white magnet. video game style
gold sign with a "X" and a "2". video game style
bgMusic
Music
coin_1
Sound effect
hit_1
Sound effect
hit_2
Sound effect
hit_3
Sound effect
levelWin_1
Sound effect
car_1
Sound effect
police_1
Sound effect
ambulance_1
Sound effect
accident_1
Sound effect
killed_1
Sound effect
jump_1
Sound effect
rip_1
Sound effect
bonus_take
Sound effect
bonus_approaching
Sound effect