void Awake() { if (mInstance == null) { mInstance = this as CameraFade; instance.init(); } }
void Awake() { if( mInstance == null ) { mInstance = this as CameraFade; instance.init(); } }
// Utilize the Vehicle Factory here to create any vehicles that need to be made at the beginning of the scenario // It is probably a good idea to instantiate all of the vehicles that will be used at this time, and just disable // the ones that shouldn't be visible yet void Awake() { CameraFade.StartAlphaFade(Color.black, true, 4f); Initialize <States> (); //Instantiate (UserCar, new Vector3 (21.11f, 0.14f, 14.4f), Quaternion.identity); UserCar.SetActive(false); // Grab reference to vehicle spawn controller //manufacturer = GetComponent<SpawnController> (); // Set the initial state here ChangeState(States.AIDriving); }
void OnApplicationQuit() { mInstance = null; }
void Die() { mInstance = null; Destroy(gameObject); }