EventTest.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace Enviro
  5. {
  6. public class EventTest : MonoBehaviour
  7. {
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. EnviroManager.instance.OnHourPassed += () =>
  12. {
  13. Debug.Log("Hour Passed!");
  14. };
  15. EnviroManager.instance.OnDayPassed += () =>
  16. {
  17. Debug.Log("New Day!");
  18. };
  19. EnviroManager.instance.OnYearPassed += () =>
  20. {
  21. Debug.Log("New Year!");
  22. };
  23. EnviroManager.instance.OnDayTime += () =>
  24. {
  25. Debug.Log("Day!");
  26. };
  27. EnviroManager.instance.OnNightTime += () =>
  28. {
  29. Debug.Log("Night!");
  30. };
  31. EnviroManager.instance.OnSeasonChanged += (EnviroEnvironment.Seasons s) =>
  32. {
  33. Debug.Log("Season changed to: " + s.ToString());
  34. };
  35. EnviroManager.instance.OnWeatherChanged += (EnviroWeatherType w) =>
  36. {
  37. Debug.Log("Weather changed to: " + w.name);
  38. };
  39. EnviroManager.instance.OnZoneWeatherChanged += (EnviroWeatherType w, EnviroZone z) =>
  40. {
  41. Debug.Log("Weather changed to: " + w.name.ToString() + " in zone:" + z.name);
  42. };
  43. }
  44. }
  45. }