Skip to content

Commit

Permalink
Merge pull request #16 from Choco02/master
Browse files Browse the repository at this point in the history
Arqueiro agora tem pequena animacao basica e simples
  • Loading branch information
LordCthulhu123 committed Jan 22, 2019
2 parents 84ce5f4 + bf31c8b commit cb8407f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion animations/arqueiro_shooting.tres
Expand Up @@ -3,7 +3,7 @@
[resource]

resource_name = "arqueiro_shooting"
length = 0.6
length = 1.0
loop = true
step = 0.1
tracks/0/type = "value"
Expand Down
2 changes: 1 addition & 1 deletion scenes/inimigo_arqueiro.tscn
Expand Up @@ -31,7 +31,7 @@ shape = SubResource( 1 )
texture = ExtResource( 2 )
vframes = 2
hframes = 4
frame = 1
frame = 6
_sections_unfolded = [ "Animation" ]
__meta__ = {
"_edit_lock_": true
Expand Down
4 changes: 4 additions & 0 deletions scripts/inimigo_arqueiro.gd
Expand Up @@ -39,6 +39,10 @@ func atirar():

var angulo = PI / 4
var direcao_tiro = Vector2( dire * cos(angulo), - sin(angulo))
if get_node("anim").current_animation == "arqueiro_shooting":
get_node("anim").play("arqueiro_idle")
else:
get_node("anim").play("arqueiro_shooting")
var tiro = tiros.instance()


Expand Down

0 comments on commit cb8407f

Please sign in to comment.