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>(); }
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); }
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); }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { bossScript = animator.gameObject.GetComponent <BossFsmScript>(); bossScript.Play(animationName); }