public void FootstepFrame() { Vector3 pos = transform.position; m_CharacterAudio.Step(pos); VFXManager.PlayVFX(VFXType.StepPuff, pos); }
public void AttackFrame() { if (m_CurrentTargetCharacterData == null) { m_ClearPostAttack = false; return; } //if we can't reach the target anymore when it's time to damage, then that attack miss. if (m_CharacterData.CanAttackReach(m_CurrentTargetCharacterData)) { m_CharacterData.Attack(m_CurrentTargetCharacterData); var attackPos = m_CurrentTargetCharacterData.transform.position + transform.up * 0.5f; VFXManager.PlayVFX(VFXType.Hit, attackPos); SFXManager.PlaySound(m_CharacterAudio.UseType, new SFXManager.PlayData() { Clip = m_CharacterData.Equipment.Weapon.GetHitSound(), PitchMin = 0.8f, PitchMax = 1.2f, Position = attackPos }); } if (m_ClearPostAttack) { m_ClearPostAttack = false; m_CurrentTargetCharacterData = null; m_TargetInteractable = null; } m_CurrentState = State.DEFAULT; }
public override bool Use(CharacterData user) { StatSystem.StatModifier modifier = new StatSystem.StatModifier(); modifier.ModifierMode = StatSystem.StatModifier.Mode.Absolute; modifier.Stats.strength = StrengthChange; VFXManager.PlayVFX(VFXType.Stronger, user.transform.position); user.Stats.AddTimedModifier(modifier, Duration, "StrengthAdd", EffectSprite); return(true); }
public override bool Use(CharacterData user) { if (user.Stats.CurrentHealth == user.Stats.stats.health) { return(false); } VFXManager.PlayVFX(VFXType.Healing, user.transform.position); user.Stats.ChangeHealth(Mathf.FloorToInt(HealthPurcentageAmount / 100.0f * user.Stats.stats.health)); return(true); }
public void FootstepFrame() { Vector3 pos = transform.position; m_CharacterAudio.Step(pos); SFXManager.PlaySound(SFXManager.Use.Player, new SFXManager.PlayData() { Clip = SpurSoundClips[Random.Range(0, SpurSoundClips.Length)], Position = pos, PitchMin = 0.8f, PitchMax = 1.2f, Volume = 0.3f }); VFXManager.PlayVFX(VFXType.StepPuff, pos); }