void Start()
    {
        uiController = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<FightSceneUIController>();

        for (int i = 0; i < 6; i++) {
            GameObject enemy = Instantiate(Resources.Load<GameObject>("Prefabs/Enemy/YuRen"));
            enemy.transform.position = new Vector3(-25.0f, enemy.transform.position.y, -10 + i * 3);
            enemyList.Add(enemy);
        }

        for (int i = 0; i < 2; i++) {
            string name = i == 0 ? "AiGe" : "GuiWuShi";
            GameObject hero = Instantiate(Resources.Load<GameObject>("Prefabs/Hero/" + name));
            hero.transform.position = new Vector3(0, hero.transform.position.y, -5 + i * 10);
            heroList.Add(hero);
        }
    }
Example #2
0
 void Start()
 {
     uiController = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<FightSceneUIController>();
     hpBar = uiController.createHPBar(transform.position, Type);
 }