public override bool Initialize(SkillUser user) { if (castingAnimSet) { user.ReplaceSkillAnimationSet(castingAnimSet.GetSetForRace(user.userStats.baseRace)); } user.userStats.rb.velocity = Vector3.zero; user.userStats.canMove = false; user.userAnim.Play("Skill", 0, 0); user.ComputeSkill(this); user.userStats.ChangeMana(-skillCost); return(true); }
public override bool Initialize(SkillUser user) { user.userStats.rb.velocity = Vector3.zero; if (attackAnimSet) { user.ReplaceSkillAnimationSet(attackAnimSet.GetSetForRace(user.userStats.baseRace)); } //user.skillStep= 0; user.userStats.canMove = false; user.userAnim.Play("Skill", 0, 0); user.userAnim.SetFloat("skillX", Mathf.Round(user.userAim.aimDirection.normalized.x)); user.userAnim.SetFloat("skillY", Mathf.Round(user.userAim.aimDirection.normalized.y)); user.userAnim.SetFloat("horizontal", Mathf.Round(user.userAim.aimDirection.normalized.x)); user.userAnim.SetFloat("vertical", Mathf.Round(user.userAim.aimDirection.normalized.y)); user.userStats.ChangeMana(-skillCost); user.ComputeSkill(this); return(true); }