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 doCharacterAttack(LLESprite playerCharacter)
        {
            if (attack)
            {
                playerCharacter.stopAnimation();

                if (playerCharacter.getDirection() == LLESprite.DIRECTION_DOWN)
                {
                    playerCharacter.startAnimation(32, 35);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_RIGHT)
                {
                    playerCharacter.startAnimation(36, 39);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_UP)
                {
                    playerCharacter.startAnimation(40, 43);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_LEFT)
                {
                    playerCharacter.startAnimation(44, 47);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_LEFT_UP)
                {
                    playerCharacter.startAnimation(48, 51);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_RIGHT_UP)
                {
                    playerCharacter.startAnimation(52, 55);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_RIGHT_DOWN)
                {
                    playerCharacter.startAnimation(56, 59);
                }

                else if (playerCharacter.getDirection() == LLESprite.DIRECTION_LEFT_DOWN)
                {
                    playerCharacter.startAnimation(60, 63);
                }
            }

            attack = true;
        }
        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;
                        }
                    }
                }
            }
        }