public Lootstack modifyStack(ref Lootstack stk) { checkLevelCompletion(); stk.stackValue = Mathf.FloorToInt((_levMan.score * LevelManager.GlobTuning.percentageLootStack)); if (stk.stackValue == 0) { stk.Fade(); } stk.transform.position = _levMan._player.transform.position; // List<LinearStep> stpList = _levMan.proc._listSteps.Find( (LinearStep obj) => obj.ScoreCondition < stk.stackValue); return stk; }
void Setup() { if (GAMESTATE == GameEventManager.GameState.MainMenu) { GameEventManager.TriggerGameStart("LM"); } Loot = tools.createStack(); Loot.Setup(this); InvokeRepeating("updateTime", 0f, 0.01f); InvokeRepeating("UpdateScoreOverTime", 0f, 0.1f); GameEventManager.GameStart += GameStart; GameEventManager.GameOver += GameOver; GameEventManager.Respawn += Respawn; GameEventManager.EndGame += EndGame; }