GameModel.cs 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace FrameWorkDesign.Example
  5. {
  6. public interface IGameModel
  7. {
  8. BindableProperty<int> killCount { get; }
  9. BindableProperty<int> Gold { get; }
  10. BindableProperty<int> Score { get; }
  11. BindableProperty<int> BestScore { get; }
  12. }
  13. public class GameModel : IGameModel
  14. {
  15. public BindableProperty<int> killCount { get; } = new BindableProperty<int>()
  16. {
  17. Value = 0
  18. };
  19. public BindableProperty<int> Gold { get; } = new BindableProperty<int>()
  20. {
  21. Value = 0
  22. };
  23. public BindableProperty<int> Score { get; } = new BindableProperty<int>()
  24. {
  25. Value = 0
  26. };
  27. public BindableProperty<int> BestScore { get; } = new BindableProperty<int>()
  28. {
  29. Value = 0
  30. };
  31. }
  32. }