feat: 1. 添加charge冲锋敌人动画和攻击脚本
2. 添加shoot射击敌人攻击脚本
This commit is contained in:
@@ -43,12 +43,17 @@ func get_move_direction() -> Vector2:
|
||||
return direction
|
||||
|
||||
func update_rotate() -> void:
|
||||
if is_instance_valid(Global.player):
|
||||
|
||||
print("11111111")
|
||||
|
||||
if !is_instance_valid(Global.player):
|
||||
return
|
||||
|
||||
var player_pos := Global.player.position
|
||||
|
||||
var moving_right := global_position.x < player_pos.x
|
||||
|
||||
print(moving_right, '111111')
|
||||
visuals.scale = Vector2(-0.5,0.5) if moving_right else Vector2(0.5,0.5)
|
||||
|
||||
func can_move_forwards_player() -> bool:
|
||||
|
||||
Reference in New Issue
Block a user