GameAlarmClock
class GameAlarmClock : GameSignalSender
A class representation of an alarm clock (timer).
-
Initialze an alarm clock.
Declaration
Swift
init(with delay: Double = 3.0, at position: CGPoint)
Parameters
delay
The number of seconds it takes for the alarm clock to turn off.
position
The world matrix position of the alarm clock.
-
Trigger the alarm sound and continously play the tick sound.
Declaration
Swift
override func onActivate(with event: NSEvent?, player: Player?)
-
Play the alarm when deactivated.
Declaration
Swift
override func onDeactivate(with event: NSEvent?, player: Player?)
-
Required initializer for this class. Will result in a fatal error if you initialize the object this way.
Declaration
Swift
required init?(coder aDecoder: NSCoder)