Пример #1
0
 public new void DrawString(SpriteFont sfx, string str, Vector2 position, Microsoft.Xna.Framework.Color color)
 {
     //sfx.
     _deathsf = (SpriteFont)typeof(Terraria.Main).GetField("fontDeathText").GetValue(null);
     if (_deathsf!=null&&_deathsf.Equals(sfx))
     {
         _deathsfx.Draw(this, str, position, color);
         return;
     }
      _sf.Draw(this, str, position, color);
 }
Пример #2
0
 public new void DrawString(SpriteFont sfx, string str, Vector2 position, Microsoft.Xna.Framework.Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
 {
     if (str == "弹药" || str == "钱币")
     {
         if (position.X == 532f && position.Y == 65.1f)
         {
             position.Y = 67.8f;
         }
         scale = 0.8f;
     }
     //}else if(str == "设置")
     //{
     //    if (position.X > 1800f && position.Y > 990f)
     //    {
     //        scale = 1f;
     //    }
     //}
     _deathsf = (SpriteFont)typeof(Terraria.Main).GetField("fontDeathText").GetValue(null);
     //_deathsfx.
     if (_deathsf != null && _deathsf.Equals(sfx))
     {
         _deathsfx.Draw(this, str, position - origin, new Vector2(float.MaxValue, float.MaxValue), new Vector2(scale, scale), color);
         return;
     }
     // sfx.
     _sf.Draw(this, str, position - origin, new Vector2(float.MaxValue, float.MaxValue), new Vector2(scale, scale), color);
 }
Пример #3
0
 public new void DrawString(SpriteFont sfx, string str, Vector2 position, Microsoft.Xna.Framework.Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
 {
     _deathsf = (SpriteFont)typeof(Terraria.Main).GetField("fontDeathText").GetValue(null);
     if (_deathsf != null && _deathsf.Equals(sfx))
     {
         _deathsfx.Draw(this, str, position - origin, new Vector2(float.MaxValue, float.MaxValue), scale, color);
         return;
     }
     _sf.Draw(this, str, position - origin, new Vector2(float.MaxValue, float.MaxValue), scale, color);
 }