private void TriggerAnimation(RobotActionType type) { switch (type) { case RobotActionType.Jump: { m_animator.SetTrigger("Jump"); } break; case RobotActionType.StaggerLeft: case RobotActionType.StepLeft: { m_animator.SetTrigger("StepLeft"); } break; case RobotActionType.StaggerRight: case RobotActionType.StepRight: { m_animator.SetTrigger("StepRight"); } break; case RobotActionType.Win: m_animator.SetTrigger("Win"); break; case RobotActionType.Lose: m_animator.SetTrigger("Lose"); break; default: break; // If its another animation, don't do anything. } }
private void TriggerAnimation(RobotActionType type) { switch (type) { case RobotActionType.Jump: { m_animator.SetTrigger("Jump"); } break; case RobotActionType.StaggerLeft: case RobotActionType.StepLeft: { m_animator.SetTrigger("StepLeft"); } break; case RobotActionType.StaggerRight: case RobotActionType.StepRight: { m_animator.SetTrigger("StepRight"); } break; case RobotActionType.Win: m_animator.SetTrigger("Win"); break; case RobotActionType.Lose: m_animator.SetTrigger("Lose"); break; default:break; // If its another animation, don't do anything. } }
/// <summary> /// Create a instruction /// </summary> /// <param name="actionType">the actionType</param> /// <param name="action">the action</param> /// <returns>the created instruction</returns> private Instruction <RobotAction> CreateInstruction(RobotActionType actionType, RobotAction action) { var instruction = new Instruction <RobotAction>(); instruction.ActionType = actionType; instruction.Parameters = action; return(instruction); }
public RobotAction(float time, RobotActionType type) { timeRemaining = time; timeLength = time; actionType = type; }
public RobotAction(RobotActionType Type, object P1, object P2, object P3) { this.Type = Type; this.P1 = P1; this.P2 = P2; this.P3 = P3; Status = RobotActionStatus.NotStart; }
/// <summary> /// creates a new instance of <see cref="Instruction"/> /// </summary> /// <param name="actionType"></param> /// <param name="parameters"></param> public Instruction(RobotActionType actionType, T parameters) { this.ActionType = actionType; this.Parameters = parameters; }