예제 #1
0
 public SpriteBatchCN(GraphicsDevice device)
     : base(device)
 {
     GraphicsDeviceManager graphics = (GraphicsDeviceManager)typeof(Terraria.Main).GetField("graphics").GetValue(null);
     _sf = new SpriteFontX(new Font("微软雅黑", 14f), graphics, TextRenderingHint.ClearTypeGridFit);
     _deathsfx = new SpriteFontX(new Font("微软雅黑", 18f), graphics, TextRenderingHint.ClearTypeGridFit);
     //_deathsf = (SpriteFont)typeof(Terraria.Main).GetField("fontDeathText").GetValue(null);
 }
예제 #2
0
파일: Game1.cs 프로젝트: safawu/project2006
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     SM = new SpriteManager(this.GraphicsDevice);
     SB = new SpriteBatch(this.GraphicsDevice);
     SFX = new SpriteFontX(new System.Drawing.Font("Tahoma", 15), this.graphics, TextRenderingHint.AntiAlias);
     IM = new InputManager();
     RD = new Random(550);
     MouseHandler.WheelHandler += MouseDown;
     KeyHandler.KeyHoldHandler += KeyDown;
     base.Initialize();
 }