Exemple #1
0
    public void DestroyElement(SystemElementController elementController)
    {
        var element = elementController.SystemElement;
        var player  = virus.Value;

        player.ActionPoints    -= element.DestroyCost;
        player.MaxActionPoints += element.DestroyReward;

        element.IsDestroyed = true;
        element.IsHacked    = false;
        element.OwnerVirus  = player;

        elementController.DestroyView();

        destroyElement.Invoke(elementController, virus);
    }