GameComputer

class GameComputer : GameSignalSender

A class representation of a computer.

  • Initialize a computer.

    Declaration

    Swift

    init(at position: CGPoint, with softwareLock: Bool)

    Parameters

    position

    The world matrix position of the computer.

    softwareLock

    Whether the computer is software locked (T1) or hardware locked (T2).

  • 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 computer.

    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.