Esempio n. 1
0
 public void StartToBuild(int owner)
 {
     stat = GetComponent <UnitStatSystem>();
     models.transform.position += Vector3.down * 50;
     stat.SetOwner(owner);
     StartCoroutine(BuildingConstrutMove(models.transform, this.transform.position, buildTime));
 }
Esempio n. 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);
        }
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     stat = GetComponent <UnitStatSystem>();
     stat.SetOwner(stat.GetOwner());
 }
 public void SetOwner(int own)
 {
     stat = this.GetComponent <UnitStatSystem>();
     stat.SetOwner(own);
 }