IEnumerator NoFaceTransformation() { Attacking = false; isImmune = true; baseForme.isImmune = true; baseForme.CanAttack = false; CanAttack = false; SetAnimation("Phase1_GettingHit", false, 0.5f); while (!baseForme.SpineAnim.CurrentAnim.Contains("Idle")) { yield return(null); } SetAnimation("Transformation", false, 0.0f); SpineAnim.SetAnimationSpeed(bossInfo.demonFormeIntensityLevels[intensityLevel].transformationSpeedMultiplier); while (!baseForme.SpineAnim.CurrentAnim.Contains("Idle")) { yield return(null); } CharInfo.HealthStats.Base = bossInfo.demonFormeIntensityLevels[intensityLevel].healthAmount; CharInfo.Health = CharInfo.HealthStats.Base; CharInfo.HealthStats.BaseHealthRegeneration = bossInfo.demonFormeIntensityLevels[intensityLevel].healthDrainRate; CharInfo.HealthStats.Regeneration = bossInfo.demonFormeIntensityLevels[intensityLevel].healthDrainRate; isImmune = false; CanAttack = true; baseForme.CharInfo.HealthStats.Regeneration = 0f; baseForme.BossPhase = Stage09_Boss_Geisha.bossPhasesType.Monster_; }
public void StartQuickAttack(bool attackRegardless) { if ((CharInfo.StaminaStats.Stamina - CharInfo.RapidAttack.Stamina_Cost_Atk >= 0 && CanAttack) || attackRegardless) { if (SpineAnim.CurrentAnim != CharacterAnimationStateType.Atk1_Loop.ToString() && SpineAnim.CurrentAnim != CharacterAnimationStateType.Atk1_IdleToAtk.ToString()) { SetAnimation(CharacterAnimationStateType.Atk1_IdleToAtk); SpineAnim.SetAnimationSpeed(SpineAnim.GetAnimLenght(CharacterAnimationStateType.Atk2_IdleToAtk) / CharInfo.SpeedStats.IdleToAtkDuration); } else if (SpineAnim.CurrentAnim == CharacterAnimationStateType.Atk1_Loop.ToString()) { Atk1Queueing = true; } } }
public void GeishaFinalDeath() { if (!oniForme.isDead) { return; } CanAttack = false; IsOnField = false; oniForme.IsOnField = false; SetFormeAttackReady(this, false); SetFormeAttackReady(oniForme, false); EventManager.Instance.AddCharacterDeath(this); EventManager.Instance.AddCharacterDeath(oniForme); StopCoroutine(oniForme.ActiveAI); StopCoroutine(ActiveAI); BossPhase = bossPhasesType.Phase1_; SetAnimation("Idle", true); SpineAnim.SetAnimationSpeed(0.6f); }
public override void SpineAnimationState_Complete(Spine.TrackEntry trackEntry) { if (PlayQueuedAnim()) { return; } //Debug.Log(skeletonAnimation.AnimationState.Tracks.ToArray()[trackEntry.TrackIndex].Animation.Name + " " + CurrentAnim.ToString()); if (trackEntry.Animation.Name == "<empty>" || SpineAnim.CurrentAnim == CharacterAnimationStateType.Idle.ToString() || SpineAnim.CurrentAnim == CharacterAnimationStateType.Death.ToString()) { return; } string completedAnim = trackEntry.Animation.Name; if (completedAnim == CharacterAnimationStateType.Defeat_ReverseArrive.ToString()) { IsSwapping = false; SwapWhenPossible = false; for (int i = 0; i < UMS.Pos.Count; i++) { GridManagerScript.Instance.SetBattleTileState(UMS.Pos[i], BattleTileStateType.Empty); UMS.Pos[i] = Vector2Int.zero; } SetAttackReady(false); transform.position = new Vector3(100, 100, 100); return; } if (completedAnim == CharacterAnimationStateType.Reverse_Arriving.ToString()) { IsSwapping = false; SwapWhenPossible = false; SetAttackReady(false); } if (completedAnim == CharacterAnimationStateType.Atk1_IdleToAtk.ToString() && SpineAnim.CurrentAnim == CharacterAnimationStateType.Atk1_IdleToAtk.ToString()) { QuickAttack(); return; } if (completedAnim == CharacterAnimationStateType.Atk1_Loop.ToString() && SpineAnim.CurrentAnim == CharacterAnimationStateType.Atk1_Loop.ToString()) { if (Atk1Queueing) { QuickAttack(); } else { SetAnimation(CharacterAnimationStateType.Atk1_AtkToIdle); SpineAnim.SetAnimationSpeed(SpineAnim.GetAnimLenght(CharacterAnimationStateType.Atk1_IdleToAtk) / CharInfo.SpeedStats.IdleToAtkDuration); } return; } if (completedAnim.Contains("Atk2") || completedAnim.Contains("S_Buff") || completedAnim.Contains("S_Debuff") || completedAnim.Contains("Atk3")) { if (completedAnim.Contains("IdleToAtk") && SpineAnim.CurrentAnim.ToString().Contains("IdleToAtk")) { string[] res = completedAnim.Split('_'); ChargingLoop(res.Length == 2 ? res.First() : res[0] + "_" + res[1]); return; } } if (completedAnim.Contains("AtkToIdle") || completedAnim == CharacterAnimationStateType.Atk.ToString() || completedAnim == CharacterAnimationStateType.Atk1.ToString()) { currentAttackPhase = AttackPhasesType.End; } base.SpineAnimationState_Complete(trackEntry); }
public override void SpineAnimationState_Complete(TrackEntry trackEntry) { if (trackEntry.Animation.Name == "<empty>" || SpineAnim.CurrentAnim == CharacterAnimationStateType.Idle.ToString() || SpineAnim.CurrentAnim == CharacterAnimationStateType.Death.ToString()) { return; } string completedAnim = trackEntry.Animation.Name; Debug.Log("Complete_ " + completedAnim); if (completedAnim.Contains("IdleToAtk") && SpineAnim.CurrentAnim.Contains("IdleToAtk")) { SetAnimation((nextAttack == null ? AttackAnimPrefixType.Atk2 : nextAttack.PrefixAnim) + "_Charging", true, 0); return; } if (completedAnim.Contains("_Loop") && SpineAnim.CurrentAnim.Contains("_Loop")) { //If they can still attack, keep them in the charging loop if (shotsLeftInAttack > 0) { SetAnimation(nextAttack.PrefixAnim + "_Charging", true, 0); } //otherwise revert them to the idle postion else { SetAnimation(nextAttack.PrefixAnim + "_AtkToIdle"); currentAttackPhase = AttackPhasesType.End; } return; } if (completedAnim.Contains("AtkToIdle") || completedAnim == CharacterAnimationStateType.Atk.ToString() || completedAnim == CharacterAnimationStateType.Atk1.ToString()) { currentAttackPhase = AttackPhasesType.End; if (BossPhase == bossPhasesType.Phase1_ ? shotsLeftInAttack == 0 : oniForme.shotsLeftInAttack == 0) { if (BossPhase == bossPhasesType.Phase1_) { Attacking = false; } else if (BossPhase == bossPhasesType.Monster_) { oniForme.Attacking = false; } } } if (completedAnim == "Transformation") { SetAnimation("Monster_Idle", true); return; } string[] res = completedAnim.Split('_'); if (res.Last() != CharacterAnimationStateType.Idle.ToString() && !SpineAnim.Loop && !Attacking) { SpineAnim.SetAnimationSpeed(_CharInfo.BaseSpeed); Debug.Log("IDLE " + completedAnim.ToString()); SpineAnim.SpineAnimationState.SetAnimation(0, BossPhase.ToString() + CharacterAnimationStateType.Idle.ToString(), true); //SpineAnimationState.AddEmptyAnimation(1,AnimationTransition,0); SpineAnim.CurrentAnim = CharacterAnimationStateType.Idle.ToString(); } }