本文整理汇总了C#中EnemyController.PassUI方法的典型用法代码示例。如果您正苦于以下问题:C# EnemyController.PassUI方法的具体用法?C# EnemyController.PassUI怎么用?C# EnemyController.PassUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EnemyController
的用法示例。
在下文中一共展示了EnemyController.PassUI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
void Start()
{
//_ancestor = FindObjectOfType<Ancestor>();
foreach(Ancestor ancestor in FindObjectsOfType<Ancestor>())
{
if (ancestor._isPlayer==true)
{
_ancestor = ancestor;
}
}
_ancestor.PassUI(this);
_hero = FindObjectOfType<HeroController>();
_hero.PassUI(this);
_enemy = FindObjectOfType<EnemyController>();
_enemy.PassUI(this);
_enemyManager = FindObjectOfType<EnemyManager>();
_enemyManager.PassUI(this);
VictoryScreen.SetActive (false);
LossScreen.SetActive (false);
//_intervalIndicator.value = 0;
_heroHealth.value = 1;
_enemyHealth.value = 1;
_playerIcon.transform.FindChild("Icon").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorIcon;
_playerIcon.transform.FindChild("Background").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorBg;
_button1.transform.FindChild("Icon").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._action1._actionIcon;
_button1.transform.FindChild("Background").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorBg;
_button2.transform.FindChild("Icon").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._action2._actionIcon;
_button2.transform.FindChild("Background").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorBg;
_button3.transform.FindChild("Icon").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._action3._actionIcon;
_button3.transform.FindChild("Background").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorBg;
ExitButton.transform.FindChild("Background").GetComponent<UnityEngine.UI.Image>().sprite = _ancestor._ancestorBg;
}