Beispiel #1
0
    private void Seek()
    {
        foreach (GameObject GO in Cells)
        {
            Cell z;

            if (GO.TryGetComponent <Cell>(out z))
            {
                if (z.Team is Bot)
                {
                    SelectedOnBot.Add(z);
                }
                else
                {
                    targetList.Add(z);
                }
            }
        }
    }
    void Awake()
    {
        Cells = new List <Cell>();

        botWin    = false;
        playerWin = false;

        Cell.TeamChange += OnTeamChange;

        foreach (GameObject GO in GameObject.FindGameObjectsWithTag("Cell"))
        {
            Cell z;

            if (GO.TryGetComponent <Cell>(out z))
            {
                Cells.Add(z);
            }
        }
    }