예제 #1
0
 public override void Exit()
 {
     hasGivenInput  = false;
     Time.timeScale = 1;
     SwordSwingVFX.Stop();
     IsAttackFreeze = false;
     PlayerAnimator.transform.localPosition = Vector3.zero;
     if (RelevantCombos.Count == 0 || CurrentAttacks[AttackIndex].RootMotion)
     {
         Velocity = Vector3.zero;
     }
     PlayerAnimator.SetTrigger("ToIdle");
 }
예제 #2
0
    private void SetupVFX()
    {
        SwordSwingVFX.Stop();
        SwordSwingVFX.transform.localScale    = Vector3.one * CurrentAttacks[AttackIndex].Radius * (CurrentAttacks[AttackIndex].AngleOffset < 0 ? -1f : 1f);
        SwordSwingVFX.transform.localRotation = (Quaternion.Euler(0, (CurrentAttacks[AttackIndex].AngleOffset < 0 ? 180 : 0),
                                                                  90));

        ParticleSystem.MainModule main = SwordSwingVFX.main;
        main.simulationSpeed = VFXSimulationSpeed;
        //Cached our sword mat, if anything start bugging out, replace swordswingmat with GetComponent
        swordSwingMat = CurrentAttacks[AttackIndex].VFXSwingMaterial;
        SwordSwingVFX.GetComponent <ParticleSystemRenderer>().material.SetFloat("_IntensityBlend", currentAttackGrade == RhythmGrade.Miss ? 0 : 1);
        Debug.Log("Grade is: " + swordSwingMat.GetFloat("_IntensityBlend"));
    }