示例#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
 // Use this for initialization
 void Start()
 {
     GCon     = GetComponent <MP_GroundControl>();
     ACon     = GetComponent <MP_AirControl>();
     Accel    = GetComponent <MP_Boost_Accel>();
     lValue   = GetComponent <MP_LaneValues>();
     Crashing = GetComponent <MP_Crash>();
     //setting the reset rotation to 0
     resetRot = new Quaternion(0f, 0f, 0f, 1f);
 }
示例#3
0
    //used in states to have references set
    public override void Enter()
    {
        lValues  = GetMachine <MP_ChangeLanes>().GetComponent <MP_LaneValues>();
        Accel    = GetMachine <MP_ChangeLanes>().GetComponent <MP_Boost_Accel>();
        Control  = GetMachine <MP_ChangeLanes>().GetComponent <MP_Controls>();
        Heating  = GetMachine <MP_ChangeLanes>().GetComponent <MP_Overheat>();
        Crashing = GetMachine <MP_ChangeLanes>().GetComponent <MP_Crash>();

        //finds the individual ramp colliders by name
        SHRampOne   = GameObject.Find("SHR");
        SHRampTwo   = GameObject.Find("SHR1");
        SHRampThree = GameObject.Find("SHR2");
        //sets the timepassed to 0 on the script referenced
        lValues.ResetTimer();
    }
示例#4
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;
    }
示例#5
0
 // Use this for initialization
 void Start()
 {
     LaneSwitch  = GetComponent <MP_LaneValues>();
     BoostScript = GetComponent <MP_Boost_Accel>();
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     speed = GameObject.Find("Player").GetComponent <MP_Boost_Accel>();
 }
示例#7
0
 // Use this for initialization
 void Start()
 {
     accel   = GetComponent <MP_Boost_Accel>();
     control = GetComponent <MP_Controls>();
 }