コード例 #1
0
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     animator.SetBool("LeaveState", false);
     animator.SetBool("FlyAway", false);
     player     = GameManager.Instance.playerController;
     bossScript = animator.gameObject.GetComponent <BossFsmScript>();
 }
コード例 #2
0
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     bossScript     = animator.gameObject.GetComponent <BossFsmScript>();
     startPosition  = bossScript.bossArmature.transform.position;
     targetPosition = bossScript.NextTargetPoint().position;
     moveTime       = CommonUtils.Distance(targetPosition, startPosition) / bossScript.moveSpeed;
     timer          = 0;
     animator.SetBool("LeaveState", false);
 }
コード例 #3
0
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        animator.SetBool("LeaveState", false);
        player     = GameManager.Instance.playerController;
        bossScript = animator.gameObject.GetComponent <BossFsmScript>();

        targetPosition = new Vector2(-5, player.transform.position.y + distance);

        length        = (bossScript.bossArmature.transform.position - targetPosition).magnitude;
        projectedTime = length / speed;
        timer         = 0;
        start         = bossScript.bossArmature.transform.position;
        n             = CommonUtils.NormalVector(bossScript.bossArmature.transform.position, targetPosition);
    }
コード例 #4
0
ファイル: BossStatePlayDB.cs プロジェクト: BrianLandes/Hiving
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     bossScript = animator.gameObject.GetComponent <BossFsmScript>();
     bossScript.Play(animationName);
 }