DoorReceiver

public class DoorReceiver : GameStructureObject, GameSignalReceivable

A class that represents a door. This is commonly used for exit doors, but can be adapted to use any door.

STORED PROPERTIES

  • Whether the door is on by default.

    Declaration

    Swift

    var defaultOn: Bool
  • The method of how this door will be activated.

    Declaration

    Swift

    var activationMethod: GameSignalMethod
  • The list of inputs that activate the door.

    Declaration

    Swift

    var inputs: [GameSignalSender] { get set }
  • The base texture name for the door.

    Declaration

    Swift

    var baseTextureName: String
  • The player listener for this door.

    Declaration

    Swift

    var playerListener: Player?

COMPUTED PROPERTIES

  • The activation-based texture for this door.

    Declaration

    Swift

    var activeTexture: SKTexture { get }
  • Whether the door is activated.

    Declaration

    Swift

    var active: Bool { get }
  • The description for this class.

    Declaration

    Swift

    public override var description: String { get }

CONSTRUCTORS

METHODS

  • Receive input from a player or event.

    Declaration

    Swift

    func receive(with player: Player?, event: NSEvent?, handler: ((Any?) -> Void))
  • Update the texture for this door.

    Declaration

    Swift

    func update()
  • Update the list of inputs and their receivers.

    Declaration

    Swift

    func updateInputs()
  • Toggle the physics body for the door.

    Note

    This method should apply for all doors that are not exits.

    Declaration

    Swift

    func togglePhysicsBody()