Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
crystal_game_jam
main
Top Level Namespace
Actor
BigEnemy
Boss
Enemy
Player
Projectile
Scene
TinyEnemy
WorldClock
Built with Crystal 1.9.2
2023-10-07 20:24:13 UTC
class
Enemy
Enemy
Actor
Reference
Object
Direct Known Subclasses
BigEnemy
Boss
TinyEnemy
Defined in:
game/enemy.cr
Instance Method Summary
#move
(player_position : SF::Vector2f)
Move towards player
Instance methods inherited from class
Actor
alive?
alive?
,
animation_facing(direction)
animation_facing
,
animation_rect(rect, i) : SF::IntRect
animation_rect
,
animation_reset(direction)
animation_reset
,
animation_step
animation_step
,
apply_speed(direction : SF::Vector2f)
apply_speed
,
collides?(other)
collides?
,
dead?
dead?
,
draw(target, states)
draw
,
global_bounds
global_bounds
,
hit
hit
,
move(direction : SF::Vector2f)
move
,
next_animation_step
next_animation_step
,
normalize_movement(direction : SF::Vector2f)
normalize_movement
,
position : SF::Vector2(Float32)
position
,
position=(position : SF::Vector2(Float32))
position=
,
update(time)
update
Constructor methods inherited from class
Actor
new(position : SF::Vector2f)
new
Instance Method Detail
def
move
(player_position : SF::Vector2f)
#
Move towards player
[
View source
]