void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; state = Enums.GameStates.Running; prevState = Enums.GameStates.Running; musicVol = .3f; sfxVol = .3f; if (FileExists()) Load(); else { //weapons = new Enums.BulletTypes[] { Enums.BulletTypes.Pistol, Enums.BulletTypes.Destroyer, Enums.BulletTypes.Malloc, Enums.BulletTypes.Free, Enums.BulletTypes.Launcher }; weapons = new Enums.BulletTypes[] { Enums.BulletTypes.Pistol }; Store(); } } else if (this != instance) { Destroy(this.gameObject); } }
void Awake() { if(instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; } else if(this != instance) { Destroy(this.gameObject); } }
void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; state = Enums.GameStates.Running; prevState = Enums.GameStates.Running; musicVol = .5f; sfxVol = .5f; weapons = new Enums.BulletTypes[] { Enums.BulletTypes.Pistol }; } else if (this != instance) { Destroy(this.gameObject); } }
void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; state = Enums.GameStates.CardSelection; prevState = Enums.GameStates.CardSelection; musicVol = .5f; sfxVol = .5f; player1Win = false; player1Lose = false; } else if (this != instance) { Destroy(this.gameObject); } }