fr0stn1k

Untitled

Oct 2nd, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class Player : ICustomObserverable
  2. {
  3. public int Health { get; private set; }
  4. Writer writer;
  5.  
  6. // Register observer
  7. public void Subscribe(ICustomObvserver observer)
  8. {
  9. throw new NotImplementedException();
  10. }
  11.  
  12. public void ApplyDamage(int damage)
  13. {
  14. Health -= damage;
  15.  
  16. }
  17.  
  18. public void NotifyObservers()
  19. {
  20. writer.Notify();
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment