示例#1
0
    public void CheckEnemy()
    {
        BuildableObject b = this.GetComponent <BuildableObject>();

        if (b)
        {
            if (b.getTeam() == 2)
            {
                b.SetType("Outpost");
                b.SetLevel(1);
                b.BuildComplete();
            }
        }
    }
示例#2
0
    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);
            }
        }
    }