diff --git a/Assets/Scripts/City/City.cs b/Assets/Scripts/City/City.cs index 3f62dd11b6156921ed02bcff8021c9f4e4b8ef8c..e173e134852c3ad19e5d208ad26a7264a81f2bd5 100644 --- a/Assets/Scripts/City/City.cs +++ b/Assets/Scripts/City/City.cs @@ -111,6 +111,15 @@ public class City : MonoBehaviour spriteIndex = Math.Min(spriteIndex+1, sprites.Length-1); this.population += v; gameObject.GetComponent<SpriteRenderer>().sprite = sprites[spriteIndex]; + + if(spriteIndex == 1) + EventSystem.EventHappened(EventType.CityBig); + else if (spriteIndex == 2) + EventSystem.EventHappened(EventType.HuntingSmall); + else if (spriteIndex == 3) + EventSystem.EventHappened(EventType.HuntingBig); + else if (spriteIndex == 4) + EventSystem.EventHappened(EventType.Ultimate); } private void Update() diff --git a/Assets/Scripts/EventSystem/EventType.cs b/Assets/Scripts/EventSystem/EventType.cs index 5802558d9e2edfabfed034e331d3da4c40c1d539..783e6ff55fe4d14f3ed020e9a4cc206103c4b3d7 100644 --- a/Assets/Scripts/EventSystem/EventType.cs +++ b/Assets/Scripts/EventSystem/EventType.cs @@ -12,6 +12,7 @@ public enum EventType HuntingSmall, HuntingBig, WinMusic, + Ultimate, //effects WoodChopped, StoneCut,