Happy?
This commit is contained in:
parent
ebb2adcc2e
commit
b244f8f08e
@ -58,9 +58,31 @@ func _process(delta):
|
|||||||
|
|
||||||
# AI STUFF
|
# AI STUFF
|
||||||
#velocity += processAI(list,delta)
|
#velocity += processAI(list,delta)
|
||||||
|
var x = 0
|
||||||
|
var y = 0
|
||||||
|
|
||||||
|
if Input.is_action_pressed("ui_left"):
|
||||||
|
# Move as long as the key/button is pressed.
|
||||||
|
x -= delta * 50
|
||||||
|
elif Input.is_action_pressed("ui_right"):
|
||||||
|
# Move as long as the key/button is pressed.
|
||||||
|
x += delta * 50
|
||||||
|
else:
|
||||||
|
velocity.x *= 0.8
|
||||||
|
if Input.is_action_pressed("ui_up"):
|
||||||
|
# Move as long as the key/button is pressed.
|
||||||
|
y -= delta * 50
|
||||||
|
elif Input.is_action_pressed("ui_down"):
|
||||||
|
# Move as long as the key/button is pressed.
|
||||||
|
y += delta * 50
|
||||||
|
else:
|
||||||
|
velocity.y *= 0.8
|
||||||
|
|
||||||
|
velocity.x += x
|
||||||
|
velocity.y += y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
velocity.x += delta * 4
|
|
||||||
velocity.y += delta * 4
|
|
||||||
|
|
||||||
if !hitanim.is_emitting():
|
if !hitanim.is_emitting():
|
||||||
anim.modulate.a = 1
|
anim.modulate.a = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user