Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        hero       = GlobalVariable.GetPlayerHero(HeroSlot);
        delayTimer = 0.0f;
        switch (HeroSlot)
        {
        case 1:
            Vector3 temp1 = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, hero.GetComponent <Hero>().transform.position.z);
            hero.GetComponent <Hero>().transform.position = temp1;
            break;

        case 2:
            Vector3 temp2 = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, hero.GetComponent <Hero>().transform.position.z);
            hero.GetComponent <Hero>().transform.position = temp2;
            break;

        case 3:
            Vector3 temp3 = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, hero.GetComponent <Hero>().transform.position.z);
            hero.GetComponent <Hero>().transform.position = temp3;
            break;

        default:
            break;
        }
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        // Use player team for hero images
        Hero1.sprite = GlobalVariable.GetPlayerHero(1).GetComponent <Hero>().GetSprite();
        Hero2.sprite = GlobalVariable.GetPlayerHero(2).GetComponent <Hero>().GetSprite();
        Hero3.sprite = GlobalVariable.GetPlayerHero(3).GetComponent <Hero>().GetSprite();

        Stats1.text = GlobalVariable.PrintPlayerHeroStats(1);
        Stats2.text = GlobalVariable.PrintPlayerHeroStats(2);
        Stats3.text = GlobalVariable.PrintPlayerHeroStats(3);

        Wave.text  = "Wave Reached: " + WaveManager.GetWaveNumber();
        Gold.text  = "Gold Earned: " + WaveManager.GetGoldEarned();
        Kills.text = "Kill Count: " + WaveManager.GetKillCount();

        ReturnToMainMenu.onClick.AddListener(delegate { BackToMainMenu(); });
    }