本文整理汇总了C#中IExecutor.execute方法的典型用法代码示例。如果您正苦于以下问题:C# IExecutor.execute方法的具体用法?C# IExecutor.execute怎么用?C# IExecutor.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExecutor
的用法示例。
在下文中一共展示了IExecutor.execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: drawGroup
/// <summary>
/// It draws a group with label and a button. When button is clicked, given executor will get executed.
/// </summary>
/// <param name="boxTitle">
/// The title of the box.
/// </param>
/// <param name="buttonText">
/// Label for the button.
/// </param>
/// <param name="groupStartY">
/// Start position for Y coordinate.
/// </param>
/// <param name="executor">
/// To be executed when button is clicked.
/// </param>
protected float drawGroup(string boxTitle, string buttonText, float groupStartY, IExecutor executor)
{
Vector2 startPoint = new Vector2(0, 0);
GUI.BeginGroup(new Rect (0.0f, groupStartY, boxWidth, boxHeight));
GUI.Box(new Rect (0, 0, boxWidth, boxHeight), boxTitle);
startPoint.y += boxTitleSeparator * 2;
if (GUI.Button(new Rect (boxWidth / 2 - buttonWidth / 2, startPoint.y, buttonWidth, buttonHeight), buttonText)) {
executor.execute();
}
GUI.EndGroup();
return boxHeight + groupHeightSeparator;
}