void OnEnterField(bool step) { if (!step) { return; } if (!this.enabled) { return; } if (PlayerActor.Instance.GridPosition != GridUtil.WorldToGrid(terminalField.position)) { animator.SetBool("Active", false); if (currentActiveTerminal == this) { currentActiveTerminal = null; } return; } animator.SetBool("Active", true); currentActiveTerminal = this; }
public void TerminalHacked() { // if (OnDisable != null) OnDisable.Invoke(); OnTerminalDisabled.Invoke(); this.enabled = false; if (currentActiveTerminal == this) { currentActiveTerminal = null; } }