void Move() { Vector3 move = Vector3.zero; if (botState == SM_BotState.PlayerControl) { move = PlayerController.moveDirection; } if (move != Vector3.zero) { botAction = SM_BotAction.Move; } if (move.x != 0) { Quaternion rotation = Quaternion.LookRotation(thisTransform.TransformDirection(new Vector3(move.x, 0, 0))); thisTransform.rotation = Quaternion.RotateTowards(thisTransform.rotation, rotation, speedRotate * Time.deltaTime); if (move.z == 0) { move.z = 1; } } UpdateAnimator(move); }
void ProcessAction() { if (supportBotController != null) { supportBotController.ProcessAction(this); } else { botAction = SM_BotAction.Wait; } }
public void ChangeAction(int nextState = 0) { botAction = (SM_BotAction)nextState; }