public void MoveToCretureRoom(CreatureModel target) { movableNode.MoveToNode(target.GetWorkspaceNode()); }
private void ProcessAction() { if (currentPanicAction != null) { if (state != AgentCmdState.PANIC_SUPPRESS_TARGET) { currentPanicAction.Execute(); } } else if (state == AgentCmdState.IDLE) { if (waitTimer <= 0) { movableNode.MoveToNode(MapGraph.instance.GetSepiraNodeByRandom(currentSefira)); waitTimer = 1.5f + Random.value; } } else if (state == AgentCmdState.WORKING) { if (movableNode.GetCurrentEdge() == null && movableNode.GetCurrentNode() != target.GetWorkspaceNode()) { MoveToCretureRoom(target); } } else if (state == AgentCmdState.SUPPRESS_WORKING) { if (!movableNode.CheckInRange(targetAgent.movableNode) && waitTimer <= 0) { movableNode.MoveToMovableNode(targetAgent.movableNode); waitTimer = 1.5f + Random.value; } } else if (state == AgentCmdState.DEAD) { } waitTimer -= Time.deltaTime; }