本文整理汇总了C#中Dialog.setFont方法的典型用法代码示例。如果您正苦于以下问题:C# Dialog.setFont方法的具体用法?C# Dialog.setFont怎么用?C# Dialog.setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dialog
的用法示例。
在下文中一共展示了Dialog.setFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
/// <summary>
/// Laddar rummets och de saker i rummets innehåll
/// </summary>
public void LoadContent(Game game)
{
// Första gången man besöker ett rum, laddas det in
// Om man redan har besökt ett rum är allting där det var när man lämnade rummet
if (visited == false)
{
soundhasplayed = false;
this.background = game.Content.Load<Texture2D>(@"Images/Backgrounds/" + backgroundID);
animbackground = new AnimatedSprite(background, new Vector2(0,0) , 0, new Point(background.Width / (background.Width / 320), background.Height), new Point(0, 0), new Point(2, 1), 100);
this.mask = game.Content.Load<Texture2D>(@"Images/Backgrounds/" + backgroundID + "mask");
this.foreground = game.Content.Load<Texture2D>(@"Images/Backgrounds/" + backgroundID + "fg");
this.maskData = TextureTo2DArray(mask);
this.game = game;
int tal = 0;
int.TryParse(dialogID, out tal);
this.roomDialog = Registry.dialogs[tal];
isItemClicked = false;
toChangeRoom = false;
roomDialog.setFont(game.Content.Load<SpriteFont>(@"textfont"));
dialogIsActive = true;
dialogSound = game.Content.Load<SoundEffect>(@"Sound/Voice/" + dialogID);
foreach (string id in itemID)
{
Item itemToBeAdded = new Item();
itemToBeAdded.loadNewItem(Registry.items[int.Parse(id)]);
itemToBeAdded.Initialize(game.Content.Load<Texture2D>(@itemToBeAdded.TextureString));
items.Add(itemToBeAdded);
}
foreach (string id in npcID)
{
npcs.Add(Registry.npcs[int.Parse(id)]);
}
foreach (NPC item in npcs)
{
item.loadContent(game);
}
foreach (Door item in doors)
{
item.LoadContent(game);
}
int i = 0;
foreach (Item item in items)
{
string[] temp = itemPosition[i].Split(new char[] { ',' }, 2);
item.setPosition(new Vector2(float.Parse(temp[0]), float.Parse(temp[1])));
i++;
}
visited = true;
}
if (song != "null")
{
if (Registry.musbol == true)
{
if (!Registry.music.IsDisposed)
{
MediaPlayer.Stop();
Registry.music.Dispose();
}
}
if (Registry.currentSong != song)
{
Registry.music = game.Content.Load<Song>(@"Sound/BGM/" + song);
Registry.currentSong = song;
MediaPlayer.Play(Registry.music);
}
MediaPlayer.IsRepeating = true;
}
}