Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
attach a rangeIndicator asset to the frog class, tinted red and with 0.2 opacity
Code edit (12 edits merged)
Please save this source code
User prompt
rename `highlightRange` asset to `rangeIndicator`
Code edit (1 edits merged)
Please save this source code
User prompt
Create a new, empty class called ShiftContainer that inherits from the ConfigContainer. All `new Container()`s that were added to the camera should call `new ShiftContainer()` instead
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -36,8 +36,12 @@
}
};
return self;
});
+var ShiftContainer = ConfigContainer.expand(function (config) {
+ var self = ConfigContainer.call(this, config);
+ return self;
+});
var Pickup = ConfigContainer.expand(function (config) {
var self = ConfigContainer.call(this, config);
config = config || {};
var collectable = self.attachAsset('collectable', {
@@ -712,14 +716,14 @@
x: GAME_WIDTH / 2,
y: GAME_HEIGHT
}));
// Camera containers
-var foregroundContainer = camera.addChild(new Container());
-var hookContainer = camera.addChild(new Container());
-var lilypadContainer = camera.addChild(new Container());
-var pickupContainer = camera.addChild(new Container());
-var forefrontContainer = camera.addChild(new Container());
-var grassContainer = camera.addChild(new Container());
+var foregroundContainer = camera.addChild(new ShiftContainer());
+var hookContainer = camera.addChild(new ShiftContainer());
+var lilypadContainer = camera.addChild(new ShiftContainer());
+var pickupContainer = camera.addChild(new ShiftContainer());
+var forefrontContainer = camera.addChild(new ShiftContainer());
+var grassContainer = camera.addChild(new ShiftContainer());
// Foreground instances
var shadowground = foregroundContainer.addChild(new Foreground({
x: PLAYER_START_X + SHADOWGROUND_OFFSET_X,
y: SHADOWGROUND_OFFSET_Y,
fireCrackle
Sound effect
frogTongue
Sound effect
frogDeath
Sound effect
lilypadBounce
Sound effect
noTarget
Sound effect
backgroundAmbient
Sound effect
fireCrackling1
Sound effect
fireCrackling2
Sound effect
fireCrackling3
Sound effect
fireCrackling4
Sound effect
frogBounce
Sound effect
pickupCaught
Sound effect