public void ChangePopulation(ValueModifier modifier, int amt) { if (modifier == ValueModifier.Increase) { Debug.Log($"{modifier.ToString()} {amt}"); } else { // gamemaster variable - amt } }
// Start is called before the first frame update void Start() { // setup game manager instance = this; if (!isInit) { ResetState(); isInit = true; } // execute only in Arenas if (status == GameStatus.start) { // setup player player = GameObject.Find("Player"); print(playerModifier.ToString()); player.GetComponent <ModifierContainer>().modifier.MergeModifier(playerModifier); if (player != null) { status = GameStatus.start; counter = startWaitTime; } else { status = GameStatus.menu; } // setup enemies enemyManager = GameObject.Find("EnemyManager"); enemyManager.GetComponent <ModifierContainer>().modifier.MergeModifier(enemyModifier); // spawn arena modifiers _arenaModifiers = new Dictionary <ValueModifier, GameObject>(); foreach (ArenaModifierEntry e in arenaModifiers) { _arenaModifiers.Add(e.type, e.obj); } Instantiate(_arenaModifiers[arenaModifier], Vector3.zero, Quaternion.identity, this.gameObject.transform); } }