private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
void Awake() { _game = GlobalObject.Instance; _events = GUIEventManager.Instance; _cameraFade = CameraFading.Instance; _effectManager = ScreenEffectManager.Instance; _mainMenu.InitializeWindow(_guiproperties); _optionsMenu.InitializeWindow(_guiproperties); _systemWindow.InitializeWindow(_guiproperties); _shopWindowComplex.InitializeWindow(_guiproperties); _shopMenuUnchangebleParts.InitializeWindow(_guiproperties); _shopMenuWeaponUpgradeZone.InitializeWindow(_guiproperties); lastScreenHeight = Screen.height; lastScreenWidth = Screen.width; }
// Use this for initialization void Start() { graphicResourceManager = gameObject.AddComponent <GraphicResourceManager>(); fileIOManager = gameObject.AddComponent <FileIOManager>(); screenResolutionConvertManager = gameObject.AddComponent <ScreenResolutionConvertManager>(); screenIOManager = gameObject.AddComponent <ScreenIOManager>(); screenEffectManager = gameObject.AddComponent <ScreenEffectManager>(); playMapManager = gameObject.AddComponent <PlayMapManager>(); gameAdsManager = gameObject.AddComponent <GameAdsManager>(); guiStyleManager = new GUIStyle(); resetFlag = true; touchEvent = DefineManager.notTouched; adsWatchedStatus = "not watched"; }