本文整理汇总了C#中Stat.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Stat.ToString方法的具体用法?C# Stat.ToString怎么用?C# Stat.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stat
的用法示例。
在下文中一共展示了Stat.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Check_For_Wrong_Stats
public void Check_For_Wrong_Stats(ref Equipment_Foundation Weapon_Editor, Stat Select_Stat)
{
if (Weapon_Editor.Get_Stat(Select_Stat) != 0)
{
EditorGUILayout.HelpBox(Select_Stat.ToString() + " is not equal to zero, if this is okay contact me",MessageType.Warning);
}
}
示例2: MenuPrintStat
// This really shouldn't be in the submenu. Meeeh, porting is fun.
public void MenuPrintStat( int x, int y, Stat stat, int value, Color c )
{
// Current HP/MP aren't stats in the same sense as the maximums, so they're not drawn by
// this function. They get drawn by a separate function, MenuBlitCast in menu_system.vc.
// It's kind of weird, but that's how Zip coded it.
if( stat == Stat.HP ) { // HP gets drawn in its own place
//PrintTextRight( x + 115 + TextWidth( menu_font[0], "MP:000/000" ), y + 10, screen, menu_font[0], str( value ) );
return;
}
if( stat == Stat.MP ) { // MP gets drawn in its own place
//PrintTextRight( x + 115 + TextWidth( menu_font[0], "MP:000/000" ), y + 20, screen, menu_font[0], str( value ) );
return;
}
// Other stats get printed in order in a two-line block.
int xpos = ( (int)stat ) / 2; // This ensures that the stats are printed across two lines.
int ypos = ( (int)stat ) % 2; // This ensures that even-numbered stats go on the top row while odd-numbered stats go on the bottom
PrintText( stat.ToString(), x + ( 32 * xpos ) - 32, y + 35 + ( 24 * ypos ), c ); // print name
PrintText( "" + value, x + ( 32 * xpos ) - 32, y + 45 + ( 24 * ypos ), c ); // print value
}