public void Activate() { if (this.hasActivated && this.isSingleActivation) { // Can only activate this switch once return; } this.currentState = this.currentState == BlockSwitchState.Off ? BlockSwitchState.On : BlockSwitchState.Off; this.hasActivated = true; this.wasJustActivated = true; }
public void Reset() { this.currentState = startState; this.hasActivated = false; }