public void CheckEnemy() { BuildableObject b = this.GetComponent <BuildableObject>(); if (b) { if (b.getTeam() == 2) { b.SetType("Outpost"); b.SetLevel(1); b.BuildComplete(); } } }
public void CheckEnemy() { BuildableObject b = this.GetComponent <BuildableObject>(); if (b) { if (b.getTeam() == 2) { b.SetType("TownCenter"); b.SetLevel(1); GameManager.Instance.setTownCenter(this); b.BuildComplete(); } else { GameManager.Instance.setTownCenter(this); } } }