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)); }
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); } }
// 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); }