class

Escapist::LaserSwitch

Inherits Escapist::Switch < Escapist::TileObj < JSON::Serializable < Reference < Object

Constants

Color = SF::Color.new(153, 153, 153, 30)
Key = "laser"
OffColor = SF::Color.new(51, 51, 51, 51)
OffOutlineColor = SF::Color.new(102, 102, 102)
OnColor = SF::Color.new(153, 0, 0, 153)
OnOutlineColor = SF::Color.new(0, 102, 0, 50)
OnSound = SF::Sound.new(OnSoundBuffer)
OnSoundBuffer = SF::SoundBuffer.from_file("./assets/floor_switch_on.wav")
OnSoundPitchVariation = 0.03
OnSoundVolume = 33
OutlineColor = SF::Color.new(102, 102, 102)
OutlineThickness = 4

Constructors

new(col = 0, row = 0, on = false)
Source

Class methods

Instance methods

center_x
Source
center_y
Source
collidable?
Source
draw(window : SF::RenderWindow)
Source
draw_block(window)
Source
draw_switch_circle(window)
Source
laser_point_collision?(x, y)
Source
radius
Source
update(room)
Source
update_on_off(lasers)
Source