Example #1
0
    void Start()
    {
        //assign values depending on hero and enemy levels
        Hero1Data.Awake();
        Hero2Data.Awake();
        Hero3Data.Awake();
        Hero4Data.Awake();
        Enemy1Data.Awake();
        Enemy2Data.Awake();
        Enemy3Data.Awake();
        Enemy4Data.Awake();

        //begin turn cycler
        FightStates = FightState.ENTERFIGHT;
        StateControl();

        //add assigned heros and enemies to their respective lists
        if (Hero1Data != null)
        {
            baseHeros.Add(Hero1Data);
        }
        if (Hero2Data != null)
        {
            baseHeros.Add(Hero2Data);
        }
        if (Hero3Data != null)
        {
            baseHeros.Add(Hero3Data);
        }
        if (Hero4Data != null)
        {
            baseHeros.Add(Hero4Data);
        }

        if (Enemy1Data != null)
        {
            baseEnemies.Add(Enemy1Data);
        }
        if (Enemy2Data != null)
        {
            baseEnemies.Add(Enemy2Data);
        }
        if (Enemy3Data != null)
        {
            baseEnemies.Add(Enemy3Data);
        }
        if (Enemy4Data != null)
        {
            baseEnemies.Add(Enemy4Data);
        }

        //instantiate enemy prefabs
        InstantiateEnemies();

        //cycle turn
        Invoke("Delay", 1);
    }