TestStarsIndicator.cs 690 B

123456789101112131415161718192021222324252627282930
  1. using UnityEngine;
  2. using System.Collections;
  3. public class TestStarsIndicator : MonoBehaviour
  4. {
  5. void OnEnable()
  6. {
  7. DebugViewManager.OnDebugView += OnDebugView;
  8. }
  9. void OnDisable()
  10. {
  11. DebugViewManager.OnDebugView -= OnDebugView;
  12. }
  13. void OnDebugView()
  14. {
  15. if (GUILayout.Button("Add 1000"))
  16. {
  17. ScoreChangeData data = new ScoreChangeData(ScoreChangeData.Source.Enemy, 1000, Vector3.zero);
  18. NotificationCenter.Post(NotificationType.AddToScore, data);
  19. }
  20. if (GUILayout.Button("Reduce 1000"))
  21. {
  22. ScoreChangeData data = new ScoreChangeData(ScoreChangeData.Source.CondomDispenser, -1000, Vector3.zero);
  23. NotificationCenter.Post(NotificationType.AddToScore, data);
  24. }
  25. }
  26. }