本文整理汇总了C#中Game.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Game.ToString方法的具体用法?C# Game.ToString怎么用?C# Game.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game
的用法示例。
在下文中一共展示了Game.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleGameStateChange
private void HandleGameStateChange(Game.GameStateId newState) {
this.GameStateAnimator.SetTrigger( newState.ToString() );
foreach(var playerUI in this.PlayerUIs) {
if(playerUI != null) {
playerUI.GoToGameState( newState );
}
}
if(newState == Game.GameStateId.WaitingForPlayers) {
Game.Instance.EventPlayerCanJoinChanged += Instance_EventPlayerCanJoinChanged;
Game.Instance.EventPlayerReadyChanged += Instance_EventPlayerReadyChanged;
for (int i = 0; i < 4; i++) {
Instance_EventPlayerCanJoinChanged( i, Game.Instance.CanPlayerJoin( i ) );
}
}
else {
Game.Instance.EventPlayerReadyChanged -= Instance_EventPlayerReadyChanged;
Game.Instance.EventPlayerCanJoinChanged -= Instance_EventPlayerCanJoinChanged;
}
if (newState == Game.GameStateId.Playing) {
Game.Instance.EventPlayerScored += Instance_EventPlayerScored;
Game.Instance.EventPlayerKilledMinion += Instance_EventPlayerKilledMinion;
for(int i = 0; i < 4; i++) {
if(this.PlayerUIs[i] != null) {
this.PlayerUIs[i].ShowCombo( 0 );
}
}
}
else {
Game.Instance.EventPlayerScored -= Instance_EventPlayerScored;
Game.Instance.EventPlayerKilledMinion -= Instance_EventPlayerKilledMinion;
}
}
示例2: PerformOneGame
private static void PerformOneGame(IBlackjackTable table)
{
var game = new Game(table);
System.Console.WriteLine();
System.Console.WriteLine("***************************");
System.Console.WriteLine("****** NEW ROUND ******");
System.Console.WriteLine("***************************");
System.Console.WriteLine();
game.StartNewGame();
game.CallForBets();
game.DealHands();
System.Console.WriteLine("*** Initial Deal ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
game.OfferSplits();
System.Console.WriteLine("*** After OfferSplits ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
game.OfferDoubleDowns();
System.Console.WriteLine("*** After OfferDoubleDowns ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
game.FillPlayerHands();
System.Console.WriteLine("*** After FillPlayerHands ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
game.FillDealerHand();
System.Console.WriteLine("*** After FillDealerHands ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
var amount = game.SettleBets();
var winnings = string.Format("House Winnings: {0:C}", amount);
System.Console.WriteLine("*** After SettleBets ***");
System.Console.WriteLine();
System.Console.WriteLine(game.ToString());
System.Console.WriteLine(winnings);
System.Console.ReadLine();
}
示例3: GetGameCaption
private string GetGameCaption(Game game)
{
return game.ToString().Replace("_", " ");
}
示例4: JobTypeToString
public static string JobTypeToString(Game.JobType type)
{
switch (type)
{
case Game.JobType.BuildWall:
case Game.JobType.BuildFloor:
case Game.JobType.BuildStairsUp:
case Game.JobType.BuildStairsDown:
case Game.JobType.BuildRampUp:
case Game.JobType.BuildRampDown:
case Game.JobType.BuildDoor:
case Game.JobType.BuildWell:
case Game.JobType.BuildConstruction:
case Game.JobType.BuildWorkshop:
case Game.JobType.BuildMechanism:
case Game.JobType.BuildContainer:
case Game.JobType.BuildFurniture:
case Game.JobType.BuildContainers:
case Game.JobType.BuildWorkshops:
case Game.JobType.BuildMechanisms:
case Game.JobType.BuildInclineUp:
case Game.JobType.BuildInclineDown:
return "Build";
case Game.JobType.PlantTree:
case Game.JobType.PlantSeed:
return "Plant";
case Game.JobType.ReplaceWall:
case Game.JobType.ReplaceFloor:
return "Replace";
default:
return type.ToString();
}
}
示例5: On_TileSelectionManager_SetMouseAction
public static void On_TileSelectionManager_SetMouseAction(Game.GUI.TileSelectionManager self, Game.JobType job, Game.JobData data, bool multiselect, bool rotatable, bool groundSelect, bool snapToGround)
{
initiatingJob = new JobConfiguration()
{
Type = job,
Data = data,
MultiSelect = multiselect,
Rotatable = rotatable,
GroundSelect = groundSelect,
SnapToGround = snapToGround
};
if (data != null)
{
data.ToString();
return;
}
}
示例6: GameInfo
internal GameInfo(Game game, string languageId)
{
this.Game = game;
this.LanguageId = languageId;
switch (game)
{
case Game.GH3_Wii:
FileExtension = "ngc";
HasQbPab = false;
MidTextInQbPak = false;
GuitarProgressionQbFilename = string.Format(@"cripts\guitar\guitar_progression.qb.{0}", FileExtension);
GuitarCoOpQbFilename = string.Format(@"cripts\guitar\guitar_coop.qb.{0}", FileExtension);
SonglistQbFilename = string.Format(@"cripts\guitar\songlist.qb.{0}", FileExtension);
StoreDataQbFilename = string.Format(@"cripts\guitar\store_data.qb.{0}", FileExtension);
this.PakFormatType = PakFormatType.Wii;
StreamDat = string.Format(@"streams/streamall.dat.{0}", FileExtension);
StreamWad = string.Format(@"streams/streamall.wad.{0}", FileExtension);
QbPakFilename = string.Format(@"pak/qb{0}.pak.{1}", languageId, FileExtension);
QbPabFilename = string.Empty;
DbgPakFilename = string.Format(@"pak/dbg.pak.{0}", FileExtension);
break;
case Game.GHA_Wii:
FileExtension = "ngc";
HasQbPab = false;
MidTextInQbPak = true;
GuitarProgressionQbFilename = string.Format(@"scripts\guitar\guitar_progression.qb.{0}", FileExtension);
GuitarCoOpQbFilename = string.Format(@"scripts\guitar\guitar_coop.qb.{0}", FileExtension);
SonglistQbFilename = string.Format(@"scripts\guitar\songlist.qb.{0}", FileExtension);
StoreDataQbFilename = string.Format(@"scripts\guitar\store_data.qb.{0}", FileExtension);
this.PakFormatType = PakFormatType.Wii;
StreamDat = string.Format(@"streams/streamall.dat.{0}", FileExtension);
StreamWad = string.Format(@"streams/streamall.wad.{0}", FileExtension);
QbPakFilename = string.Format(@"pak/qb{0}.pak.{1}", languageId, FileExtension);
QbPabFilename = string.Empty;
DbgPakFilename = string.Format(@"pak/dbg.pak.{0}", FileExtension);
break;
case Game.GH3_PS2: //FILLER VALUES
FileExtension = "ps2";
HasQbPab = true;
MidTextInQbPak = true;
GuitarProgressionQbFilename = string.Format(@"scripts\guitar\guitar_progression.qb.{0}", FileExtension);
GuitarCoOpQbFilename = string.Format(@"scripts\guitar\guitar_coop.qb.{0}", FileExtension);
SonglistQbFilename = string.Format(@"scripts\guitar\songlist.qb.{0}", FileExtension);
StoreDataQbFilename = string.Format(@"scripts\guitar\store_data.qb.{0}", FileExtension);
this.PakFormatType = PakFormatType.PS2;
StreamDat = string.Format(@"streams/streamall.dat.{0}", FileExtension);
StreamWad = string.Format(@"streams/streamall.wad.qb.{0}", FileExtension);
QbPakFilename = string.Format(@"pak\qb{0}.pak.{1}", languageId, FileExtension);
QbPabFilename = string.Empty;
DbgPakFilename = string.Format(@"pak\dbg.pak.{0}", FileExtension);
break;
case Game.GH3_1_3_PC: //FILLER VALUES
FileExtension = "xen";
HasQbPab = true;
MidTextInQbPak = true;
GuitarProgressionQbFilename = string.Format(@"scripts\guitar\guitar_progression.qb.{0}", FileExtension);
GuitarCoOpQbFilename = string.Format(@"scripts\guitar\guitar_coop.qb.{0}", FileExtension);
SonglistQbFilename = string.Format(@"scripts\guitar\songlist.qb.{0}", FileExtension);
StoreDataQbFilename = string.Format(@"scripts\guitar\store_data.qb.{0}", FileExtension);
this.PakFormatType = PakFormatType.PC;
StreamDat = string.Format(@"streams/streamall.dat.{0}", FileExtension);
StreamWad = string.Format(@"streams/streamall.wad.qb.{0}", FileExtension);
QbPakFilename = string.Format(@"pak\qb{0}.pak.{1}", languageId, FileExtension);
QbPabFilename = string.Empty;
DbgPakFilename = string.Format(@"pak\dbg.pak.{0}", FileExtension);
break;
default:
throw new ApplicationException(string.Format("'{0}' is not a known Game type", game.ToString()));
}
}
示例7: GameEnumToString
public static string GameEnumToString(Game game)
{
if (_games.ContainsKey(game))
return _games[game];
else
throw new ApplicationException(string.Format("'{0}' is not a known Game type", game.ToString()));
}
示例8: GoToGameState
public void GoToGameState(Game.GameStateId gameState) {
this.GameStateAnimator.SetTrigger( gameState.ToString() );
}