Fixed enemy shader
This commit is contained in:
@@ -9,7 +9,7 @@ func init() -> void:
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_CHASE_LEFT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_CHASE_LEFT)
|
||||
|
||||
|
||||
func _is_target_reached() -> bool:
|
||||
|
||||
@@ -9,7 +9,7 @@ func init() -> void:
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_CHASE_RIGHT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_CHASE_RIGHT)
|
||||
|
||||
|
||||
func _is_target_reached() -> bool:
|
||||
|
||||
@@ -4,4 +4,4 @@ extends CultistJumpState
|
||||
func enter() -> void:
|
||||
super.enter()
|
||||
_direction = DIRECTION_LEFT
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_JUMP_LEFT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_JUMP_LEFT)
|
||||
|
||||
@@ -4,4 +4,4 @@ extends CultistJumpState
|
||||
func enter() -> void:
|
||||
super.enter()
|
||||
_direction = DIRECTION_RIGHT
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_JUMP_RIGHT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_JUMP_RIGHT)
|
||||
|
||||
@@ -2,4 +2,4 @@ extends CultistFallSidewaysState
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_FALL_LEFT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_FALL_LEFT)
|
||||
|
||||
@@ -2,4 +2,4 @@ extends CultistFallSidewaysState
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_FALL_RIGHT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_FALL_RIGHT)
|
||||
|
||||
@@ -6,7 +6,7 @@ extends CultistState
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_FALL)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_FALL)
|
||||
|
||||
|
||||
func physics_process(delta: float) -> void:
|
||||
|
||||
@@ -12,8 +12,8 @@ var state_by_ray_cast : Dictionary[RayCast2D, CultistState]
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.animation_finished.connect(_on_animation_finished)
|
||||
cultist.sprite.play(CultistSprite.LOOK_AROUND_ANIMATIONS.pick_random())
|
||||
cultist.animated_sprite.animation_finished.connect(_on_animation_finished)
|
||||
cultist.animated_sprite.play(CultistSprite.LOOK_AROUND_ANIMATIONS.pick_random())
|
||||
cultist.velocity = Vector2.ZERO
|
||||
cultist._set_ray_cast_enable(cultist.left_player_close_ray, true)
|
||||
cultist._set_ray_cast_enable(cultist.right_player_close_ray, true)
|
||||
@@ -36,7 +36,7 @@ func physics_process(_delta: float) -> void:
|
||||
|
||||
|
||||
func exit() -> void:
|
||||
cultist.sprite.animation_finished.disconnect(_on_animation_finished)
|
||||
cultist.animated_sprite.animation_finished.disconnect(_on_animation_finished)
|
||||
cultist._set_ray_cast_enable(cultist.left_player_close_ray, false)
|
||||
cultist._set_ray_cast_enable(cultist.right_player_close_ray, false)
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@ func init() -> void:
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_WALK_LEFT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_WALK_LEFT)
|
||||
|
||||
@@ -9,4 +9,4 @@ func init() -> void:
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
cultist.sprite.play(CultistSprite.ANIMATION_WALK_RIGHT)
|
||||
cultist.animated_sprite.play(CultistSprite.ANIMATION_WALK_RIGHT)
|
||||
|
||||
Reference in New Issue
Block a user