// Use this for initialization
    void Start()
    {
        if (gameManager.showUpgradeMenu)
        {
            eventSystem      = GameObject.Find("EventSystem").GetComponent <EventSystem>();
            stats            = GameObject.Find("DungeonMaster").GetComponent <DungeonMaster> ().playerStats;
            upgradeSound     = GameObject.Find("UpgradeAudio").GetComponent <AudioSource> ();
            fullUpgradeSound = GameObject.Find("FullUpgradeAudio").GetComponent <AudioSource> ();
            swordDamageBtn   = GameObject.Find("SwordDamage").GetComponent <Button> ();
            swordRoFBtn      = GameObject.Find("SwordRoF").GetComponent <Button> ();
            swordSpecialBtn  = GameObject.Find("AoE").GetComponent <Button> ();

            bowDamageBtn  = GameObject.Find("BowDamage").GetComponent <Button> ();
            bowRoFBtn     = GameObject.Find("BowRoF").GetComponent <Button> ();
            bowSpecialBtn = GameObject.Find("MultiShot").GetComponent <Button> ();

            healthBtn  = GameObject.Find("Health").GetComponent <Button> ();
            staminaBtn = GameObject.Find("Stamina").GetComponent <Button> ();
            agilityBtn = GameObject.Find("Agility").GetComponent <Button> ();

            bowUpgrades    = GameObject.Find("BowUpgrades").GetComponent <Image> ();
            swordUpgrades  = GameObject.Find("SwordUpgrades").GetComponent <Image> ();
            playerUpgrades = GameObject.Find("PlayerUpgrades").GetComponent <Image> ();
            descriptionBG  = GameObject.Find("DescriptionBG");
            descriptionBG.SetActive(false);
            upgradeDescription   = GameObject.Find("UpgradeDescription").GetComponent <Text> ();
            nextLevelDescription = GameObject.Find("NextLevelDescription").GetComponent <Text> ();
            upgradeCost          = GameObject.Find("UpgradeCost").GetComponent <Text> ();
            currentPoints        = GameObject.Find("PlayerSkills").transform.Find("CurrentPoints").GetComponent <Text>();

            //BOW
            multiShotProgress = GameObject.Find("MultiShotProgress").GetComponent <Text> ();
            bowDamageProgress = GameObject.Find("BowDamageProgress").GetComponent <Text> ();
            bowRoFProgress    = GameObject.Find("BowRoFProgress").GetComponent <Text> ();

            //PLAYER
            healthProgress  = GameObject.Find("HealthProgress").GetComponent <Text> ();
            staminaProgress = GameObject.Find("StaminaProgress").GetComponent <Text> ();
            agilityProgress = GameObject.Find("AgilityProgress").GetComponent <Text> ();

            //SWORD
            swordDamageProgress = GameObject.Find("SwordDamageProgress").GetComponent <Text> ();
            swordRoFProgress    = GameObject.Find("SwordRoFProgress").GetComponent <Text> ();
            aoeProgress         = GameObject.Find("AoEProgress").GetComponent <Text> ();
        }
    }
    void Start()
    {
        /// Initializations
        soundFX           = GetComponent <audioPlay>();
        swordAoE          = GameObject.Find("SwordColl").GetComponent <SphereCollider> ();
        cameraShake.shake = 0;
        isDead            = false;
        stats             = GameObject.Find("DungeonMaster").GetComponent <DungeonMaster> ().playerStats;
        ui              = GameObject.FindGameObjectWithTag("UI").GetComponent <uiDisplay> ();
        shootArrow      = gameObject.GetComponentInChildren <ShootArrow> ();
        shootMultiArrow = gameObject.GetComponentInChildren <ShootMultiArrow> ();
        changeWeapon(0);
        controller = this.gameObject.GetComponent <CharacterController> ();
        ReceiverDamage receiver = GetComponent <ReceiverDamage> ();

        if (receiver == null)
        {
            print("RECEIVER IS NULL");
        }
        else
        {
            receiver.setStats(stats);
        }

        SenderDamage[] sender = GetComponentsInChildren <SenderDamage> ();
        if (sender != null)
        {
            foreach (SenderDamage sd in sender)
            {
                Debug.Log(sd.gameObject.name);
                sd.setStats(stats);
            }
        }
        ui.UpdateHealth(stats.getCurHealth(), stats.getMaxHealth());
        cc = gameObject.GetComponent <CharacterController> ();
        rb = gameObject.GetComponent <Rigidbody> ();

        concealed = false;
    }