I don't even know what happened

main
Luna Brovchuk 2023-10-01 17:48:45 +02:00
parent 9a3e6641b2
commit 55409a144d
4 changed files with 6 additions and 5 deletions

View File

@ -25,6 +25,7 @@ flip_h = true
use_parent_material = true use_parent_material = true
frames = ExtResource( 1 ) frames = ExtResource( 1 )
animation = "idle" animation = "idle"
frame = 3
playing = true playing = true
centered = false centered = false

View File

@ -14,7 +14,7 @@ func _physics_process(delta):
var dist = global_position.distance_to(player.global_position) var dist = global_position.distance_to(player.global_position)
if dist > 25 and dash_target == Vector2.ZERO: if dist > 25 and dash_target == Vector2.ZERO:
$Aim.visible = false $Aim.visible = false
global_position = global_position.move_toward(player.global_position, clamp(dist * delta * speed_multiplier, -2, 2)) global_position = global_position.move_toward(player.global_position, clamp(dist * delta * speed_multiplier, -1, 1))
else: else:
if dash_target == Vector2.ZERO: if dash_target == Vector2.ZERO:
var angle = global_position.angle_to_point(player.global_position) + PI var angle = global_position.angle_to_point(player.global_position) + PI

View File

@ -48,7 +48,7 @@ tracks/0/loop_wrap = true
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
tracks/0/keys = { tracks/0/keys = {
"times": PoolRealArray( 0, 2 ), "times": PoolRealArray( 0, 0.9 ),
"transitions": PoolRealArray( 1, 1 ), "transitions": PoolRealArray( 1, 1 ),
"update": 1, "update": 1,
"values": [ true, false ] "values": [ true, false ]

View File

@ -68,8 +68,8 @@ func _shoot():
bullet = bullet_preload.instance() bullet = bullet_preload.instance()
bullet.target = target bullet.target = target
get_parent().add_child(bullet) get_parent().add_child(bullet)
bullet.global_position.x = self.global_position.x + 8 bullet.global_position.x = self.global_position.x + 12
bullet.global_position.y = self.global_position.y + 8 bullet.global_position.y = self.global_position.y - 4
func _draw(): func _draw():
if target != null and is_instance_valid(target): if target != null and is_instance_valid(target):