27 lines
778 B
C#
27 lines
778 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
public class MeleeFighterClass : ClassBase {
|
|
public MeleeFighterClass(Player player) : base(player) { }
|
|
private readonly int BladeVortex = Animator.StringToHash("BladeVortex");
|
|
private float BladeVortexSpeed = 0.4f;
|
|
|
|
override public void UseSkill1() {
|
|
Player.SkillInUse = true;
|
|
Player.MoveSpeed *= BladeVortexSpeed;
|
|
Animator.CrossFade(BladeVortex, 0);
|
|
Player.StartCoroutine(StopVortexAfterDelay(1.5f));
|
|
}
|
|
|
|
private IEnumerator StopVortexAfterDelay(float delay) {
|
|
yield return new WaitForSeconds(delay);
|
|
Player.SkillInUse = false;
|
|
Player.MoveSpeed /= BladeVortexSpeed;
|
|
}
|
|
}
|