@Sparrow said:
nice one 44pes, just did my voting.
nice vector art. how did you do the circle and arrow aiming?
would you be happy to point me to a tutorial or supply to code for it?
The code ended up being a mess so I better explain how I did it.
The circle and arrow are two images that belong to the Player and their rotation centers are in the center of the Player node
Circle = $punto_mira/circulo
Arrow = $punto_mira/flecha
The code to make the arrow follow the mouse is:
func _physics_process(delta):
$punto_mira/flecha.look_at(get_global_mouse_position())
and when you shoot a "Tween" that modifies the size is executed:
tween.interpolate_method($punto_mira/punto, "set_scale", Vector2(0.5, 0.5), Vector2(0.4, 0.4), 0.25,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
tween.interpolate_method($punto_mira/punto, "set_scale", Vector2(0.4, 0.4), Vector2(0.5, 0.5), 0.25,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT,0.25)
The 1st tween part of the initial scale (0.5,0,5) and shrinks it
and the second (which has a delay of 0.25s) returns it to its normal size
That's all XD