Guest User

Untitled

a guest
May 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1.  
  2. public void SignalEvent(ProgramEvent e)
  3. {
  4. if (ProgramEvent != null)
  5. ProgramEvent(e);
  6. }
  7. public event ProgramEventHandler ProgramEvent;
  8.  
  9. enum ProgramEventType
  10. {
  11. ProgramStarted,
  12. ProgramStateChanged,
  13. WorldMapControlMoved,
  14. DestructibleKilled,
  15. ..
  16. }
  17.  
  18. class ProgramEvent
  19. {
  20. public ProgramEventType Type { get; set; }
  21. public override string ToString()
  22. {
  23. return "ProgramEvent " + Type;
  24. }
  25. }
  26.  
  27.  
  28.  
  29. class DestructibleKilled : ProgramEvent
  30. {
  31. public DestructibleKilled() { Type = ProgramEventType.DestructibleKilled; }
  32. public Game.Map.Unit Perpetrator { get; set; }
  33. public Game.Map.Destructible Destructible { get; set; }
  34. public Game.Map.Script Script { get; set; }
  35. }
Add Comment
Please, Sign In to add comment