class Phase::Ship
- Phase::Ship
- Phase::HealthObj
- Reference
- Object
Defined in:
phase/ship.crConstant Summary
-
BumpBackFactor =
3
-
FireDuration =
150.milliseconds
-
FireSound =
SF::SoundBuffer.from_file("./assets/pew.wav")
-
HitRadius =
64
-
Sheet =
"./assets/ship.png"
-
ShipSize =
128
-
Speed =
666
-
SuperWeaponDuration =
10.seconds
-
ThrusterSheet =
"./assets/thruster.png"
-
ThrusterSize =
64
Constructors
Class Method Summary
Instance Method Summary
- #animations : GSF::Animations
- #beam : Beam
- #cannon : Cannon
- #draw(window : SF::RenderWindow)
- #fire(mouse_rotation : Float64)
- #fire_sound : SF::Sound
- #fire_timer : Timer
- #laser : Laser | Nil
- #move_thrust(dx : Float64, dy : Float64)
- #next_super_weapon
- #play_thruster(dir : Symbol)
- #prev_super_weapon
- #pulse : Pulse
- #reset_thrusters
- #size
- #super_weapon : SuperWeapon
- #super_weapon_timer : Timer
- #super_weapons : Array(SuperWeapon)
- #thrusters : ThrusterAnimationsTuple
- #update(frame_time, keys : Keys, mouse : Mouse, objs : Array(HealthObj))
- #update_cannon(frame_time, mouse : Mouse, mouse_rotation : Float64, objs : Array(HealthObj))
- #update_firing(mouse : Mouse, mouse_rotation : Float64)
- #update_movement(frame_time, keys : Keys, objs : Array(HealthObj))
- #update_super_weapon(frame_time, keys : Keys, mouse : Mouse, mouse_rotation : Float64, objs : Array(HealthObj))
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