public void AnimationSetup() { if (MoveCo != null) { StopCoroutine(MoveCo); } ResetPos(); CharacterAnimationStateType nextAnim = (CharacterAnimationStateType)Enum.Parse(typeof(CharacterAnimationStateType), AnimToUse.options[AnimToUse.value].text); CurrentSpeed = 1 * AnimationSpeed.value; currentCharacter.SpineAnim.SetAnimationSpeed(CurrentSpeed); currentCharacter.CharInfo.BaseSpeed = CurrentSpeed; if (nextAnim.ToString().Contains("Atk")) { currentCharacter.GetAttack(); } if (nextAnim.ToString().Contains("Dash")) { MoveCo = MoveChar((InputDirection)Enum.Parse(typeof(InputDirection), nextAnim.ToString().Substring(4))); StartCoroutine(MoveCo); return; } currentCharacter.SpineAnim.SetAnim(nextAnim, Loop.isOn, TransitionTime.value); }
public void BaseCharacter_GetAttack_Default_Should_Pass() { // ArDefense var data = new BaseCharacter(); // Act var result = data.GetAttack(); // Reset // Assert Assert.AreEqual(1, result); }