示例#1
0
 private void Start()
 {
     Crashing    = GetComponent <MP_Crash>();
     GroundCon   = GetComponent <MP_GroundControl>();
     BoostScript = GetComponent <MP_Boost_Accel>();
     ACon        = GetComponent <MP_AirControl>();
     RCon        = GetComponent <MP_RampCon>();
 }
示例#2
0
    private void Start()
    {
        //adding states to dictionary
        fsm.Add(RotateStates.BackState, new Action(StateBack));
        fsm.Add(RotateStates.MidState, new Action(StateMid));
        fsm.Add(RotateStates.ForState, new Action(StateFor));
        fsm.Add(RotateStates.inactiveState, new Action(StateInactive));

        //also sets starting state
        SetState(RotateStates.inactiveState);

        //quaternion roatations of each rotation
        backRot = new Quaternion(0f, 0f, 0.3662982f, 0.9304975f);
        midRot  = new Quaternion(0f, 0f, 0f, 1f);
        forRot  = new Quaternion(0f, 0f, -0.3662982f, 0.9304975f);

        RCon     = GetComponent <MP_RampCon>();
        Accel    = GetComponent <MP_Boost_Accel>();
        Crashing = GetComponent <MP_Crash>();
        lValue   = GetComponent <MP_LaneValues>();

        inAir = false;
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     LaneSwitch = GetComponent <MP_LaneValues>();
     GroundCon  = GetComponent <MP_GroundControl>();
     RCon       = GetComponent <MP_RampCon>();
 }