예제 #1
0
 void Awake()
 {
     player          = GameObject.FindGameObjectWithTag("Player");
     exp             = player.GetComponent <PlayerExperience>();
     playerAbilities = player.GetComponent <PlayerAbilities>();
     abilityImage    = this.gameObject.GetComponent <Image>();
     toolTip         = GameObject.Find("SkillToolTipText").GetComponent <SkillTooltip>();
     toolTipObject   = GameObject.Find("SkillToolTip");
     bar             = GameObject.Find("AbilityBarPanel").GetComponent <UIAbilityBar>();
 }
 private void Awake()
 {
     if (SceneManager.GetActiveScene().buildIndex == 1)
     {
         player      = GameObject.FindGameObjectWithTag("Player");
         abilities   = player.GetComponent <PlayerAbilities>();
         health      = player.GetComponent <PlayerHealth>();
         exp         = player.GetComponent <PlayerExperience>();
         equip       = player.GetComponent <PlayerEquip>();
         movement    = player.GetComponent <PlayerMovement>();
         inventory   = GameObject.Find("Inventory").GetComponent <Inventory>();
         uiInventory = GameObject.Find("InventoryPanel").GetComponent <UIInventory>();
         abilityBar  = GameObject.Find("AbilityBarPanel").GetComponent <UIAbilityBar>();
         //skillCanvas = GameObject.Find("SkillPanel").GetComponent<SkillCanvas>();
     }
 }