User prompt
Hero should point towards the touch
User prompt
While holding hero should rotate following movement
User prompt
On touch for swipe bullet should appear
User prompt
Shoot bullet on swipe directio
User prompt
When touch screen bullet to be shot should appear on screen on top of hero. On release it should be shot
Code edit (1 edits merged)
Please save this source code
User prompt
when hero moves from a to b we should see the movement of the hero
User prompt
hero can only move up or down left or right
User prompt
change color of cells that hero is moving through
User prompt
if hero want to go from one cell to another it has to go through the cell in between
User prompt
delete 1 row
User prompt
add 4 more rows
User prompt
stop auto shoot
User prompt
change color of cell where hero is over
User prompt
send grid to the back
User prompt
bring hero to the front
User prompt
show hero on top
User prompt
hero starts in the center of the grid
User prompt
add one more row and column
User prompt
double grid and hero size
User prompt
hero can only move from cell to cell
User prompt
create an 8 by 8 grid
Initial prompt
Simple Shooter
===================================================================
--- original.js
+++ change.js
@@ -44,10 +44,10 @@
stage.on('move', function (obj) {
if (lastTouchPos) {
var event = obj.event;
var currentTouchPos = event.getLocalPosition(self);
- var dx = currentTouchPos.x - lastTouchPos.x;
- var dy = currentTouchPos.y - lastTouchPos.y;
+ var dx = currentTouchPos.x - hero.x;
+ var dy = currentTouchPos.y - hero.y;
var angle = Math.atan2(dy, dx);
hero.rotation = angle;
lastTouchPos = currentTouchPos;
}
Goku arms doing kamehameha. seen from above. 8-bit. Cartoon. In game asset. No shadow Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. Cartoon. Orange energy ball. . In game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
rotate image 45 degrees
8-bit. cartoon. white energy ball. gradieint. transparent. in game asset. flicker. shoot. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. cartoon. front view. flying final boss. white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.