예제 #1
0
        /// <summary>
        /// Modify() changes the values of the World's metrics depending the MetricModifier object's fields. The modification
        /// is multiplied depending on the current level.
        /// </summary>
        public void Modify()
        {
            Debug.Log("Modifying metrics: pop: " + PopHappinessModifier + " gold: " + GoldModifier + " envHealth: " + EnvHealthModifier);

            LevelControl lc         = GameObject.Find("LevelManager").GetComponent <LevelControl>();
            int          multiplier = lc.Multiplier;

            Debug.Log("Metric multiplier is: " + multiplier);

            MetricManager.Instance.UpdateGold(GoldModifier * multiplier);
            MetricManager.Instance.UpdateEnvHealth(EnvHealthModifier * multiplier);
            MetricManager.Instance.UpdatePopHappiness(PopHappinessModifier * multiplier);
        }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     levelProgressScript = GameObject.Find("LevelProgress").GetComponent <LevelProgressScript>();
     levelController     = GameObject.Find("LevelManager").GetComponent <LevelControl>();
 }