Exemplo n.º 1
0
    public void Destroy()
    {
        if (p == "my")
        {
            if (unitData.Name == "作战实验室")
            {
                GameFightData.level = 2;
            }
            if (unitData.Name == "兵营")
            {
                GameFightData.level = 1;
            }
            if (unitData.Name == "发电厂")
            {
                GameFightData.eff = 0;
            }
            if (unitData.Type == "建筑" || unitData.Name == "核弹发射井")
            {
                gameManger.BanToggleFromId(unitData.Id, false);
            }
        }
        else
        {
            GameFightData.p2UnitSum++;
            if (unitData.Name != "核弹发射井")
            {
                gameManger.addMoney.text = "+" + (unitData.Cost / 2);
                GameFightData.p1money   += unitData.Cost / 2;
            }
        }

        Destroy(this.gameObject);
    }