本文整理汇总了C#中GameStateManager.pushState方法的典型用法代码示例。如果您正苦于以下问题:C# GameStateManager.pushState方法的具体用法?C# GameStateManager.pushState怎么用?C# GameStateManager.pushState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameStateManager
的用法示例。
在下文中一共展示了GameStateManager.pushState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
protected override void LoadContent()
{
Game1.content = Content;
FontFactory.setContentManager(content);
TextureLibrary.initModelLibrary(content);
WeaponLibrary.initWeaponLibrary();
TypeConverterLibrary.instantiate();
Console.WriteLine(TypeConverterLibrary.getTypeConverter<int>().getTypeAsString());
SpriteBatchWrapper.initialise();
spriteBatch = new SpriteBatch(GraphicsDevice);
mousePointer = Content.Load<Texture2D>("editor//mousepointer");
EffectLibrary.basicEffect = Content.Load<Effect>("effects//effects");
stateManager = new GameStateManager(new EntityLoader(new EntityManager(),
(EntityManager entityManager) =>
{
entityManager.addEntity(Entity.EntityFactory.createHumanEntity(1000, new Vector2(0, 0), 0, true));
entityManager.addEntity(Entity.EntityFactory.createHumanEntity(1000, new Vector2(10, 80), 0, true));
entityManager.addEntity(Entity.EntityFactory.createHumanEntity(1000, new Vector2(300, 100), 1, true));
entityManager.addEntity(Entity.EntityFactory.createHumanEntity(1000, new Vector2(300, 140), 1, true));
entityManager.addEntity(Entity.EntityFactory.createMapComponent(new Vector2(100, 100),
new Vector2(100, 250), new Vector2(150, 240), new Vector2(140, 90)));
entityManager.addEntity(Entity.EntityFactory.createMapComponent(new Vector2(-132, 100),
new Vector2(-50, -99), new Vector2(-50, -110), new Vector2(-100, -100)));
}));
layerManager.addLayerOnTop(new SaveLoadLayer(uiService));
stateManager.pushState(new UnitSelectState(0, stateManager));
GlobalStateInfo.setTotalPlayers(2);
OutputConsole.writeLn("Loading");
}