// Use this for initialization void Awake() { if (singleton == null) { singleton = this; } else if (singleton != this) { Destroy(gameObject); } }
void Start() { BulletMgr = k514BulletManager.singleton; MathMgr = k514MathManager.singleton; InteractMgr = k514InteractManager.singleton; EnemyMgr = k514EnemyManager.singleton; BlockMgr = k514StageBlockManager.singleton; ItemMgr = k514ItemManager.singleton; GameMgr = k514GamePlayManager.singleton; UI_SpecaMgr = k514UISpellCardManager.singleton; SerifuMgr = k514SerifuManager.singleton; SoundMgr = k514SoundManager.singleton; EffectMgr = k514EffectManager.singleton; OptionMgr = k514OptionManager.singleton; if (SoundMgr == null) { Instantiate(snd).parent = transform; SoundMgr = k514SoundManager.singleton; } }