コード例 #1
0
    private void SelectTower()
    {
        TowerInterface tower = GetTowerInterface();

        if (currentTower == tower)
        {
            return;
        }

        if (tower != null && tower.GetState() == TowerInterface.State.Building)
        {
            return;
        }

        if (currentTower != null)
        {
            currentTower.materialChanger.RevertMaterial();
        }

        currentTower = tower;

        if (currentTower != null)
        {
            currentTower.materialChanger.ChangeMaterial(HighlightMaterial);
        }
    }
コード例 #2
0
    private void ServerRepairTower(TowerInterface tower, NetworkConnectionToClient conn = null)
    {
        if (tower == null || tower.GetState() != TowerInterface.State.Default)
        {
            ClientFinishedOrCanceledRepairingTower();
        }

        Repairing = ServerRepairingTower(tower);
        StartCoroutine(Repairing);
    }