本文整理汇总了C#中Action.AddMinoredIntegerParam方法的典型用法代码示例。如果您正苦于以下问题:C# Action.AddMinoredIntegerParam方法的具体用法?C# Action.AddMinoredIntegerParam怎么用?C# Action.AddMinoredIntegerParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action.AddMinoredIntegerParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetServerActionHierarchy
private void SetServerActionHierarchy(SFSObject hierarchy)
{
serverActionHierarchy = new ActionList();
for (int a = 0; a < hierarchy.Size(); a++)
{
SFSObject actionObject = hierarchy.GetObj(Convert.ToString(a));
Action action = new Action();
action.name = actionObject.GetString("n");
int numParam = actionObject.Size();
for (int i = 0; i < numParam - 1; i++)
{
SFSObject param = actionObject.GetObj(Convert.ToString(i));
string paramName = param.GetString("n");
string paramType = param.GetString("t");
switch (paramType)
{
case "b" ://boolean
bool boolValue = param.GetBool("v");
action.AddBoolParam(paramName, boolValue);
break;
case "maq"://maximum quantity (integer > 0 or "MAX")
//
break;
case "miq"://minimum quantity (integer > 0 or "MIN")
//
break;
case "n"://integer with min and max values
//
break;
case "mi"://minored integer : integer with min value or "INF"
string value = param.GetString("v");
int minValue = (int) param.GetNumber("m");
action.AddMinoredIntegerParam(paramName, value, minValue);
break;
case "ii"://inventory item
//
break;
case "it"://item type
//
break;
case "am"://actionMark (an absolute position or the position of a physical entity marked by the player or his faction)
bool playerIsMarkOwner = param.GetBool("o");
int actionMarkID = (int)param.GetNumber("n");
action.AddActionMark(paramName, playerIsMarkOwner, actionMarkID);
break;
case "c"://character (player or npc)
//
break;
case "s"://string message
//
break;
}
}
serverActionHierarchy.Add(action);
}
}