public LLEMapChangeManager(Assets theAssets, LLEMapFrontLayer frontLayer)
        {
            mapChanges = null;

            mapChanges = new List<LLEMapChange>();

            assets = theAssets;

            mFrontLayer = frontLayer;
        }
Example #2
0
        public LLEEnemy(string name, int hp, Vector2 position, Assets assets)
        {
            mName = name;

            mHP = hp;

            mSprite = new LLESprite(position.X, position.Y, 0, 0, 0);

            mSprite.setTexture(assets.getTexture(mName));

            mSprite.setTextureName(mName);
        }
        public LLEScriptProcessor(Assets theAssets, string saveSlotName, LLEMapFrontLayer frontLayer)
        {
            assets = theAssets;

            mSaveSlotName = saveSlotName;

            scriptVariables = new List<LLEScriptVariable>();

            mFrontLayer = frontLayer;

            mapChangeManager = new LLEMapChangeManager(assets, mFrontLayer);
        }
        public LLEMessageManager(Assets assets, LLEMapFrontLayer frontLayer)
        {
            mFrontLayer = frontLayer;

            mMsgBalloon = new LLEMessageBalloon(0, 0,
                         assets.MessageBalloon, assets.BalloonPointer, assets.Verdana10, mFrontLayer);

            mMessages = new List<string>();

            mEventMsgFlags = new List<bool>();

            mEventMsgIcons = new List<string>();

            mIndex = 0;

            mHasMessages = false;
        }
        public LLEMapBackLayer(Assets theAssets)
        {
            assets = theAssets;

            mMapW = mMapH = 0;

            cameraX = cameraY = cameraXG = cameraYG = 0;

            mCameraDestX = mCameraDestY = 0;

            mCameraVelocityX = mCameraVelocityY = 0.0f;

            collisionBoxes = new List<LLERect>();

            warpBoxes = new List<LLEWarpBox>();

            mAlignCamera = false;

            mWarping = false;
        }
        public LLEMapFrontLayer(Assets theAssets, string saveSlotName, int windowWidth, int windowHeight)
        {
            assets = theAssets;

            mapObjects = null;

            mapObjects = new List<LLEObject>();

            playerInventory = new List<LLEObject>();

            mapEnemies = new List<LLEEnemy>();

            msgManager = null;

            mPlayerCharacter = null;

            mSaveSlotName = saveSlotName;

            mWindowWidth = windowWidth;

            mWindowHeight = windowHeight;
        }
        protected void nextMessage(Assets assets)
        {
            if (mIndex < mMessages.Count)
            {
                mMsgBalloon.getSprite().setTexture(assets.MessageBalloon);

                mMsgBalloon.setAsEventMsg(assets, mEventMsgFlags[mIndex]);

                mMsgBalloon.setText(mMessages[mIndex]);

                if (!mMsgBalloon.isEventMsg())
                {
                    mMsgBalloon.getSprite().setX(focusEntity.getX() - (mMsgBalloon.getSprite().getWidth() / 2) + (focusEntity.getFrameWidth() / 4));

                    mMsgBalloon.getSprite().setY(focusEntity.getY() - assets.BalloonPointer.Height - 2);

                    mMsgBalloon.getSprite().setY(mMsgBalloon.getSprite().getY() - mMsgBalloon.getSprite().getHeight());
                }

                else
                {
                    mMsgBalloon.getSprite().setTexture(assets.KeyItemBoard);

                    mMsgBalloon.setIcon(assets, mEventMsgIcons[mIndex]);

                    mMsgBalloon.getSprite().setX((mFrontLayer.getWindowWidth() / 2) - (assets.KeyItemBoard.Width / 2));

                    mMsgBalloon.getSprite().setY((mFrontLayer.getWindowHeight() / 2) - (assets.KeyItemBoard.Height / 2));
                }

                mIndex++;
            }

            else
            {
                clearMessages();

                mEventMsgFlags.Clear();

                mEventMsgIcons.Clear();
            }
        }
 public void update(Assets assets, KeyboardState keyboardState, KeyboardState prevKeyboardState)
 {
     if (mHasMessages)
     {
         if (keyboardState.IsKeyDown(Keys.Z) && !prevKeyboardState.IsKeyDown(Keys.Z))
         {
             nextMessage(assets);
         }
     }
 }
 public void setIcon(Assets assets, string iconName)
 {
     mIcon = assets.getTexture(iconName);
 }
        public void setAsEventMsg(Assets assets, bool eventMsg)
        {
            mEventMsg = eventMsg;

            mTextColor = new Color(210, 105, 0);

            if (eventMsg)
            {
                mFont = assets.VerdanaBig;
            }

            else
            {
                mFont = assets.Verdana10;
            }

            mBalloon.setX((mWindowWidth / 2) - (assets.KeyItemBoard.Width / 2));

            mBalloon.setY((mWindowHeight / 2) - (assets.KeyItemBoard.Height / 2));
        }
Example #11
0
 public LLEEnemy clone(Assets assets)
 {
     return new LLEEnemy(mName, mHP, new Vector2(mSprite.getX(), mSprite.getY()), assets);
 }