private void Start() { enemyHandlerList = new List <EnemyHandler>(); playerHandler = PlayerHandler.CreatePlayer(GetClosestEnemyHandler); playerHandler.OnDead += delegate(object sender, EventArgs e) { Window_GameOver.Show(); }; cameraFollow.Setup(70f, 2f, playerHandler.GetPosition); FunctionPeriodic.Create(SpawnEnemy, 1.5f); }
private void Awake() { instance = this; gameObject.SetActive(false); }