本文整理汇总了C#中Pool.loadButton方法的典型用法代码示例。如果您正苦于以下问题:C# Pool.loadButton方法的具体用法?C# Pool.loadButton怎么用?C# Pool.loadButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pool
的用法示例。
在下文中一共展示了Pool.loadButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadGame
///fournir list<Sprite>, Sprite, Sprite, list<Sprite>
/// <summary>
/// Charge le jeu
/// </summary>
/// <param name="entityList">La liste des entités</param>
/// <param name="map">La carte</param>
/// <param name="hud">Le HUD</param>
/// <param name="buttonList">La liste des boutons</param>
/// <param name="pool">Le pool d'objet à dessiner</param>
public void loadGame(List<Sprite> entityList, Sprite map, Sprite hud, PlayerInfo pi, List<Sprite> buttonList, out Pool pool)
{
batch = new SpriteBatch(graphics.GraphicsDevice);
_pool = new Pool(ref this.content);
_pool.loadMap(map);
Rectangle r_map = _pool.getMap().getSprite().Bounds;
PointConverter.Height = r_map.Height;
PointConverter.Width = r_map.Width;
_pool.loadHUD(hud);
_pool.loadFonts();
this._pi = pi;
foreach (Sprite entity in entityList)
{
Point real_loc = PointConverter.ToClientPoint(new Point((int)entity.ServerLoc.X, entity.ServerLoc.Y));
_pool.loadEntity(entity);
_pool.getEntities().Last().Location = new Point((int)entity.ServerLoc.X, entity.ServerLoc.Y);
_pool.getEntities().Last().Position = new Vector2((float)-real_loc.X, (float)-real_loc.Y);
}
foreach (Sprite button in buttonList)
{
_pool.loadButton(button);
}
pool = this._pool;
}