add iamond
This commit is contained in:
parent
10655aed3a
commit
f4dc1a79fd
15 changed files with 330 additions and 10 deletions
18
player-iamond.gd
Normal file
18
player-iamond.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
extends "res://player.gd"
|
||||
|
||||
func _ready():
|
||||
speed = 1200
|
||||
update_animation()
|
||||
if config.load("user://settings.cfg") == OK:
|
||||
absolute_movement = not config.get_value("config", "relative_controls")
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("jump"):
|
||||
$Sprite.speed_scale = 1
|
||||
$Sprite.play("jump")
|
||||
await $Sprite.animation_finished
|
||||
global_position = get_global_mouse_position()
|
||||
$Sprite.speed_scale = -1
|
||||
$Sprite.play("jump")
|
||||
await $Sprite.animation_finished
|
||||
$Sprite.play("idle")
|
Loading…
Add table
Add a link
Reference in a new issue