public void SetAnimate(string name, bool loop) { if (animation.AnimationName != name) { SpineController.SetAnimate(animation, name, loop); } }
// Use this for initialization void Start() { hitsourceCollider = transform.GetChild(1).gameObject; hitboxCollider = transform.GetChild(2).gameObject; spineController = gameObject.GetComponent <SpineController>(); userController = gameObject.GetComponent <UserController>(); //attackDelay = 0.3f; }
// Start is called before the first frame update void Start() { _transform = transform; _moveVector = Vector3.zero; spineController = gameObject.GetComponent <SpineController>(); userAction = gameObject.GetComponent <UserAction>(); afterAttackTime = userAction.afterAttackTime; comboDelay = userAction.attackDelayArr[userAction.actionCombo]; }
private void Awake() { team = GetComponentInParent <Team>(); targetHandler = GetComponentInChildren <TargetHandler>(); animatorController = GetComponentInChildren <CharacterAnimatorController>(); audioController = GetComponent <CharacterAudioController>(); spineController = GetComponent <SpineController>(); stats = GetComponent <CharacterStats>(); OnReceiveDamageCharacter += CheckHealth; OnReceiveDamageZone += (damage) => { CheckHealth(damage, null); }; }
public override ExecState Evaluate() { var anim = controller.anim; if (jumpTimeCount == -1) { SpineController.SetAnimate(anim, "jump", false, false, 1 / controller.JumpTime); jumpTimeCount = 0; return(ExecState.Running); } else if (jumpTimeCount < 1) { if (anim.AnimationName != "jump") { return(ExecState.Fail); } jumpTimeCount += Time.deltaTime / controller.JumpTime; return(ExecState.Running); } else { return(ExecState.Success); } }
public override ExecState Evaluate() { SpineController.SetAnimateOffset(animation, offset); return(ExecState.Success); }
public override ExecState Evaluate() { SpineController.SetAnimate(animation, animateName, loop, reset, timeScale); return(ExecState.Success); }