Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Commit

Permalink
Fix chameleon movement with controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 28, 2021
1 parent 8f0e838 commit f416c2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions Enteties/Chameleon/Chameleon.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@

[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 9 ) ],
"loop": true,
"name": "Walk_evolved",
"speed": 6.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "Walk",
"speed": 6.0
}, {
"frames": [ ExtResource( 10 ) ],
"loop": false,
"name": "Jump",
Expand All @@ -33,16 +43,6 @@ animations = [ {
"name": "Jump_evolved",
"speed": 1.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 9 ) ],
"loop": true,
"name": "Walk_evolved",
"speed": 6.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "Walk",
"speed": 6.0
}, {
"frames": [ ExtResource( 4 ) ],
"loop": false,
"name": "Idle",
Expand Down
2 changes: 1 addition & 1 deletion Enteties/Chameleon/chameleon.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func _on_evolving():
evolve_anim = "_evolved"

func horizontal_move(direction: int):
sprite.flip_h = direction == 1
sprite.flip_h = direction > 0
sprite.play("Walk" + evolve_anim)

camo.disable()
Expand Down

0 comments on commit f416c2b

Please sign in to comment.