Beispiel #1
0
        public bool IsFastForwardLayer(int layer)
        {
            int isFastForward = ExtList.ContainSubStringInArray(fastForwardPlatform, LayerMask.LayerToName(layer));

            if (isFastForward != -1)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        public bool IsStickPlatform(string layer)
        {
            int isForbidden = ExtList.ContainSubStringInArray(stickPlatform, layer);

            if (isForbidden != -1)
            {
                return(true);
            }
            return(false);
        }
Beispiel #3
0
        public bool IsForbidenLayerSwitch(string layer)
        {
            int isForbidden = ExtList.ContainSubStringInArray(walkForbiddenForwardUp, layer);

            if (isForbidden != -1)
            {
                //here we are in front of a forbidden wall !!
                return(true);
            }
            return(false);
        }
        protected bool CanJump()
        {
            //can't jump in air
            if (!canJumpInAir && entityController.GetMoveState() == EntityController.MoveState.InAir)
            {
                return(false);
            }

            if (hasJumped)
            {
                return(false);
            }

            //faux si on hold pas et quand a pas laché
            if (jumpStop)
            {
                return(false);
            }

            //don't jump if we just grounded
            if (coolDownOnGround.IsRunning())
            {
                return(false);
            }

            //if (!entityContactSwitch.IsCoolDownSwitchReady())
            //    return (false);

            int isForbidden = ExtList.ContainSubStringInArray(noJumpLayer, groundCheck.GetLastLayer());

            if (isForbidden != -1)
            {
                return(false);
            }

            if (fastForward && !fastForward.CanJump())
            {
                return(false);
            }

            return(true);
        }