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


C# Stat.ToString方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:phoenixanimations,项目名称:Port-02,代码行数:7,代码来源:Equipment_Foundation_Stats_Warning_GUI.cs

示例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
 }
开发者ID:Gayo,项目名称:XNAVERGE,代码行数:20,代码来源:Menu.cs


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