예제 #1
0
        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.
            }
        }
예제 #3
0
        /// <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);
        }
예제 #4
0
 public RobotAction(float time, RobotActionType type)
 {
     timeRemaining = time;
     timeLength = time;
     actionType = type;
 }
예제 #5
0
파일: BU_Robot.cs 프로젝트: eijix/test
 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;
 }
예제 #6
0
 /// <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;
 }
예제 #7
0
 public RobotAction(float time, RobotActionType type)
 {
     timeRemaining = time;
     timeLength    = time;
     actionType    = type;
 }