void OnUpdateAction() { if (currNode) { switch (currNode.nodeType) { case ATNode.Type.Goal: break; default: { if (currNode.Attack(strength * Time.deltaTime)) { currNode.gameObject.SetActive(false); currNode = null; if (currTask) { currTask.Refresh(); } } else { } } break; } } else { stateMachine.SetNextState(State.Observe); } }