Пример #1
0
    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;
    }
Пример #2
0
 public void TerminalHacked()
 {
     // if (OnDisable != null) OnDisable.Invoke();
     OnTerminalDisabled.Invoke();
     this.enabled = false;
     if (currentActiveTerminal == this)
     {
         currentActiveTerminal = null;
     }
 }