User prompt
Init cached alpha with value 3
User prompt
Set particle alpha to min rather than max
User prompt
Use a separate property on particle to cache current alpha. Set this to 3. Subtract alpha delta from this one on each move and set particle alpha to max of 1 or this value
User prompt
Don’t have speed x and speed y in particle. Have a single speed value that is used to dynamically calculate speed x and y during each move
User prompt
Calculate speed x and y for each tick in particle instead of pre creating these values
User prompt
I think the delta y calculation for particles is on reverse
User prompt
Calculate the delta between foreground y and forest layer y and subtract that from particle y when spawning a particle
User prompt
When spawning particles attach them to forest layer rather than foreground
User prompt
Attach particles to forest layer
User prompt
Increase initial particle speed by 3x but slow down particles for each tick
User prompt
In particle assume 20 particles not 10
User prompt
Use a fixed speed for particles
User prompt
Use index to determine angle in particles
User prompt
Spawn 20 particles when you collect a bell
User prompt
In particle accept array index in constructor method
User prompt
When creation a particle pass along the array index
User prompt
Remember to add particles to the areay
User prompt
Keep track off and tick particles
User prompt
Only spawn particles when a bell is hit
User prompt
Remove hit from bells and move code that spawns particles to game class
User prompt
Add particles to the game. Spawn particles when you hit a bell. Particles should be spawned at the location of the bell and fly away in a perfect circle
User prompt
As game progresses slowly increase bell speed
User prompt
Decrease bell speed change when hitting a bell to 25
User prompt
Decrease bell speed change when hitting a bell to 20
User prompt
For bell speed use parent.parent
===================================================================
--- original.js
+++ change.js
@@ -10,9 +10,9 @@
self.move = function () {
self.fixedSpeed *= 0.98;
self.x += Math.cos(self.angle) * self.fixedSpeed;
self.y += Math.sin(self.angle) * self.fixedSpeed;
- self.cachedAlpha = (self.cachedAlpha || 1) - 0.02;
+ self.cachedAlpha = (self.cachedAlpha || 3) - 0.02;
self.alpha = Math.max(0, self.cachedAlpha);
if (self.cachedAlpha <= 0) self.destroy();
};
});
Tree line of snowy pine trees. Cartoon. Black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Mountain valley with snowy trees. Scenic view. Nighttime. Cartoon. Black background. New moon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Background mountains, nighttime, snow topped Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d platform snowy ground. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cute cartoon rabbit, jumping upwards facing camera. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Starry night sky, northern lights, looking up. Cartoon style. Above clouds Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single White Christmas bell. White decorations. Cartoon. Outline Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White Simple Cartoon snowflake Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.