コード例 #1
0
 public void SetAnimate(string name, bool loop)
 {
     if (animation.AnimationName != name)
     {
         SpineController.SetAnimate(animation, name, loop);
     }
 }
コード例 #2
0
    // 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;
    }
コード例 #3
0
    // 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];
    }
コード例 #4
0
ファイル: Character.cs プロジェクト: sedatyavuz/Scripts
    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); };
    }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
 public override ExecState Evaluate()
 {
     SpineController.SetAnimateOffset(animation, offset);
     return(ExecState.Success);
 }
コード例 #7
0
 public override ExecState Evaluate()
 {
     SpineController.SetAnimate(animation, animateName, loop, reset, timeScale);
     return(ExecState.Success);
 }