Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player : ICustomObserverable
- {
- public int Health { get; private set; }
- Writer writer;
- // Register observer
- public void Subscribe(ICustomObvserver observer)
- {
- throw new NotImplementedException();
- }
- public void ApplyDamage(int damage)
- {
- Health -= damage;
- }
- public void NotifyObservers()
- {
- writer.Notify();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment