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(pull : JSON::PullParser)
Sourcenew(col = 0, row = 0, on = false)
SourceClass methods
key
SourceInstance methods
center_x
Sourcecenter_y
Sourcecollidable?
Sourcedraw(window : SF::RenderWindow)
Sourcedraw_block(window)
Sourcedraw_switch_circle(window)
Sourcelaser_point_collision?(x, y)
Sourceradius
Sourceupdate(room)
Sourceupdate_on_off(lasers)
Source