GameLever

class GameLever : GameSignalSender

A class that represents a lever.

  • Initialize a lever.

    Declaration

    Swift

    init(at position: CGPoint)

    Parameters

    position

    The world matrix position of the lever.

  • 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)
  • Activate the lever.

    Declaration

    Swift

    override func activate(with event: NSEvent?, player: Player?, objects: [SKSpriteNode?])

    Parameters

    event

    The event handler to listen to and track.

    player

    The player to watch and track.