User prompt
Change the pivot point of the meter bar to be the left of the object
User prompt
Make the meterBar of the player grow based on time
User prompt
Move the meterBar logic to be outside the if statement that checks if the player has stopped moving
User prompt
The meterBar is not scaling correctly when the player is near the deadbody
User prompt
Bug The meterBar is not shown on the screen when the player is near the deadbofy
User prompt
Bug: the meterBar is not increasing in size when the player is near a deadbody
User prompt
The meterBar gets bigger the longer the player stays near the deadbody
User prompt
Make the meterBar disappear when the player is out of range from the dead body immediately
User prompt
Set the meterBar to be 450 above player
User prompt
Set meterBar to be 400 pixels above the player
User prompt
Set the meter to be 200 pixels above the player
Code edit (2 edits merged)
Please save this source code
User prompt
There is a bug where the meter above the player is getting higher and higher each time it is parented
User prompt
There's a bug where everytime the meter is displayed, it gets higher and higher on the screen
Code edit (1 edits merged)
Please save this source code
User prompt
Set the meterBarX by negative half it's width
User prompt
Center the meter bar horizontally to the player object
User prompt
center the meter bar horizontally to the player object
User prompt
Move the meterBar to the left by 20
User prompt
Move the meterBar to the left by 20
User prompt
Move the meterBar to the right by 100
User prompt
Move the meterBar to the right of 10
User prompt
The barMeter is added to the player container when the distance between the player and the deadbody is less than 200
User prompt
Do not add the meterbar to the UI but make it a child of the player container
User prompt
There's a bug where the meterbar is not in the same position as the player
===================================================================
--- original.js
+++ change.js
@@ -24,9 +24,9 @@
var distanceToDeadBody = Math.sqrt(Math.pow(self.x - deadBody.x, 2) + Math.pow(self.y - deadBody.y, 2));
if (distanceToDeadBody < 200) {
if (!self.meterBar.parent) {
self.addChild(self.meterBar);
- self.meterBar.x = -self.meterBar.width / 2 + self.width / 2;
+ self.meterBar.x = (self.width - self.meterBar.width) / 2;
self.meterBar.y = -self.height - self.meterBar.height / 2;
}
} else if (self.meterBar.parent) {
self.meterBar.parent.removeChild(self.meterBar);
A pixel art sprite in a Super Nintendo, Super Castlevania style where it looks a little gothic/vampire hunter like Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A pixel art large background in a Super Nintendo, Super Castlevania style with an open world like cemetery, 3/4 viewpoint Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a small pile of bones
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a skeleton zombie that is haunched over
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in a SNES style that looks like something from castlevania. A ground explosion effect like something is coming out of the ground
Pixel art in SNES Castlevania style. Red goblin Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in SNES Castlevania style. Red goblin