void Awake() { if (instance == null) { instance = this; isMute = (PlayerPrefs.GetInt("mute", 0) == 0) ? false : true; DoMute(); DontDestroyOnLoad(this); } else if (this != instance) { Destroy(gameObject); } }
void Start() { Count_Timer = 0; /// タイマー初期化 isAction = true; /// メインの実態生成ON /// ゲームメインをグローバルに登録する CommonUtility.GameMain = this; if (isFadeOneFlag) { Fade m_Fade = GetComponent <Fade>(); m_Fade.FadeStart(2, Stage1_Fade_out); } m_enemy.Clear(); BGMObj = GameObject.Find("BGM_Control").GetComponent <BGMControll> (); SoundObj = GameObject.Find("SoundsControll").GetComponent <SoundControll> (); }
private void Awake() { instance = this; }
// Use this for initialization void Start() { SoundObj = GameObject.Find("SoundsControll").GetComponent <SoundControll> (); }