private IEnumerator FollowPath() { Int32 idx = 0; if (m_MarkusWolfView == null) { m_MarkusWolfView = ViewManager.Instance.FindView(m_MarkusWolfSpawnerID); } if (m_MarkusWolfView != null) { AnimatorControl animControl = m_MarkusWolfView.GetComponentInChildren <AnimatorControl>(); animControl.AttackMagic(3); while (idx < m_MarkusMovePoints.Length) { Vector3 targetPos = transform.TransformPoint(m_MarkusMovePoints[idx].Position); Quaternion targetDir = Quaternion.Euler(m_MarkusMovePoints[idx].LookDirection); animControl.MoveTo(targetPos, targetDir); if (2f >= Vector3.Distance(targetPos, m_MarkusWolfView.transform.position)) { idx++; } else { yield return(null); } } } Monster entity = LegacyLogic.Instance.WorldManager.FindObject(m_MarkusWolfSpawnerID) as Monster; if (entity != null) { entity.Move(new Position(m_MarkusWolfMoveToX, m_MarkusWolfMoveToY), m_MarkusWolfLooAt, false); } yield break; }
private void Start() { if (Model == null || ParticlePrefabs == null || MovingPrefab == null) { Debug.LogError("CharacterReplacementFX: model or particles prefabs not set!"); enabled = false; return; } Model.AttackMagic(MagicAnimID); GoToState_BEFORE_FREEZE(); }
private void StartAnimation() { m_AnimatorControl.AttackMagic(); }
public void MonsterCastSpell(ETarget target, TestSpell spell) { m_LastSpellIsMonster = false; m_LastSpell = spell; m_TargetOrWizard = target; FXDescription fxdescription = Helper.ResourcesLoad <FXDescription>(spell.EffectPath, false); if (fxdescription == null) { Debug.LogError("FXDescription not found! at " + spell.EffectPath, this); return; } if (target == ETarget.Party) { target = (ETarget)UnityEngine.Random.Range(1, 4); } GameObject gameObject; switch (target) { case ETarget.Member1: gameObject = m_Member1; break; case ETarget.Member2: gameObject = m_Member2; break; case ETarget.Member3: gameObject = m_Member3; break; case ETarget.Member4: gameObject = m_Member4; break; default: return; } Vector3 forward = m_ActiveMonster.transform.forward; Vector3 p_slotLeft = -m_ActiveMonster.transform.right; m_ActiveMonsterAnimationHandler.AttackMagic(spell.AnimationNum); AnimatorEventHandler component = m_ActiveMonsterAnimationHandler.GetComponent <AnimatorEventHandler>(); GameObject activeMonster = m_ActiveMonster; ETargetType targetType = spell.TargetType; FXArgs p_args; if ((targetType & ETargetType.MULTY) == ETargetType.MULTY) { p_args = new FXArgs(activeMonster, m_PartySlot, activeMonster, m_PartySlot, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject> { m_Member1, m_Member2, m_Member3, m_Member4 }); } else if ((targetType & ETargetType.SINGLE) == ETargetType.SINGLE) { p_args = new FXArgs(activeMonster, gameObject, activeMonster, gameObject, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject> { gameObject }); } else if ((targetType & ETargetType.ADJACENT) == ETargetType.ADJACENT) { p_args = new FXArgs(activeMonster, activeMonster, activeMonster, activeMonster, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject> { gameObject }); } else { p_args = new FXArgs(activeMonster, activeMonster, activeMonster, activeMonster, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject> { gameObject }); } fxdescription = Helper.Instantiate <FXDescription>(fxdescription); fxdescription.Configurate(component, p_args); }
protected virtual void OnEntityCastSpell(Object p_sender, EventArgs p_args) { if (p_sender != MyController) { return; } SpellEventArgs args = (SpellEventArgs)p_args; MonsterSpell spell = (MonsterSpell)args.Spell; EventHandler eventHandler = delegate(Object sender, EventArgs e) { DelayedEventManager.InvokeEvent(EDelayType.ON_FX_HIT, EEventType.MONSTER_CAST_SPELL, p_sender, args); MyController.AttackingDone.Trigger(); if (spell.SpellType == EMonsterSpell.FLICKER) { m_MainView.SetEntityPosition(); } if (MyController is Monster) { ((Monster)MyController).BuffHandler.FlushActionLog(MonsterBuffHandler.ELogEntryPhase.ON_CAST_SPELL); ((Monster)MyController).BuffHandler.RemoveFlaggedBuffs(); } SpellEffectEntryEventArgs p_args9 = new SpellEffectEntryEventArgs(p_sender, args); LegacyLogic.Instance.ActionLog.PushEntry(p_args9); foreach (SpellTarget spellTarget2 in args.SpellTargets) { if (spellTarget2.Target is Character) { ((Character)spellTarget2.Target).ConditionHandler.FlushActionLog(); ((Character)spellTarget2.Target).ConditionHandler.FlushDelayedActionLog(); LegacyLogic.Instance.WorldManager.Party.Buffs.FlushActionLog(); } } if (MyController is Monster) { ((Monster)MyController).BuffHandler.FlushActionLog(MonsterBuffHandler.ELogEntryPhase.ON_END_TURN); } }; FXDescription fxdescription = Helper.ResourcesLoad <FXDescription>(spell.EffectKey, false); if (fxdescription == null) { Debug.LogError("FXDescription not found! at " + spell.EffectKey, this); eventHandler(this, EventArgs.Empty); return; } fxdescription = Helper.Instantiate <FXDescription>(fxdescription); fxdescription.Finished += eventHandler; Vector3 p_slotOriginPosition; Vector3 p_slotForward; Vector3 p_slotLeft; Vector3 p_slotTargetPosition; ViewManager.GetSlotDatas(MyController.Position, LegacyLogic.Instance.WorldManager.Party.Position, out p_slotOriginPosition, out p_slotForward, out p_slotLeft, out p_slotTargetPosition); Int32 animationID; if (Int32.TryParse(spell.EffectAnimationClip, out animationID)) { m_animatorControl.AttackMagic(animationID); } else { Debug.LogError("Error parse animation id for attack magic '" + spell.EffectAnimationClip + "'"); m_animatorControl.AttackMagic(); } GameObject gameObject = this.gameObject; ETargetType targetType = spell.TargetType; if (args.SpellTargets.Count == 0) { Debug.LogError("Error, missing targets for effects\n" + DebugUtil.DumpObjectText(spell)); FXArgs p_args2 = new FXArgs(gameObject, gameObject, gameObject, gameObject, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition, new List <GameObject> { gameObject }); fxdescription.Configurate(m_eventHandler, p_args2); return; } if ((targetType & ETargetType.MONSTER) == ETargetType.MONSTER) { PlayerEntityView playerEntityView = ViewManager.Instance.FindViewAndGetComponent <PlayerEntityView>(LegacyLogic.Instance.WorldManager.Party); MovingEntity movingEntity = null; List <GameObject> list = new List <GameObject>(); foreach (SpellTarget spellTarget in args.SpellTargets) { GameObject gameObject2 = null; if (spellTarget.Target is Character) { if (movingEntity == null) { movingEntity = LegacyLogic.Instance.WorldManager.Party; } gameObject2 = playerEntityView.GetMemberGameObject(((Character)spellTarget.Target).Index); } else if (spellTarget.Target is MovingEntity) { if (movingEntity == null) { movingEntity = (MovingEntity)spellTarget.Target; } gameObject2 = ViewManager.Instance.FindView((MovingEntity)spellTarget.Target); } if (gameObject2 != null) { list.Add(gameObject2); } } ViewManager.GetSlotDatas(MyController.Position, movingEntity.Position, out p_slotOriginPosition, out p_slotForward, out p_slotLeft, out p_slotTargetPosition); FXArgs p_args3 = new FXArgs(gameObject, playerEntityView.gameObject, gameObject, playerEntityView.gameObject, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition, list); fxdescription.Configurate(m_eventHandler, p_args3); } else if ((targetType & ETargetType.MULTY) == ETargetType.MULTY) { PlayerEntityView playerEntityView2 = ViewManager.Instance.FindViewAndGetComponent <PlayerEntityView>(LegacyLogic.Instance.WorldManager.Party); List <GameObject> list2 = new List <GameObject>(4); for (Int32 i = 0; i < 4; i++) { list2.Add(playerEntityView2.GetMemberGameObject(i)); } FXArgs p_args4 = new FXArgs(gameObject, playerEntityView2.gameObject, gameObject, playerEntityView2.gameObject, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition, list2); fxdescription.Configurate(m_eventHandler, p_args4); } else if ((targetType & ETargetType.SINGLE) == ETargetType.SINGLE) { Boolean flag = true; foreach (AttackedTarget attackedTarget in args.SpellTargetsOfType <AttackedTarget>()) { Character character = (Character)attackedTarget.Target; GameObject characterGO = FXHelper.GetCharacterGO(character.Index); if (!flag) { fxdescription = Helper.Instantiate <FXDescription>(fxdescription); } FXArgs p_args5 = new FXArgs(gameObject, characterGO, gameObject, characterGO, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition, new List <GameObject> { characterGO }); fxdescription.Configurate(m_eventHandler, p_args5); flag = false; } foreach (MonsterBuffTarget monsterBuffTarget in args.SpellTargetsOfType <MonsterBuffTarget>()) { Character character2 = (Character)monsterBuffTarget.Target; GameObject characterGO2 = FXHelper.GetCharacterGO(character2.Index); if (!flag) { fxdescription = Helper.Instantiate <FXDescription>(fxdescription); } FXArgs p_args6 = new FXArgs(gameObject, characterGO2, gameObject, characterGO2, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition, new List <GameObject> { characterGO2 }); fxdescription.Configurate(m_eventHandler, p_args6); flag = false; } } else if ((targetType & ETargetType.ADJACENT) == ETargetType.ADJACENT) { FXArgs p_args7 = new FXArgs(gameObject, gameObject, gameObject, gameObject, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition); fxdescription.Configurate(m_eventHandler, p_args7); } else { FXArgs p_args8 = new FXArgs(gameObject, gameObject, gameObject, gameObject, p_slotOriginPosition, p_slotForward, p_slotLeft, p_slotTargetPosition); fxdescription.Configurate(m_eventHandler, p_args8); } }
private void DrawWindow(Int32 id) { Time.timeScale = timescale; Application.targetFrameRate = targetframerate; if (m_Anim != null) { Int32 attackMagicMaxValue = m_Anim.AttackMagicMaxValue; Int32 attackMeleeMaxValue = m_Anim.AttackMeleeMaxValue; Int32 attackRangedMaxValue = m_Anim.AttackRangedMaxValue; Int32 attackCriticalMeleeMaxValue = m_Anim.AttackCriticalMeleeMaxValue; Int32 idleMaxValue = m_Anim.IdleMaxValue; Int32 evadeMaxValue = m_Anim.EvadeMaxValue; Int32 blockMaxValue = m_Anim.BlockMaxValue; Int32 hitMaxValue = m_Anim.HitMaxValue; Int32 dieMaxValue = m_Anim.DieMaxValue; Int32 eventMaxValue = m_Anim.EventMaxValue; m_Anim.InCombat = GUILayout.Toggle(m_Anim.InCombat, "InCombat", new GUILayoutOption[0]); GUILayout.Label("Attack Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 i = 1; i <= attackMeleeMaxValue; i++) { if (GUILayout.Button("#" + i, new GUILayoutOption[0])) { m_Anim.Attack(i); } } GUILayout.EndHorizontal(); GUILayout.Label("AttackCritical Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 j = 1; j <= attackCriticalMeleeMaxValue; j++) { if (GUILayout.Button("#" + j, new GUILayoutOption[0])) { m_Anim.AttackCritical(j); } } GUILayout.EndHorizontal(); GUILayout.Label("RangedAttack Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 k = 1; k <= attackRangedMaxValue; k++) { if (GUILayout.Button("#" + k, new GUILayoutOption[0])) { m_Anim.AttackRange(k); } } GUILayout.EndHorizontal(); GUILayout.Label("Idle Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 l = 1; l <= idleMaxValue; l++) { if (GUILayout.Button("#" + l, new GUILayoutOption[0])) { m_Anim.IdleSpecial(l); } } GUILayout.EndHorizontal(); GUILayout.Label("Evade Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 m = 1; m <= evadeMaxValue; m++) { if (GUILayout.Button("#" + m, new GUILayoutOption[0])) { m_Anim.Evade(m); } } GUILayout.EndHorizontal(); GUILayout.Label("Hit Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 n = 1; n <= hitMaxValue; n++) { if (GUILayout.Button("#" + n, new GUILayoutOption[0])) { m_Anim.Hit(n); } } GUILayout.EndHorizontal(); GUILayout.Label("Event Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num = 2; num <= eventMaxValue; num++) { if (GUILayout.Button("#" + (num - 1), new GUILayoutOption[0])) { m_Anim.EventSummon(num); } } GUILayout.EndHorizontal(); GUILayout.Label("Block Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num2 = 1; num2 <= blockMaxValue; num2++) { if (GUILayout.Button("#" + num2, new GUILayoutOption[0])) { m_Anim.Block(num2); } } GUILayout.EndHorizontal(); GUILayout.Label("MagicAttackAnimations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num3 = 1; num3 <= attackMagicMaxValue; num3++) { if (GUILayout.Button("#" + num3, new GUILayoutOption[0])) { m_Anim.AttackMagic(num3); } } GUILayout.EndHorizontal(); GUILayout.Label("Die Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num4 = 1; num4 <= dieMaxValue; num4++) { if (GUILayout.Button("#" + num4, new GUILayoutOption[0])) { m_Anim.Die(num4); } } GUILayout.EndHorizontal(); GUILayout.Label("Movement/Turn Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (GUILayout.Button("StartPosition", new GUILayoutOption[0])) { Quaternion lookDirection = Quaternion.Euler(0f, 0f, 0f); Vector3 position = new Vector3(0f, 0f, 0f); m_Anim.MoveTo(position, lookDirection); } if (GUILayout.Button("LeftPosition", new GUILayoutOption[0])) { Vector3 position2 = new Vector3(20f, 0f, 0f); m_Anim.MoveTo(position2, transform.rotation); } if (GUILayout.Button("RightPosition", new GUILayoutOption[0])) { Vector3 position3 = new Vector3(-10f, 0f, 0f); m_Anim.MoveTo(position3, transform.rotation); } if (GUILayout.Button("BackPosition", new GUILayoutOption[0])) { Vector3 position4 = new Vector3(0f, 0f, -10f); m_Anim.MoveTo(position4, transform.rotation); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (GUILayout.Button("Rotate Left", new GUILayoutOption[0])) { m_MonsterRotation = transform.rotation; m_Degree = RotationValueHandler(-90f); m_MonsterRotation = Quaternion.Euler(0f, m_Degree, 0f); m_Anim.RotateTo(m_MonsterRotation); } if (GUILayout.Button("Rotate Right", new GUILayoutOption[0])) { m_MonsterRotation = transform.rotation; m_Degree = RotationValueHandler(90f); m_MonsterRotation = Quaternion.Euler(0f, m_Degree, 0f); m_Anim.RotateTo(m_MonsterRotation); } GUILayout.EndHorizontal(); GUILayout.Label("IsMoving: " + m_Anim.IsMoving, new GUILayoutOption[0]); GUILayout.Label("IsRotating: " + m_Anim.IsRotating, new GUILayoutOption[0]); GUILayout.Label("InMovement: " + m_Anim.InMovement, new GUILayoutOption[0]); GUILayout.Label("IsDead: " + m_Anim.IsDead, new GUILayoutOption[0]); GUILayout.Label("InCombat: " + m_Anim.InCombat, new GUILayoutOption[0]); } }
private void TabMonsterAnimation() { if (m_Main.ActiveMonsterAnimationHandler != null) { Int32 attackMagicMaxValue = m_Anim.AttackMagicMaxValue; Int32 attackMeleeMaxValue = m_Anim.AttackMeleeMaxValue; Int32 attackRangedMaxValue = m_Anim.AttackRangedMaxValue; Int32 attackCriticalMeleeMaxValue = m_Anim.AttackCriticalMeleeMaxValue; Int32 idleMaxValue = m_Anim.IdleMaxValue; Int32 evadeMaxValue = m_Anim.EvadeMaxValue; Int32 blockMaxValue = m_Anim.BlockMaxValue; Int32 hitMaxValue = m_Anim.HitMaxValue; Int32 dieMaxValue = m_Anim.DieMaxValue; Int32 eventMaxValue = m_Anim.EventMaxValue; m_IdleRota = GUILayout.Toggle(m_IdleRota, "Switch On/Off Idle Rota", new GUILayoutOption[0]); if (!m_IdleRota) { m_Main.ActiveMonsterView.NumberOfIdleAnimations = 0; } else { m_Main.ActiveMonsterView.NumberOfIdleAnimations = idleMaxValue; } m_Anim.InCombat = GUILayout.Toggle(m_Anim.InCombat, "InCombat", new GUILayoutOption[0]); GUILayout.Label("Attack Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 i = 1; i <= attackMeleeMaxValue; i++) { if (GUILayout.Button("#" + i, new GUILayoutOption[0])) { m_Anim.Attack(i); } } GUILayout.EndHorizontal(); GUILayout.Label("AttackCritical Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 j = 1; j <= attackCriticalMeleeMaxValue; j++) { if (GUILayout.Button("#" + j, new GUILayoutOption[0])) { m_Anim.AttackCritical(j); } } GUILayout.EndHorizontal(); GUILayout.Label("RangedAttack Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 k = 1; k <= attackRangedMaxValue; k++) { if (GUILayout.Button("#" + k, new GUILayoutOption[0])) { m_Anim.AttackRange(k); } } GUILayout.EndHorizontal(); GUILayout.Label("Idle Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 l = 1; l <= idleMaxValue; l++) { if (GUILayout.Button("#" + l, new GUILayoutOption[0])) { m_Anim.IdleSpecial(l); } } GUILayout.EndHorizontal(); GUILayout.Label("Evade Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 m = 1; m <= evadeMaxValue; m++) { if (GUILayout.Button("#" + m, new GUILayoutOption[0])) { m_Anim.Evade(m); } } GUILayout.EndHorizontal(); GUILayout.Label("Hit Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 n = 1; n <= hitMaxValue; n++) { if (GUILayout.Button("#" + n, new GUILayoutOption[0])) { m_Anim.Hit(n); } } GUILayout.EndHorizontal(); GUILayout.Label("Event Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num = 2; num <= eventMaxValue; num++) { if (GUILayout.Button("#" + (num - 1), new GUILayoutOption[0])) { m_Anim.EventSummon(num); } } GUILayout.EndHorizontal(); GUILayout.Label("Block Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num2 = 1; num2 <= blockMaxValue; num2++) { if (GUILayout.Button("#" + num2, new GUILayoutOption[0])) { m_Anim.Block(num2); } } GUILayout.EndHorizontal(); GUILayout.Label("MagicAttackAnimations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num3 = 1; num3 <= attackMagicMaxValue; num3++) { if (GUILayout.Button("#" + num3, new GUILayoutOption[0])) { m_Anim.AttackMagic(num3); } } GUILayout.EndHorizontal(); GUILayout.Label("Die Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); for (Int32 num4 = 1; num4 <= dieMaxValue; num4++) { if (GUILayout.Button("#" + num4, new GUILayoutOption[0])) { m_Anim.Die(num4); } } GUILayout.EndHorizontal(); GUILayout.Label("Movement/Turn Animations:", new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (GUILayout.Button("StartPosition", new GUILayoutOption[0])) { m_Anim.MoveTo(transform.position, transform.rotation); } if (GUILayout.Button("LeftPosition", new GUILayoutOption[0])) { Vector3 position = new Vector3(10f, 0f, 0f); m_Anim.MoveTo(position, transform.rotation); } if (GUILayout.Button("RightPosition", new GUILayoutOption[0])) { Vector3 position2 = new Vector3(-10f, 0f, 0f); m_Anim.MoveTo(position2, transform.rotation); } if (GUILayout.Button("BackPosition", new GUILayoutOption[0])) { Vector3 position3 = new Vector3(0f, 0f, -10f); m_Anim.MoveTo(position3, transform.rotation); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (GUILayout.Button("Rotate Left", new GUILayoutOption[0])) { m_MonsterRotation = m_Main.ActiveMonster.transform.rotation; m_Degree = RotationValueHandler(-90f); m_MonsterRotation = Quaternion.Euler(0f, m_Degree, 0f); m_Anim.RotateTo(m_MonsterRotation); } if (GUILayout.Button("Rotate Right", new GUILayoutOption[0])) { m_MonsterRotation = m_Main.ActiveMonster.transform.rotation; m_Degree = RotationValueHandler(90f); m_MonsterRotation = Quaternion.Euler(0f, m_Degree, 0f); m_Anim.RotateTo(m_MonsterRotation); } GUILayout.EndHorizontal(); } }
protected virtual void OnEntityAbilityAdded(Object p_sender, EventArgs p_args) { AbilityEventArgs abilityEventArgs = (AbilityEventArgs)p_args; if (abilityEventArgs.Monster == MyController) { String gfx = abilityEventArgs.Ability.StaticData.Gfx; String animation = abilityEventArgs.Ability.StaticData.Animation; if (!String.IsNullOrEmpty(animation)) { Int32 animationID = Int32.Parse(animation); if (m_old) { m_Animation.Play(animation, -1f, 1f); } else if (m_animatorControl.DieState == 0) { m_animatorControl.AttackMagic(animationID); } } if (!String.IsNullOrEmpty(gfx)) { if (gfx == "SKIP_FX") { return; } BuffFX buffFX = Helper.ResourcesLoad <BuffFX>(gfx, false); if (buffFX != null) { buffFX = Helper.Instantiate <BuffFX>(buffFX); FXQueue fxqueue = new GameObject(name + " " + buffFX.name + " FXQueue").AddComponent <FXQueue>(); fxqueue.SetData(new FXQueue.Entry[] { new FXQueue.Entry(buffFX, 0f, 0f) }, 0); if (abilityEventArgs.Ability.StaticData.TargetType == ETargetType.PARTY) { FXArgs args = new FXArgs(gameObject, FXHelper.GetPlayerEntity().gameObject, gameObject, FXHelper.GetPlayerEntity().gameObject, transform.position, transform.forward, -transform.right, FXHelper.GetPlayerEntity().transform.position, new List <GameObject> { FXHelper.GetPlayerEntity().gameObject }); fxqueue.Execute(args); } else { FXArgs args2 = new FXArgs(gameObject, gameObject, gameObject, gameObject, transform.position, transform.forward, -transform.right, transform.position, new List <GameObject> { gameObject }); fxqueue.Execute(args2); } m_Queues.Add(fxqueue); } else { Debug.LogError("OnAbilityEvent: Ability's given GFX does not exist! " + gfx); } } else { Debug.LogWarning("OnAbilityEvent: Ability GFX is missing!"); } if (abilityEventArgs.Ability.StaticData.NameKey == "MONSTER_ABILITY_EXPLOSIVE") { DelayedEventManagerWorker delayedEventManagerWorker = new GameObject("ExplosiveHelper").AddComponent <DelayedEventManagerWorker>(); DontDestroyOnLoad(delayedEventManagerWorker); delayedEventManagerWorker.StartCoroutine(PlayLateShakeFX(delayedEventManagerWorker.gameObject)); Destroy(gameObject, m_explosiveAbilityDelay); } } }