public void SetOwner(int num)
    {
        owner = num;
        TeamColorSystem tc = GetComponent <TeamColorSystem>();

        tc.ChangeColor(owner);
    }
Example #2
0
    public void SetOwner(int own)
    {
        ownerNum = own;
        TeamColorSystem teamCol = GetComponent <TeamColorSystem>();

        teamCol.ChangeColor(ownerNum);
        foreach (GameObject uni in unitList)
        {
            UnitStatSystem sta = uni.GetComponent <UnitStatSystem>();
            sta.SetOwner(ownerNum);
        }
    }