示例#1
0
    // Use this for initialization
    void Start()
    {
        PCont = GameObject.Find("PlayerContainer");

        //sets the overheat bar to it's max value
        bar        = maxBar;
        LaneSwitch = GetComponent <MP_LaneValues>();
        Heating    = GetComponent <MP_Overheat>();
    }
示例#2
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();
    }