Skip to content
Snippets Groups Projects
Commit 8f48369e authored by Erno Lokkila's avatar Erno Lokkila
Browse files

added music for house upgrades

parent 65813a7b
No related branches found
No related tags found
No related merge requests found
...@@ -111,6 +111,15 @@ public class City : MonoBehaviour ...@@ -111,6 +111,15 @@ public class City : MonoBehaviour
spriteIndex = Math.Min(spriteIndex+1, sprites.Length-1); spriteIndex = Math.Min(spriteIndex+1, sprites.Length-1);
this.population += v; this.population += v;
gameObject.GetComponent<SpriteRenderer>().sprite = sprites[spriteIndex]; 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() private void Update()
......
...@@ -12,6 +12,7 @@ public enum EventType ...@@ -12,6 +12,7 @@ public enum EventType
HuntingSmall, HuntingSmall,
HuntingBig, HuntingBig,
WinMusic, WinMusic,
Ultimate,
//effects //effects
WoodChopped, WoodChopped,
StoneCut, StoneCut,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment