Esempio n. 1
0
 public void checkToStand(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     if (!controller.drop)
     {
         animator.SetBool(animatorHashCodes.dropping, false);
     }
 }
Esempio n. 2
0
 public void checkToDrop(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     if (controller.drop)
     {
         animator.SetBool(animatorHashCodes.dropping, true);
     }
 }
Esempio n. 3
0
 public void checkToIdle(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     // checks to see if movement has/is stopped
     if (!controller.moveRight ^ controller.moveLeft)
     {
         animator.SetBool(animatorHashCodes.moving, false);
     }
 }
Esempio n. 4
0
 public void checkToFall(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     // checks for upward/rise/jump input
     if (!controller.localPhysicsEngine.localCollisionManager.collisionData.bottomCollision)
     {
         animator.SetBool(animatorHashCodes.collidedDown, false);
     }
 }
Esempio n. 5
0
 public void checkToJump(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     // checks for upward/rise/jump input
     if (controller.rise)
     {
         animator.SetBool(animatorHashCodes.jumping, true);
     }
 }
Esempio n. 6
0
 // accessible functions for all States
 public void checkToMove(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     // checks for movement input
     if (controller.moveRight ^ controller.moveLeft)
     {
         animator.SetBool(animatorHashCodes.moving, true);
     }
 }
Esempio n. 7
0
 public AnimatorHashCodes getAnimatorHashCodes()
 {
     if (animatorHashCodes == null)
     {
         animatorHashCodes = GameObject.Find("HashCodes").GetComponent <AnimatorHashCodes>();
     }
     return(animatorHashCodes);
 }
Esempio n. 8
0
        public void start()
        {
            getLocalPhysicsEngine();
            animator = getAnimator();
            animatorHashCodes = GameObject.FindObjectOfType<AnimatorHashCodes>();

            localPhysicsEngine.JumpStart_Event += JumpStart;
            localPhysicsEngine.HitTop_Event += HitTop;
            localPhysicsEngine.HitBottom_Event += HitBottom;
            localPhysicsEngine.HitRight_Event += HitRight;
            localPhysicsEngine.HitLeft_Event += HitLeft;
        }
Esempio n. 9
0
 public void checkToDrop(Animator animator, Controller controller, AnimatorHashCodes animatorHashCodes)
 {
     Debug.Log("Im an empty function:)");
 }
Esempio n. 10
0
 public void start()
 {
     getLocalPhysicsEngine();
     animator          = getAnimator();
     animatorHashCodes = GameObject.FindObjectOfType <AnimatorHashCodes>();
 }