private IEnumerator ActivateAegisOfZeusCoroutine() { Visual.instance.disableInput(true); float timeMovement = Const.mediumCardTimeMovement; HelmOfHadesTarget targetcomponent = target.GetComponent <HelmOfHadesTarget>(); HelmOfHadesTarget[] targetsarray = GameObject.FindObjectsOfType <HelmOfHadesTarget>(); foreach (var VARIABLE in targetsarray) { if (VARIABLE != targetcomponent) { GameObject.DestroyImmediate(VARIABLE); } } HelmOfHadesActivated[] arractivated = GameObject.FindObjectsOfType <HelmOfHadesActivated>(); HelmOfHadesActivated activated = arractivated[0]; OneCardManager helmcm = activated.GetComponent <OneCardManager>(); VisualTool.DiscardCardToWinningPile(helmcm); VisualTool.DiscardCardToDiscardPile(target); GameLogicEvents.eventUpdateCurrentEncounter.Invoke(); GameLogicEvents.eventUpdateLossCounter.Invoke(); yield return(Const.mediumCardTimeMovement + EndTurn.SmallAmountOfTime); VisualTool.SwitchAllControls(true); Visual.instance.disableInput(false); Command.CommandExecutionComplete(); }
public void OnPointerDown(PointerEventData eventData) { OneCardManager oneCardManager = this.GetComponent <OneCardManager>(); bool customActivation = false; if (oneCardManager.cardAsset.effecttype == Effect.EffectType.AegisOfZeus_IgnoreDeadliness_single && GameLogic.CanUseEffect(oneCardManager.cardAsset.effecttype)) { AegisOfZeusActivated component = oneCardManager.gameObject.GetComponent <AegisOfZeusActivated>(); if (!component.enabled) { component.Activate(); } customActivation = true; } ; if (oneCardManager.cardAsset.effecttype == Effect.EffectType.HelmOfHades_MoveMonsterToDiscardPile_single && GameLogic.CanUseEffect(oneCardManager.cardAsset.effecttype)) { HelmOfHadesActivated component = oneCardManager.gameObject.GetComponent <HelmOfHadesActivated>(); if (!component.isActivated) { GameLogicEvents.eventCardVisual.Invoke(oneCardManager); component.Activate(); } else { component.DeActivate(); } customActivation = true; } ; if (oneCardManager.cardAsset.effecttype == Effect.EffectType.ApolloBow_RollDice6_single && GameLogic.CanUseEffect(oneCardManager.cardAsset.effecttype)) { ApolloBowActivated component = oneCardManager.gameObject.GetComponent <ApolloBowActivated>(); if (component.Activated) { component.Deactivate(); } else { component.Activate(); } customActivation = true; } if (oneCardManager.cardAsset.effecttype == Effect.EffectType.OrpheusLyre_StopLevelUpMonsterInVictoryPile_single && GameLogic.CanUseEffect(oneCardManager.cardAsset.effecttype)) { OrpheusLyreActivated component = oneCardManager.gameObject.GetComponent <OrpheusLyreActivated>(); if (component.Activated) { component.Deactivate(); } else { component.Activate(); } customActivation = true; } ; if (!customActivation) { DialogActivateSingleUsedTreasure.instance.activatedCard = oneCardManager; DialogActivateSingleUsedTreasure.instance.Show(eventData.position); } }