Guest User

Untitled

a guest
Feb 12th, 2012
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.05 KB | None | 0 0
  1.     public abstract class Controller
  2.     {
  3.         public event EventHandler LeftBegin;
  4.  
  5.         public event EventHandler LeftEnd;
  6.  
  7.         public event EventHandler RightBegin;
  8.  
  9.         public event EventHandler RightEnd;
  10.  
  11.         public event EventHandler UpBegin;
  12.  
  13.         public event EventHandler UpEnd;
  14.  
  15.         public event EventHandler DownBegin;
  16.  
  17.         public event EventHandler DownEnd;
  18.  
  19.         public event EventHandler JumpBegin;
  20.  
  21.         public event EventHandler JumpEnd;
  22.  
  23.         protected void OnLeftBegin(EventArgs e)
  24.         {
  25.             if (this.LeftBegin != null)
  26.                 this.LeftBegin(this, e);
  27.         }
  28.  
  29.         protected void OnLeftEnd(EventArgs e)
  30.         {
  31.             if (this.LeftEnd != null)
  32.                 this.LeftEnd(this, e);
  33.         }
  34.  
  35.         protected void OnRightBegin(EventArgs e)
  36.         {
  37.             if (this.RightBegin != null)
  38.                 this.RightBegin(this, e);
  39.         }
  40.  
  41.         protected void OnRightEnd(EventArgs e)
  42.         {
  43.             if (this.RightEnd != null)
  44.                 this.RightEnd(this, e);
  45.         }
  46.  
  47.         protected void OnUpBegin(EventArgs e)
  48.         {
  49.             if (this.UpBegin != null)
  50.                 this.UpBegin(this, e);
  51.         }
  52.  
  53.         protected void OnUpEnd(EventArgs e)
  54.         {
  55.             if (this.UpEnd != null)
  56.                 this.UpEnd(this, e);
  57.         }
  58.  
  59.         protected void OnDownBegin(EventArgs e)
  60.         {
  61.             if (this.DownBegin != null)
  62.                 this.DownBegin(this, e);
  63.         }
  64.  
  65.         protected void OnDownEnd(EventArgs e)
  66.         {
  67.             if (this.DownEnd != null)
  68.                 this.DownEnd(this, e);
  69.         }
  70.  
  71.         protected void OnJumpBegin(EventArgs e)
  72.         {
  73.             if (this.JumpBegin != null)
  74.                 this.JumpBegin(this, e);
  75.         }
  76.  
  77.         protected void OnJumpEnd(EventArgs e)
  78.         {
  79.             if (this.JumpEnd != null)
  80.                 this.JumpEnd(this, e);
  81.         }
  82.  
  83.         public abstract void Update(Single deltaTime);
  84.     }
Advertisement
Add Comment
Please, Sign In to add comment