本文整理汇总了C#中GameType类的典型用法代码示例。如果您正苦于以下问题:C# GameType类的具体用法?C# GameType怎么用?C# GameType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GameType类属于命名空间,在下文中一共展示了GameType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MouseClicked
public void MouseClicked(int x, int y, ref GameType gameType)
{
mouseClick = new Rectangle(x, y, 10, 10);
if (mouseClick.Intersects(Bouton_host))
{
c = new Client();
Thread t = new Thread(new ThreadStart(Program2.Mainq));
t.Start();
t.IsBackground = true;
}
if (mouseClick.Intersects(Bouton_Exit))
{
Game1.GetGame().Exit();
}
else if (mouseClick.Intersects(Bouton_Options))
{
gameType = GameType.Menu_Option_Type;
}
else if (mouseClick.Intersects(Bouton_Multi))
{
gameType = GameType.Menu_Play_Multi_Type2;
}
else if (mouseClick.Intersects(Bouton_Play))
{
gameType = GameType.Menu_Play_Type;
}
else if (mouseClick.Intersects(Bouton_Solo))
{
gameType = GameType.Menu_Play_Solo_Type;
}
}
示例2: MouseClicked
void MouseClicked(int x, int y, ref GameType gameType)
{
mouseClick = new Rectangle(x, y, 10, 10);
if (mouseClick.Intersects(Bouton_Play))
{
gameType = GameType.Menu_Play_Type;
}
if (mouseClick.Intersects(Bouton_Exit))
{
Game1.GetGame().Exit();
}
if (mouseClick.Intersects(Bouton_Options))
{
gameType = GameType.Menu_Option_Type;
}
if (mouseClick.Intersects(Bouton_Solo))
{
gameType = GameType.Menu_Play_Solo_Type;
}
if (mouseClick.Intersects(host))
{
System.Diagnostics.Process.Start("C:/Users/epita/Desktop/Final/zbra/bin/Debug/zbra.exe");
}
if (mouseClick.Intersects(join))
{
System.Diagnostics.Process.Start("C:/Users/epita/Desktop/Final/Client/bin/Debug/Client.exe");
}
if (mouseClick.Intersects(local))
{
gameType = GameType.Menu_Play_Multi_Type;
}
}
示例3: score
public score(int score,int level,GameType gameType,DateTime date)
{
Score = score;
Level = level;
GameType = gameType;
Date = date;
}
示例4: Game
public Game(string name, GameType type, string gameOwnerId)
{
Id = Guid.NewGuid();
Name = name;
Type = type;
GameOwnerId = gameOwnerId;
}
示例5: CreatePlayers
internal static ICollection<IPlayer> CreatePlayers(GameType gameType, IMessageLogger messageLogger)
{
logger = messageLogger;
ICollection<IPlayer> players = new List<IPlayer>();
switch (gameType)
{
case GameType.SinglePlayer:
var humanPlayer = CreateHumanPlayer();
var computerPlayer = CreateComputerPlayer();
players.Add(humanPlayer);
players.Add(computerPlayer);
break;
case GameType.MultiPlayer:
var firstPlayer = CreateHumanPlayer();
var secondPlayer = CreateHumanPlayer();
players.Add(firstPlayer);
players.Add(secondPlayer);
break;
default:
BullsAndCowsException.GameTypeException();
break;
}
return players;
}
示例6: ScreenManager
public ScreenManager(GameType gametype, Game1 game)
{
menubase = new Menu_Base(Content_Manager.getInstance().Textures["menubase"]);
menuoptions = new Menu_Options(Content_Manager.getInstance().Textures["menuoptions"]);
menuplay = new Menu_Play(Content_Manager.getInstance().Textures["menuplay"]);
menuSolo = new Menu_Play_Solo(Content_Manager.getInstance().Textures["menusolo"]);
menusolo1 = new Menu_Play_Solo_World1(Content_Manager.getInstance().Textures["solo1"]);
menusolo2 = new Menu_Play_Solo_World2(Content_Manager.getInstance().Textures["solo2"]);
menuMulti = new Menu_Play_Multi(Content_Manager.getInstance().Textures["menumulti"]);
menupauseoption = new Menu_Pause_Options(Content_Manager.getInstance().Textures["menupauseoption"]);
casper = new Casper(Content_Manager.getInstance().Textures["Casper"], new Rectangle(0, 0, 16, 34));
player2 = new Casper(Content_Manager.getInstance().Textures["Casper"], new Rectangle(50, 50, 16, 34));
casper2 = new Casper(Content_Manager.getInstance().Textures["Player1"], new Rectangle(50, 50, 0, 0));
controls = new Controls(casper.Position, casper.Velocity, casper.Speed, Keys.W, Keys.A, Keys.D, Keys.S);
controlsPlayer2 = new Controls(player2.Position, player2.Velocity, player2.Speed, Keys.Up, Keys.Left, Keys.Right, Keys.Down);
controlsWorld2 = new Controls(casper2.Position, casper2.Velocity, casper2.Speed, Keys.Up, Keys.Left, Keys.Right, Keys.Down);
world2vert1 = new Decors(Content_Manager.getInstance().Textures["vert"], new Rectangle(-1680, 0, 1680, 1050));
world2vert2 = new Decors(Content_Manager.getInstance().Textures["vert"], new Rectangle(1680, 0, 1680, 1050));
camera = new Camera(Game1.GetGame().GraphicsDevice.Viewport);
game.casperr = casper;
decors = new Decors(Content_Manager.getInstance().Textures["Level1"], new Rectangle(0, 0, 1680, 1050));
decors1 = new Decors(Content_Manager.getInstance().Textures["Level1"], new Rectangle(1680, 0, 1680, 1050));
decors2 = new Decors(Content_Manager.getInstance().Textures["Level1"], new Rectangle(-1680, 0, 1680, 1050));
world2 = new Decors(Content_Manager.getInstance().Textures["world2"], new Rectangle(0, 0, 1680, 1050));
menupause = new Menu_Pause(Content_Manager.getInstance().Textures["menupause"]);
level1 = new Level1(new Vector2(0, 0));
obstacles = new Obstacles(level1.getList());
previousgametype = GameType.Exit;
this.gametype = gametype;
}
示例7: Create
public ActionResult Create(string gameName, GameType gameType, string gameOwner)
{
var message = string.Format("The game \"{0}\" has been created.", gameName);
_repository.SaveGame(new Game(gameName, gameType, gameOwner));
return View(model: message);
}
示例8: Index
public ActionResult Index(GameType? gameType)
{
ViewBag.SelectedPage = "Home_Page";
var userId = GetUserId();
if (userId == null)
return Redirect("/signin");
var existingGame = _gameRepository.TryGetGame(userId);
if (existingGame != null)
{
var question = existingGame.GetQuestion();
var questionVm = new ImageQuestionModel
{
imageUrl = question.Picture.ImageUrl,
answerVersions = question.GetAnswers().AsEnumerable()
};
return View(questionVm);
}
else
{
var questionVm = CreateNewGame(userId, gameType??GameType.Styles);
return View(questionVm);
}
}
示例9: MouseClicked
void MouseClicked(int x, int y, ref GameType gametype)
{
mouseClick = new Rectangle(x, y, 10, 10);
if (mouseClick.Intersects(Bouton_Play))
{
gametype = GameType.Menu_Play_Type;
}
else if (mouseClick.Intersects(Bouton_Exit))
{
Game1.GetGame().Exit();
}
else if (mouseClick.Intersects(Bouton_Res))
{
gametype = GameType.Menu_Option_Type;
}
else if (mouseClick.Intersects(Bouton_Full))
{
Game1.GetGame().IsFullScreen = !Game1.GetGame().IsFullScreen;
}
else if (mouseClick.Intersects(Bouton_Sound))
{
SoundEffect.MasterVolume = 1.0f - SoundEffect.MasterVolume;
MediaPlayer.Volume = 1.0f - MediaPlayer.Volume;
}
}
示例10: TableCreatedEvent
public TableCreatedEvent(string tableId, DateTime tableCreationTime, int playerCapacity, GameType gameType)
{
TableId = tableId;
PlayerCapacity = playerCapacity;
GameType = gameType;
TableCreationTime = tableCreationTime;
}
示例11: Print
public void Print(List<Player> pl, GameType t)
{
players = pl;
type = t;
if (players.Count <= maxPlayersInOneRow)
{
printInOneRow = true;
linesToPrint = players.Count;
}
else
{
printInOneRow = false;
linesToPrint = (players.Count + 1) / 2;
}
if (previewControl != null)
{
previewControl.Document = doc;
previewControl.InvalidatePreview();
}
else
{
previewDialog.Width = 600;
previewDialog.Height = 800;
previewDialog.Document = doc;
previewDialog.ShowDialog();
}
}
示例12: eval
public static int eval(this Game o, Draw d, GameType gt, PrizeCategory pc)
{
if(gt == GameType.Undefined || pc == PrizeCategory.Undefined)
return 0;
o.notNull(); d.notNull();
return o.Playslips.Sum(playslip => eval((Playslip)playslip, d, gt, pc));
}
示例13: Move
public Move(string name, GameType type, int pp, int damage)
{
Name = name;
Type = type;
Pp = pp;
Damage = damage;
}
示例14: SectorActionsSupporting
public SectorActionsSupporting(SectorItem sector, GameType gameType, bool isActivePlayer)
{
this.sector = sector;
supportEntries.Add(SectorActions.StraightAllCards,
sector.Behavior == SectorBehavior.StaticFree && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.ChangeAllCardsCharacteristics,
sector.Behavior == SectorBehavior.StaticFree && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.CreatePawn,
sector.Behavior == SectorBehavior.StaticFree && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.Shuffle,
sector.Behavior == SectorBehavior.Simple && sector.CardsVisibility == SectorCardsVisibility.Hidden && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.Mulligan,
sector.Code == SystemSectors.HAND.ToString() && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.MoveCards,
(gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.MoveCardsToDefaultSector,
(sector.Behavior == SectorBehavior.Simple || sector.Behavior == SectorBehavior.CollapsableFlow) && !string.IsNullOrEmpty(sector.DefaultTarget) && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.MoveTopCards,
sector.Behavior == SectorBehavior.Simple && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.MoveRandomCards,
sector.Behavior == SectorBehavior.CollapsableFlow && sector.CardsVisibility != SectorCardsVisibility.Visibile && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.MoveAllCards,
(gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.ShowTop,
sector.Behavior == SectorBehavior.Simple && sector.CardsVisibility != SectorCardsVisibility.Visibile && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.ShowRandomCards,
sector.Behavior == SectorBehavior.CollapsableFlow && sector.CardsVisibility != SectorCardsVisibility.Visibile && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.Show,
sector.CardsVisibility != SectorCardsVisibility.Visibile && (gameType == GameType.Solitaire || isActivePlayer));
supportEntries.Add(SectorActions.Watch,
sector.Behavior == SectorBehavior.Simple && (gameType == GameType.Solitaire || isActivePlayer || sector.CardsVisibility == SectorCardsVisibility.Visibile));
supportEntries.Add(SectorActions.KeepUncovered,
sector.CardsVisibility == SectorCardsVisibility.Hidden && (gameType == GameType.Solitaire || isActivePlayer));
}
示例15: Neuromon
public Neuromon(string name, int health, GameType type, MoveSet moveSet)
{
Type = type;
Name = name;
Health = health;
MoveSet = moveSet;
}