本文整理汇总了C#中TextManager.DisplayStringNumberText方法的典型用法代码示例。如果您正苦于以下问题:C# TextManager.DisplayStringNumberText方法的具体用法?C# TextManager.DisplayStringNumberText怎么用?C# TextManager.DisplayStringNumberText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextManager
的用法示例。
在下文中一共展示了TextManager.DisplayStringNumberText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GiveReward
public void GiveReward(PlayerObj player, TextManager textManager)
{
switch (this.DropType)
{
case 1:
case 10:
case 11:
{
player.AttachedLevel.ItemDropCollected(this.DropType);
float num = 1f;
if (Game.PlayerStats.HasArchitectFee)
{
num = 0.6f;
}
int num2 = (int)Math.Round((double)(this.m_amount * (1f + player.TotalGoldBonus) * num), MidpointRounding.AwayFromZero);
Game.PlayerStats.Gold += num2;
textManager.DisplayNumberStringText(num2, "gold", Color.Yellow, new Vector2(base.X, (float)this.Bounds.Top));
if (this.DropType == 10)
{
base.PlayAnimation(1, 1, false);
return;
}
break;
}
case 2:
{
int num3 = (int)((float)player.MaxHealth * (this.m_amount + SkillSystem.GetSkill(SkillType.Potion_Up).ModifierAmount));
player.CurrentHealth += num3;
textManager.DisplayNumberStringText(num3, "hp recovered", Color.LawnGreen, new Vector2(base.X, (float)this.Bounds.Top));
SoundManager.Play3DSound(this, Game.ScreenManager.Player, "Collect_Health");
return;
}
case 3:
{
int num4 = (int)(player.MaxMana * (this.m_amount + SkillSystem.GetSkill(SkillType.Potion_Up).ModifierAmount));
player.CurrentMana += (float)num4;
textManager.DisplayNumberStringText(num4, "mp recovered", Color.LawnGreen, new Vector2(base.X, (float)this.Bounds.Top));
SoundManager.Play3DSound(this, Game.ScreenManager.Player, "Collect_Mana");
return;
}
case 4:
Game.PlayerStats.BonusStrength++;
textManager.DisplayStringNumberText("Attack Up", 1, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
return;
case 5:
Game.PlayerStats.BonusMagic++;
textManager.DisplayStringNumberText("Magic Up", 1, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
return;
case 6:
Game.PlayerStats.BonusDefense++;
textManager.DisplayStringNumberText("Armor Up", 2, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
return;
case 7:
Game.PlayerStats.BonusHealth++;
textManager.DisplayStringNumberText("Max Health Up", 5, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
player.CurrentHealth += 5;
return;
case 8:
Game.PlayerStats.BonusMana++;
textManager.DisplayStringNumberText("Max Mana Up", 5, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
player.CurrentMana += 5f;
return;
case 9:
Game.PlayerStats.BonusWeight++;
textManager.DisplayStringNumberText("Max Weight Up", 5, Color.LightSteelBlue, new Vector2(base.X, (float)this.Bounds.Top));
break;
default:
return;
}
}