本文整理汇总了C#中UIWindow.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# UIWindow.Hide方法的具体用法?C# UIWindow.Hide怎么用?C# UIWindow.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIWindow
的用法示例。
在下文中一共展示了UIWindow.Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
public void Awake()
{
window = GetComponent<UIWindow>();
InventoryTriggererManager.instance.OnChangedBestTriggerer += (before, after) =>
{
if (after != null)
Repaint(after.uiIcon, after.triggerKeyCode.ToString());
else
window.Hide();
};
}
示例2: Awake
public void Awake()
{
if (InventoryManager.instance.craftingStandard == null)
{
Debug.LogWarning("Crafting triggerer in scene, but no crafting window found", transform);
return;
}
window = InventoryManager.instance.craftingStandard.window;
triggerer = GetComponent<ObjectTriggerer>();
triggerer.window = window;
triggerer.handleWindowDirectly = false; // We're in charge now :)
if (triggerer.window == null)
{
Debug.LogWarning("Crafting triggerer created but no CraftingStandardUI found in scene, or not set in managers.", transform);
return;
}
window.OnHide += () =>
{
currentCraftingStation = null;
};
triggerer.OnTriggerUse += (player) =>
{
window.Toggle();
if (window.isVisible)
{
currentCraftingStation = this;
InventoryManager.instance.craftingStandard.SetCraftingCategory(category);
}
};
triggerer.OnTriggerUnUse += (player) =>
{
if (currentCraftingStation == this)
window.Hide();
};
}