// メソッド public void tPrint(int x, int y, EFontType font, string str英数字文字列) { if (!base.bNotActivated && !string.IsNullOrEmpty(str英数字文字列)) { int BOL = x; for (int i = 0; i < str英数字文字列.Length; i++) { char ch = str英数字文字列[i]; if (ch == '\n') { x = BOL; y += nFontHeight; } else { int index = str表記可能文字.IndexOf(ch); if (index < 0) { x += nFontWidth; } else { if (this.txフォント8x16[(int)((int)font / (int)EFontType.WhiteThin)] != null) { this.txフォント8x16[(int)((int)font / (int)EFontType.WhiteThin)].tDraw2D(CDTXMania.app.Device, x, y, this.rc文字の矩形領域[(int)((int)font % (int)EFontType.WhiteThin), index]); } x += nFontWidth; } } } } }
// メソッド public void tPrint(int x, int y, EFontType font, string str英数字文字列) { if (!base.b活性化してない && !string.IsNullOrEmpty(str英数字文字列)) { int BOL = x; for (int i = 0; i < str英数字文字列.Length; i++) { char ch = str英数字文字列[i]; if (ch == '\n') { x = BOL; y += nFontHeight; } else { int index = str表記可能文字.IndexOf(ch); if (index < 0) { x += nFontWidth; } else { if (this.txフォント8x16[(int)((int)font / (int)EFontType.白細)] != null) { this.txフォント8x16[(int)((int)font / (int)EFontType.白細)].t2D描画(TJAPlayer3.app.Device, x, y, this.rc文字の矩形領域[(int)((int)font % (int)EFontType.白細), index]); } x += nFontWidth; } } } } }
/* * fontType: The font type * id: Font id * name: Font name * spriteFont: The actual font * text: The fonts text * position: Position or start position of the font (if it is moving) * color: The color of the font * timeToFinish: The time (in seconds) it takes for the font to vanish. -1.0 if you dont want it to vanish * */ public Font(EFontType fontType, int id, string name, SpriteFont spriteFont, string text, Vector2 position, Color color, float timeToFinish) { this.fontType = fontType; this.id = id; this.name = name; active = true; this.spriteFont = spriteFont; this.text = text; this.position = position; speed = 0.0f; this.color = color; this.timeToFinish = timeToFinish; lifetime = 0.0f; }