KillEnemyCommand.cs 377 B

123456789101112131415161718
  1. using UnityEngine;
  2. namespace FrameWorkDesign.Example
  3. {
  4. public struct KillEnemyCommand : ICommand
  5. {
  6. public void Execute()
  7. {
  8. GameModel.killCount.Value++;
  9. Debug.Log(GameModel.killCount.Value);
  10. if (GameModel.killCount.Value == 6)
  11. {
  12. GamePassEvent.Trigger();
  13. }
  14. }
  15. }
  16. }