public void accessObject(LLESprite playerCharacter, KeyboardState keyboardState, KeyboardState prevKeyboardState)
        {
            mPlayerCharacter = playerCharacter;

            if (playerCharacter != null && (playerCharacter.getDirection() == LLESprite.DIRECTION_UP || playerCharacter.getDirection() == LLESprite.DIRECTION_LEFT_UP || playerCharacter.getDirection() == LLESprite.DIRECTION_RIGHT_UP)

                && keyboardState.IsKeyDown(Keys.Z) == true && prevKeyboardState.IsKeyDown(Keys.Z) == false)
            {
                for (int i = 0; i < mapObjects.Count; i++)
                {
                    if (mapObjects[i] != null && mapObjects[i].getSprite() != null)
                    {
                        LLESprite target = mapObjects[i].getSprite();

                        if (playerCharacter.isCollidingMap(new Vector4(target.getX(), target.getY(), target.getHeight(), target.getWidth()), new Vector2(cameraX, cameraY), false, true, 4) == true)
                        {
                            scriptProcessor.extractObjectVariables(mapObjects[i]);

                            attack = false;

                            break;
                        }
                    }
                }
            }
        }
        public void tryDestroyObjects(LLESprite playerCharacter)
        {
            for (int i = 0; i < mapObjects.Count; i++)
            {
                bool collided = playerCharacter.isCollidingMap(new Vector4(mapObjects[i].getSprite().getX(), mapObjects[i].getSprite().getY(), mapObjects[i].getSprite().getHeight(), mapObjects[i].getSprite().getWidth()), new Vector2(cameraX, cameraY), true, true, 1);

                if (mapObjects[i].isDestroyable() == true && collided == true)
                {
                    mapObjects[i].release();

                    mapObjects[i] = null;

                    mapObjects.RemoveAt(i);

                    i = -1;
                }
            }
        }
        public int checkWarpCollision(LLESprite playerCharacter)
        {
            List<LLEWarpBox> rectangles = warpBoxes;

            for (int i = 0; i < rectangles.Count; i++)
            {
                if (playerCharacter.isCollidingMap(new Vector4(rectangles[i].mX, rectangles[i].mY, rectangles[i].mHeight, rectangles[i].mWidth), new Vector2(cameraX, cameraY), true, true, 4) == true)
                {
                    return i;
                }
            }

            return -1;
        }
        public void checkObjectCollision(LLESprite playerCharacter, LLEPlayerData playerData, KeyboardState keyboardState, KeyboardState prevKeyboardState)
        {
            mPlayerCharacter = playerCharacter;

            for (int i = 0; i < mapObjects.Count; i++)
            {
                if (mapObjects[i] != null && mapObjects[i].getSprite() != null && mapObjects[i].getSprite().isVisible())
                {
                    LLESprite target = mapObjects[i].getSprite();

                    if (mapObjects[i].isColliding() == true && playerCharacter.isCollidingMap(new Vector4(target.getX(), target.getY(), target.getHeight(), target.getWidth()), new Vector2(cameraX, cameraY), true, true, 4) == true)
                    {
                        if ((playerCharacter.getDirection() == LLESprite.DIRECTION_UP || playerCharacter.getDirection() == LLESprite.DIRECTION_LEFT_UP || playerCharacter.getDirection() == LLESprite.DIRECTION_RIGHT_UP)

                            && keyboardState.IsKeyDown(Keys.Z) == true && prevKeyboardState.IsKeyDown(Keys.Z) == false)
                        {
                            if (mapObjects[i].getScriptName().Replace("NONE", "" ).Replace(" ", "") != "")
                            {
                                playerCharacter.setAttacking(false);

                                scriptProcessor.extractObjectVariables(mapObjects[i]);

                                scriptProcessor.executeScript(msgManager, playerData);
                            }

                            break;
                        }
                    }
                }
            }
        }
        public void checkBoxCollision(LLESprite playerCharacter)
        {
            List<LLERect> rectangles = collisionBoxes;

            for (int i = 0; i < rectangles.Count; i++)
            {
                if (rectangles[i] != null && playerCharacter != null)
                {
                    playerCharacter.isCollidingMap(new Vector4(rectangles[i].mX, rectangles[i].mY, rectangles[i].mHeight, rectangles[i].mWidth), new Vector2(cameraX, cameraY), true, true, 4);
                }
            }
        }