class Phase::EnemyGroup

Defined in:

phase/enemy_group.cr

Constant Summary

FacingRotationThreshold = 0.1_f32
RotationSpeed = 100
TargetDistanceThreshold = 500
TargetMoveSpeed = 300

Constructors

Instance Method Summary

Constructor Detail

def self.new(star_bases : Array(Phase::StarBase), enemies : Array(Phase::EnemyShip) = [] of EnemyShip) #

[View source]

Instance Method Detail

def distance(obj : HealthObj) #

[View source]
def enemies : Array(EnemyShip) #

[View source]
def facing?(target_rotation) #

[View source]
def mid_x #

[View source]
def mid_y #

[View source]
def move_forward(speed, objs : Array(HealthObj)) #

[View source]
def move_to_target(frame_time, objs : Array(HealthObj)) #

[View source]
def rotate(amount) #

[View source]
def rotate_to_target(frame_time) #

[View source]
def rotate_towards(target_rotation, rotation_speed) #

[View source]
def rotation : Float32 #

[View source]
def rotation_to(obj : HealthObj) #

[View source]
def star_base_target #

[View source]
def star_bases : Array(StarBase) #

[View source]
def update(frame_time, objs : Array(HealthObj)) #

[View source]
def update_movement(frame_time, objs : Array(HealthObj)) #

[View source]
def x #

[View source]
def y #

[View source]