// public IEnumerator ShowEffectStart() { showEffect = true; for (int i = 0; i < 3; i++) { GameObject Effect = EffectStart.GetChild(i).gameObject; Effect.SetActive(true); TweenAlpha twA = TweenAlpha.Begin(Effect, 2f, Effect.GetComponent <SpriteRenderer>().color.a); twA.from = 0; yield return(new WaitForSeconds(0.33f)); } }
public IEnumerator HideEffectStart() { showEffect = false; GameObject Effect = EffectStart.gameObject; for (int i = 0; i < 3; i++) { TweenAlpha.Begin(EffectStart.GetChild(i).gameObject, 2f, 0); } yield return(new WaitForSeconds(2f)); isProtected = false; Destroy(Effect); }
/// <summary> /// Starts the effect duration and raises the <see cref="EffectStart"/> event. /// </summary> public void StartEffect() { bool wasEffectActive = IsEffectActive; IsEffectActive = true; CooldownTime = EffectDuration; KillButtonManager.TimerText.Color = new Color(0F, 0.8F, 0F); if (!wasEffectActive) { EffectStart?.SafeInvoke(this, EventArgs.Empty, nameof(EffectStart)); } }
public MoveArchetype(string name, MoveType moveType, ElementType elementType, int maxPp, int power, int accuracy, DurationType durationType, int turnDuration, BattleEffectStageEffect battleEffectStageEffect, EffectType effectType, EffectStart effectStart, MoveTarget moveTarget, BattleEffectType battleEffectType, string battleEffectText) { Name = name; MoveType = moveType; ElementType = elementType; MaxPP = maxPp; Power = power; Accuracy = accuracy; TurnDuration = turnDuration; BattleEffectStageEffect = battleEffectStageEffect; EffectType = effectType; EffectStart = effectStart; MoveTarget = moveTarget; DurationType = durationType; BattleEffectType = battleEffectType; BattleEffectText = battleEffectText; }