private void Awake() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCharacter>(); playerCharacterUI = GameObject.FindGameObjectWithTag("CharacterCanvas").GetComponentInChildren <PlayerCharacterUI>(); gainsUI = GameObject.FindGameObjectWithTag("GainsCanvas").GetComponent <GainsUI>(); skillsUI = GameObject.FindGameObjectWithTag("SkillCanvas").GetComponentInChildren <SkillsUI>(); inventoryUI = GameObject.FindGameObjectWithTag("InventoryCanvas").GetComponentInChildren <InventoryUI>(); uiEffects = GameObject.FindGameObjectWithTag("EffectsCanvas").GetComponent <UIEffects>(); dialogueSelectionUI = GameObject.FindGameObjectWithTag("DialogueCanvas").GetComponentInChildren <DialogueSelectionUI>(); actualDialogueUI = GameObject.FindGameObjectWithTag("DialogueCanvas").GetComponentInChildren <DialogueUI>(); questUI = GameObject.FindGameObjectWithTag("QuestCanvas").GetComponentInChildren <QuestUI>(); }
void Start() { hasBeenHitted = new List<int>(); _collider = GetComponent<Collider>(); currentHealth = maxHealth; if (healthBar != null) healthBar.SetMaxHealth(maxHealth); try { if (SceneManager.GetActiveScene().name != "hub") { gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent<GameManager>(); } } catch (System.Exception e) { //Debug.Log(e.Message); } distToGround = _collider.bounds.extents.y; normalSpeed = moveSpeed; skillTree = (SkillTree)GameObject.Find("SkillTree").GetComponent("SkillTree"); skillsUI = (SkillsUI)GameObject.Find("SkillsUI").GetComponent("SkillsUI"); playerAttackEvent.typeOfShoot = PlayerAttackEvent.TypeOfShoot.normal; }
// Use this for initialization void Start() { Instance = this; }
private void Awake() { ui = GameObject.FindGameObjectWithTag("SkillCanvas").GetComponentInChildren <SkillsUI>(); }