Code edit (1 edits merged)
Please save this source code
User prompt
move the player lower on the screen
User prompt
contain the player_up and player_down into a single class called the Player. all code related to the player should be centralized in this class. also give it it's own x and y coordinates for easi manipulation, so all frames inside can be moved around using these coordinates on the screen
Code edit (1 edits merged)
Please save this source code
User prompt
move the player_down asset 100 pixels to the left
Code edit (1 edits merged)
Please save this source code
User prompt
instead of aligning the player states relative to the center of the assets, anchor them to the bottom part of the asset
User prompt
the tapping doesn't work. taps should move from one frame to the other. start with Player Up and when tapping go to Player_Down. tapping basically alternates between these 2 states
User prompt
add a second frame to the Player_up, which is called Player_Down. on each Tap on the screen, alternate between these 2 frames
User prompt
Add the Player_Up in the center of the screen, and give it x and y coordinates. also place it in the midground container
User prompt
create a BackgroundContainer, MidgroundContainer and ForegroundContainer in that order
User prompt
delete the poop and toiler assets from the code
Initial prompt
Butt on the toilet
===================================================================
--- original.js
+++ change.js
@@ -19,24 +19,24 @@
// Create Player class
var Player = Container.expand(function () {
var self = Container.call(this);
// Attach Player_Up asset to the player
- var playerUp = self.attachAsset('Player_Up', {
+ self.playerUp = self.attachAsset('Player_Up', {
anchorX: 0.5,
anchorY: 1.0
});
// Attach Player_Down asset to the player
- var playerDown = self.attachAsset('Player_Down', {
+ self.playerDown = self.attachAsset('Player_Down', {
anchorX: 0.5,
anchorY: 1.0,
x: -80
});
// Initially, Player_Down is not visible
- playerDown.visible = false;
+ self.playerDown.visible = false;
// Method to switch between Player_Up and Player_Down
self.switchFrame = function () {
- playerUp.visible = !playerUp.visible;
- playerDown.visible = !playerDown.visible;
+ self.playerUp.visible = !self.playerUp.visible;
+ self.playerDown.visible = !self.playerDown.visible;
};
return self;
});
hamburger. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
poop UI element . pixelated. 8 bit.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "Constipated" against a poop banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "You’re on a roll!" against a toilet paper banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "Holy Crap!" against a divine angelic poop banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelated text saying "Shit Yeah!" as a shitty newspaper headline. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
macdonalds fries but with the M letter rotated so it looks like a 3. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
large KFC bucket with the digit 5 on it. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit pixelated image of a video game character sitting with hands on a large belly, wearing a white shirt and brown pants. The setting is a simple bathroom, with the character as the main focus. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.