本文整理汇总了C#中IGame.Start方法的典型用法代码示例。如果您正苦于以下问题:C# IGame.Start方法的具体用法?C# IGame.Start怎么用?C# IGame.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGame
的用法示例。
在下文中一共展示了IGame.Start方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override CommandResponseDto Execute(IGame game)
{
game.Stop();
game.Start(_size, new ClassicGameMode(game, _physics, _stateTracker, _playerRepository));
return Success;
}
示例2: StartGame
public void StartGame(GameType gt, EventHandler Repaint)
{
StopGame();
currentGame = CreateGame(gt);
if (currentGame != null)
{
currentGame.Repaint += Repaint;
currentGame.Start();
}
}
示例3: Form1
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
this.Cursor.Dispose();
// IMPORTANT: Tell Windows that we will do all
// drawing in the Paint method
this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.DoubleBuffer, true);
_pressedKeys = new HashSet<Keys>();
_fpsCalc = new FramesPerSecondCalc(true);
_debugFont = new System.Drawing.Font(FontFamily.GenericMonospace, 10f);
_theGame = new TheGame(this, ClientSize);
_theGame.Start();
}
示例4: start
private void start()
{
// build a game like this
_game = new SimpleGameBuilder()
// rules define cards and stuff that can use properties of cards
.WithRule<DefaultTileset>()
.WithRule<CityRule>()
.WithRule<FarmersRule>()
.WithRule<PriestsRule>()
.WithRule<HighwaymanRule>()
// with players
.WithPlayer<SimpleComputerPlayer>()
.WithPlayer(Player)
// build the game
.Build();
// attach an observer of the game (UI representation)
_game.AddObserver(this);
// play a game like this
_game.Start();
}