Ejemplo n.º 1
0
    public override void Init()
    {
        base.Init();
        if (cargoKart == null)
        {
            cargoKart = FindObjectOfType <CargoKart>();
        }
        fireHero  = FindObjectOfType <FireHero>();
        waterHero = FindObjectOfType <WaterHero>();

        cargoKart.Init(this, false, 1);

        heroList.AddRange(FindObjectsOfType <HeroObject>());
        for (int i = 0; i < heroList.Count; i++)
        {
            heroList[i].Init(this, false, 1);
        }
    }
Ejemplo n.º 2
0
    public override void Init()
    {
        base.Init();
        CargoKart tempCargoKart = FindObjectOfType <CargoKart>();

        if (cargoKart != null)
        {
            Destroy(cargoKart.gameObject);
        }
        cargoKart = tempCargoKart;
        cargoKart.Init(this, false, 1);

        heroList = new List <BaseHero>();
        heroList.AddRange(FindObjectsOfType <BaseHero>());
        for (int i = 0; i < heroList.Count; i++)
        {
            //default level is 1
            heroList[i].Init(this, false, 1);
        }
        //director.StartBattle();
        Debug.Log("<color=green>Battle state  </color>" + director.GetBattleState());
    }