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(); }
private IEnumerator ActivateOrpheusLyreCoroutine() { Visual.instance.disableInput(true); float timeMovement = Const.mediumCardTimeMovement; OneCardManager orpheusLyreCM = Visual.instance.GetOneCardManagerByName(Const.orpheuslyre, Visual.instance.TreasureHand.transform); VisualTool.DiscardCardToDiscardPile(target); VisualTool.DiscardCardToWinningPile(orpheusLyreCM); yield return(Const.mediumCardTimeMovement + EndTurn.SmallAmountOfTime); CardListChooser.instance.Hide(); VisualTool.SwitchAllControls(true); Visual.instance.disableInput(false); Command.CommandExecutionComplete(); }
private IEnumerator ActivateApolloBowTargetCoroutine() { Visual.instance.disableInput(true); float timeMovement = Const.mediumCardTimeMovement; OneCardManager apolloBowCM = Visual.instance.GetOneCardManagerByName(Const.apollobow, Visual.instance.TreasureHand.transform); GameLogicModifyGame.ApolloBowEffect(target.cardAsset); target.ReadCardFromAsset(); VisualTool.DiscardCardToDiscardPile(apolloBowCM, 0); yield return(timeMovement + EndTurn.SmallAmountOfTime); ApolloBowActivated.DeactivateTargets(); VisualTool.SwitchAllControls(true); Visual.instance.disableInput(false); Command.CommandExecutionComplete(); }
public static IEnumerator PansFluteEffectCoroutine() { //int numberofdiscard=Math.Min(2,Visual.instance.GetCurrentDeck().Count) yield return(new WaitForSeconds(.01f)); float firstMoveDuration = .35f; List <OneCardManager> decklist = Visual.instance.GetCurrentDeck(); int discardNumber = Math.Min(2, decklist.Count); for (int i = 0; i < discardNumber; i++) { OneCardManager cm = decklist[decklist.Count - i - 1]; yield return(new WaitForSeconds(.1f)); cm.transform.DOMove(Visual.instance.CardPointShuffle.transform.position, firstMoveDuration); yield return(new WaitForSeconds(.05f)); VisualTool.DiscardCardToDiscardPile(cm, firstMoveDuration); } yield return(new WaitForSeconds(firstMoveDuration * 3)); }
private IEnumerator DoCasualtiesCoroutine() { yield return(new WaitForSeconds(.2f)); GameLogicEvents.eventRemoveSingleEffects.Invoke(); if (Game.instance.Casualties > 0) { Vector2 pos = Visual.instance.LossCounter.transform.localPosition; DamageEffect.CreateDamageEffect(pos, Game.instance.Casualties); } List <OneCardManager> curEnc = Visual.instance.GetCurrentEncounter(); foreach (OneCardManager cm in curEnc) { yield return(new WaitForSeconds(EndTurn.SmallAmountOfTime)); bool isResolved = cm.cardAsset.resolved == ResolvedType.resolved_win; if (isResolved) { VisualTool.DiscardCardToWinningPile(cm); } else { VisualTool.DiscardCardToDiscardPile(cm); } } yield return(new WaitForSeconds(TimeMovement1 + DelayTime)); Debug.Log("CommandDoCasualties"); GameLogicModifyGame.DoCasualties(); GameLogicEvents.eventUpdateLossCounter.Invoke(); GameLogicEvents.eventUpdateCrewCounter.Invoke(); Command.CommandExecutionComplete(); }