Esempio n. 1
0
 void Start()
 {
     carControl = GetComponent <HoverCarControl>();
     for (int i = 0; i < wheels.Count; i++)
     {
         defaultPositions[i] = wheels[i].transform.localPosition;
     }
 }
Esempio n. 2
0
 void Start()
 {
     points               = FindObjectOfType <Waypoints>().points;
     carControl           = GetComponent <HoverCarControl>();
     rigid                = GetComponent <Rigidbody>();
     currentPoint         = new Vector3(points[currentPointIndex].position.x, 0, points[currentPointIndex].position.z);
     defaultPointDistance = nextPointDistance;
 }
Esempio n. 3
0
    public static void Set2of2(Camera camera, HoverCarControl control)
    {
        Rect rect = new Rect();

        rect.x      = 0.5f;
        rect.width  = 1.0f;
        rect.y      = 0.0f;
        rect.height = 1.0f;

        camera.rect        = rect;
        control.cameraRect = rect;
    }
Esempio n. 4
0
    private void Awake()
    {
        if (instance != null)
        {
            return;
        }

        instance = this;

        playerControllerScript = GetComponent <HoverCarControl>();
        playerCurrHealth       = playerMaxHealth;

        Cursor.lockState = CursorLockMode.Confined;
    }
Esempio n. 5
0
 void Start()
 {
     foreach (WaypointFollower wf in FindObjectsOfType <WaypointFollower>())
     {
         wf.enabled = false;
     }
     foreach (HoverCarControl hcc in FindObjectsOfType <HoverCarControl>())
     {
         if (hcc.playerControlled)
         {
             playerCar            = hcc;
             hcc.playerControlled = false;
         }
     }
     startedCounting = true;
 }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        Gm = GameObject.Find("GameManager").GetComponent <GameManager>();

        HoverList = GameObject.Find("Hovers").gameObject;

        HoverPlayer = HoverList.transform.GetChild(0).gameObject.GetComponent <HoverCarControl>();

        for (int i = 1; i < HoverList.transform.childCount; i++)
        {
            HoverEnemies.Add(HoverList.transform.GetChild(i).gameObject.GetComponent <HoverCarAI>());
        }

        if (HoverPlayer != null)
        {
            StartCoroutine(StartRace());
        }
    }
Esempio n. 7
0
 void Start()
 {
     carControl = GetComponent <HoverCarControl>();
     rigid      = GetComponent <Rigidbody>();
 }
Esempio n. 8
0
 void Start()
 {
     carControl = GetComponent <HoverCarControl>();
     carRigid   = GetComponent <Rigidbody>();
     pitchDiff  = maxPitch - minPitch;
 }
Esempio n. 9
0
 private void Awake()
 {
     i = this; //Set singleton
 }
Esempio n. 10
0
 void Start()
 {
     wheelRigid = GetComponent <Rigidbody>();
     carControl = GetComponentInParent <HoverCarControl>();
     rigid      = GetComponentInParent <Rigidbody>();
 }
Esempio n. 11
0
 // Use this for initialization
 void Start()
 {
     hover = GetComponent <HoverCarControl> ();
 }