コード例 #1
0
ファイル: GameState.cs プロジェクト: smartboyathome/Haxxit
 protected virtual void HandleActions(GameEngine engine, IEnumerable<StateAction> actions)
 {
     if (actions == null || actions.Count() == 0)
         return;
     foreach (StateAction action in actions)
     {
         if(action != null)
             action.Execute(engine);
     }
 }
コード例 #2
0
ファイル: StateAction.cs プロジェクト: smartboyathome/Haxxit
 public abstract void Execute(GameEngine engine);
コード例 #3
0
ファイル: StateAction.cs プロジェクト: smartboyathome/Haxxit
 public override void Execute(GameEngine engine)
 {
     engine.IsRunning = false;
 }
コード例 #4
0
ファイル: GameState.cs プロジェクト: smartboyathome/Haxxit
 protected abstract void Redraw(GameEngine engine);
コード例 #5
0
ファイル: GameState.cs プロジェクト: smartboyathome/Haxxit
 public virtual void Update(GameEngine engine)
 {
     HandleActions(engine, RetrieveEvents());
     Redraw(engine);
 }
コード例 #6
0
ファイル: MapActions.cs プロジェクト: smartboyathome/Haxxit
 public override void Execute(GameEngine engine)
 {
     _notifiable_manager.Notify("haxxit.map.command", this, new CommandEventArgs(Destination, Source, Command));
 }
コード例 #7
0
ファイル: MapActions.cs プロジェクト: smartboyathome/Haxxit
 public override void Execute(GameEngine engine)
 {
     _notifiable_manager.Notify("haxxit.map.move", this, new MoveEventArgs(Source, Source - Destination));
 }