当前位置: 首页>>代码示例>>C#>>正文


C# TextManager.DisplayStringNumberText方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:Neojin9,项目名称:RLRedux,代码行数:70,代码来源:ItemDropObj.cs


注:本文中的TextManager.DisplayStringNumberText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。