class Phase::EnemyCarrier
- Phase::EnemyCarrier
- Phase::Enemy
- Phase::HealthObj
- Reference
- Object
Defined in:
phase/enemy_carrier.crConstant Summary
-
CloseRotationSpeed =
133
-
DropOffDistanceThreshold =
3
-
DropOffWaitDuration =
3.seconds
-
FastRotateDistanceThreshold =
750
-
HitRadius =
128
-
MaxGroupSize =
6
-
MaxHealth =
1500
-
MaxMidDistance =
128
-
MaxNewDropOffDistance =
500
-
MinGroupSize =
2
-
MinNewDropOffDistance =
300
-
MoveSpeed =
300
-
RotationSpeed =
33
-
carrier drop off
-
ScoreValue =
50
-
Sheet =
"./assets/carrier.png"
-
SpriteHeight =
256
-
SpriteWidth =
384
Constructors
Class Method Summary
Instance Method Summary
- #bump(dx, dy, bumped_by, objs)
- #drop_off_enemies
- #drop_off_target_rotation
- #drop_off_targets : Array(NamedTuple(x: Int32, y: Int32))
- #drop_off_timer : Timer
- #enemy_group : EnemyGroup | Nil
- #finish_drop_off
- #initial_x : Float64
- #move_forward(speed, objs : Array(HealthObj))
- #new_target
- #next_dropoff
- #rotate_to_target(rotation_speed)
- #star_bases : Array(StarBase)
- #target_x : Float64
- #target_y : Float64
- #update(frame_time, objs : Array(HealthObj))
Instance methods inherited from class Phase::Enemy
animations : GSF::Animations
animations,
draw(window : SF::RenderWindow)
draw,
facing?(target_rotation)
facing?,
move_forward(speed, objs : Array(HealthObj))
move_forward,
rotate(amount)
rotate,
rotate_towards(target_rotation, rotation_speed)
rotate_towards,
rotation : Float32
rotation,
score_value
score_value,
sheet
sheet,
sprite_height
sprite_height,
sprite_width
sprite_width,
update(frame_time, objs : Array(HealthObj))
update
Constructor methods inherited from class Phase::Enemy
new(x = 0, y = 0, rotation : Float32 = 0)
new
Class methods inherited from class Phase::Enemy
hit_radius
hit_radius,
score_value
score_value,
sheet
sheet,
sprite_height
sprite_height,
sprite_width
sprite_width
Instance methods inherited from class Phase::HealthObj
bump(dx, dy, bumped_by, objs)
bump,
bumped? : Bool
bumped?,
collision_damage
collision_damage,
distance(cx, cy, radius = 0)distance(obj : HealthObj) distance, draw(window : SF::RenderWindow) draw, draw_hit_circle(window : SF::RenderWindow) draw_hit_circle, health : Int32 health, health_color health_color, hit(damage : Int32) hit, hit?(circle : Circle)
hit? : Bool hit?, hit_circle hit_circle, hit_radius hit_radius, hit_sound : SF::Sound hit_sound, max_health max_health, move(dx : Float64, dy : Float64) move, remove? : Bool remove?, reset_hit_bumped reset_hit_bumped, rotation_from(other_x, other_y)
rotation_from(obj : HealthObj) rotation_from, rotation_to(other_x, other_y)
rotation_to(obj : HealthObj) rotation_to, static? static?, unhit_color unhit_color, update(frame_time, objs : Array(HealthObj)) update, x : Float64 x, y : Float64 y
Constructor methods inherited from class Phase::HealthObj
new(x : Float64 = 0, y : Float64 = 0)
new
Class methods inherited from class Phase::HealthObj
collision_damage
collision_damage,
hit_radius
hit_radius,
max_health
max_health,
unhit_color
unhit_color
Constructor Detail
def self.new(x : Float64, y, star_bases : Array(Phase::StarBase), drop_off_targets : Array(NamedTuple(x: Int32, y: Int32)))
#