void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(this); _swapTowerSystem = gameObject.AddComponent <SwapTowerSystem>(); _swapTowerSystem.swapParticleSysPrefab = swapParticleSystem; } else { Destroy(gameObject); } }
void Awake() { Application.targetFrameRate = 500; Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us"); _currentScene = GameScenes.MainMap; DontDestroyOnLoad(this); if (enableSwapSystem) { _swapTowerSystem = gameObject.AddComponent <SwapTowerSystem>(); _swapTowerSystem.swapParticleSysPrefab = swapParticleSystem; } SaveSystem.canSave = enableSaveSystem; }