Esempio n. 1
0
        //TODO Construir mecanismo de chamar um delegate method when finish animation

        public MacromapPlayer(Color color, Vector2 position)
            : base(color, position)
        {
            mCurrentColor = color;

            if (mCurrentColor == Color.Red)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\macromap\\RED_ICONE_POS_0"), new int[] { 0 }, 7, 107, 107, false, false);
            }
            else
            if (mCurrentColor == Color.Green)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\macromap\\GREEN_ICONE_POS_0"), new int[] { 0 }, 7, 107, 107, false, false);
            }
            else
            if (mCurrentColor == Color.Blue)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\macromap\\BLUE_ICONE_POS_0"), new int[] { 0 }, 7, 107, 107, false, false);
            }

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            //addSprite(mSpriteExploding, sSTATE_EXPLODING);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(40, 40);

            pos = new Vector2(300, 0);
        }
Esempio n. 2
0
        public Bako(Color color, Vector2 origin)
            : base(color, origin)
        {
            if (color == Color.Red)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 8, "enemies\\Bako\\red\\perseguidor_mau"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1 }, 3, 120, 120, false, false);
                //mSpriteExploding = new Sprite(imagesDestroyed, new int[] { 0 }, 3, 90, 90, true, true);
            }

            if (color == Color.Green)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 8, "enemies\\Bako\\green\\perseguidor_mau"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1 }, 3, 120, 120, false, false);
                //mSpriteExploding = new Sprite(imagesDestroyed, new int[] { 0 }, 3, 90, 90, true, true);
            }

            if (color == Color.Blue)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 8, "enemies\\Bako\\blue\\perseguidor_mau"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1 }, 3, 120, 120, false, false);
                //mSpriteExploding = new Sprite(imagesDestroyed, new int[] { 0 }, 3, 90, 90, true, true);
            }


            addSprite(mSpriteNormal, sSTATE_NORMAL);
            //addSprite(mSpriteExploding, sSTATE_EXPLODING);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(15, 15, 85, 85);

            oldPosition = spritePos = pos = origin;
            //pos = new Vector2(0, 0);
        }
Esempio n. 3
0
            public Feet(Color color)
            {
                int sizeW = 111;
                int sizeH = 40;

                String folderColor = "";

                if (color == Color.Blue)
                {
                    folderColor = "blue";
                }
                if (color == Color.Green)
                {
                    folderColor = "green";
                }
                if (color == Color.Red)
                {
                    folderColor = "red";
                }

                mSpriteStoppedFeet      = new Sprite(ExtraFunctions.fillArrayWithImages2(1, "gameplay\\maincharacter\\" + folderColor + "\\feet\\left\\" + folderColor + "_feet_walk_left"), new int[] { 0 }, 7, sizeW, sizeH, false, false);
                mSpriteWalkingFeetLeft  = new Sprite(ExtraFunctions.fillArrayWithImages2(17, "gameplay\\maincharacter\\" + folderColor + "\\feet\\left\\" + folderColor + "_feet_walk_left"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 17 }, 1, sizeW, sizeH, false, false);
                mSpriteWalkingFeetRight = new Sprite(ExtraFunctions.fillArrayWithImages2(17, "gameplay\\maincharacter\\" + folderColor + "\\feet\\right\\" + folderColor + "_feet_walk_right"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 17 }, 1, sizeW, sizeH, false, false);

                //mSpriteTackling = new Sprite(imagesTackling, new int[] { 0, 1, 2, 3, 4, 5 }, 1, 65, 80, true, false);

                addSprite(mSpriteStoppedFeet, sSTATE_STOPPED_FEET);
                addSprite(mSpriteWalkingFeetLeft, sSTATE_WALKING_FEET_LEFT);
                addSprite(mSpriteWalkingFeetRight, sSTATE_WALKING_FEET_RIGHT);


                changeToSprite(sSTATE_STOPPED_FEET);

                setCollisionRect(75, 80);
            }
Esempio n. 4
0
        public Lizardo(Color color, Vector2 origin)
            : base(color, origin)
        {
            color_ = color;

            String colorString = "";

            if (color == Color.Red)
            {
                colorString = "red";
            }
            if (color == Color.Blue)
            {
                colorString = "blue";
            }
            if (color == Color.Green)
            {
                colorString = "green";
            }

            mSpriteWalking   = new Sprite(ExtraFunctions.fillArrayWithImages2(2, 26, "enemies\\Lizardo\\" + colorString + "\\walk\\lizard_walk"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 26 }, 1, 100, 100, false, false);
            mSpriteAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 40, "enemies\\Lizardo\\" + colorString + "\\attack\\lizard_attack"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 40 }, 1, 100, 100, false, false);

            addSprite(mSpriteWalking, sSTATE_WALKING);
            addSprite(mSpriteAttacking, sSTATE_ATTACKING);

            changeToSprite(sSTATE_WALKING);

            setCenterHotspot(new Vector2(274, 101));
            setCollisionRect(20, 20, 56, 56);
            setLocation(origin);
        }
Esempio n. 5
0
        public EnemyCrabCrab(Color color, Vector2 origin)
            : base(color, origin)
        {
            if (color == Color.Red)
            {
                //os sprites andando do red sao diferentes. Tem que ter cuidado caso for mexer
                mSpriteWalking   = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 16, "enemies\\CrabCrab\\red\\Crab_walk"), new int[] { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, 2, 300, 110, false, false);
                mSpriteAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 11, "enemies\\CrabCrab\\red\\Crab_attack"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }, 2, 300, 110, false, false);
            }
            if (color == Color.Blue)
            {
                mSpriteWalking   = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 16, "enemies\\CrabCrab\\blue\\Crab_walk"), new int[] { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, 2, 300, 110, false, false);
                mSpriteAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 11, "enemies\\CrabCrab\\blue\\Crab_attack"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }, 2, 300, 110, false, false);
            }
            if (color == Color.Green)
            {
                mSpriteWalking   = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 16, "enemies\\CrabCrab\\green\\Crab_walk"), new int[] { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, 2, 300, 110, false, false);
                mSpriteAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 11, "enemies\\CrabCrab\\green\\Crab_attack"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }, 2, 300, 110, false, false);
            }

            addSprite(mSpriteWalking, sSTATE_WALKING);
            addSprite(mSpriteAttacking, sSTATE_ATTACKING);

            changeToSprite(sSTATE_WALKING);

            setCenterHotspot(new Vector2(274, 101));
            setCollisionRect(30, 30, 220, 80);
            setLocation(origin);
        }
Esempio n. 6
0
        public Balloon(Color color, Vector2 origin, BTYPE type)
            : base()
        {
            mType = type;

            mTimerChangeColor = new MTimer(true);

            enemyColor = color;

            if (mType == BTYPE.INSTANT_BALLOON)
            {
                mSpriteRed   = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\red\\red"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);
                mSpriteGreen = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\green\\green"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);
                mSpriteBlue  = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\blue\\blue"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);
            }
            else
            if (mType == BTYPE.HEART)
            {
                /*hmSpriteRed = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\red\\red"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);
                 * mSpriteGreen = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\green\\green"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);
                 * mSpriteBlue = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 12, "enemies\\balloon\\blue\\blue"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, 1, 100, 100, false, false);*/
            }

            addSprite(mSpriteRed, sSTATE_FLYING_RED);
            addSprite(mSpriteGreen, sSTATE_FLYING_GREEN);
            addSprite(mSpriteBlue, sSTATE_FLYING_BLUE);

            changeToSprite(sSTATE_FLYING_RED);

            setCollisionRect(15, 15, 70, 70);
            setLocation(origin);
        }
Esempio n. 7
0
        public Explosion(Color color)
        {
            mColor = color;

            /*if (color == Color.Tomato)
             * {
             *  mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(27, "enemies\\explosion\\explosion"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 27 }, 1, 500, 500, true, false);
             * }*/
            if (color == Color.Red)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(27, "enemies\\explosion\\red\\Red"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 27 }, 1, 230, 230, true, false);
            }
            if (color == Color.Green)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(27, "enemies\\explosion\\green\\Green"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 27 }, 1, 230, 230, true, false);
            }
            if (color == Color.Blue)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(27, "enemies\\explosion\\blue\\Blue"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 27 }, 1, 230, 230, true, false);
            }
            //mSpriteTackling = new Sprite(imagesTackling, new int[] { 0, 1, 2, 3, 4, 5 }, 1, 65, 80, true, false);

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            //addSprite(mSpriteTackling, sSTATE_TACKLING);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(75, 80);
        }
Esempio n. 8
0
        public MainCharacter(Color color)
        {
            mColor = color;

            mData = new MainCharacterData();

            String folderColor = "";

            if (mColor == Color.Blue)
            {
                folderColor = "blue";
            }
            if (mColor == Color.Green)
            {
                folderColor = "green";
            }
            if (mColor == Color.Red)
            {
                folderColor = "red";
            }


            int width  = 200;
            int height = 200;

            mSpriteStopped   = new Sprite(ExtraFunctions.fillArrayWithImages2(1, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 0 }, 7, width, height, false, false);
            mSpriteTopLeft   = new Sprite(ExtraFunctions.fillArrayWithImages2(50, 4, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 0, 1, 2, 3 }, 2, width, height, true, false);
            mSpriteTopRight  = new Sprite(ExtraFunctions.fillArrayWithImages2(17, 5, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 0, 1, 2, 3, 4 }, 2, width, height, true, false);
            mSpriteDownLeft  = new Sprite(ExtraFunctions.fillArrayWithImages2(54, 4, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 0, 1, 2, 3 }, 2, width, height, true, false);
            mSpriteDownRight = new Sprite(ExtraFunctions.fillArrayWithImages2(22, 4, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 0, 1, 2, 3 }, 2, width, height, true, false);

            mSpriteVictory = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 80, "gameplay\\maincharacter\\" + folderColor + "\\win\\" + folderColor + "_win"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 80 }, 1, width, height, true, false);
            mSpriteDefeat  = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 89, "gameplay\\maincharacter\\" + folderColor + "\\loose\\lose"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 89 }, 1, width, height, true, false);

            mSpriteInverseTopLeft  = new Sprite(ExtraFunctions.fillArrayWithImages2(50, 4, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 3, 2 }, 2, width, height, true, false);
            mSpriteInverseTopRight = new Sprite(ExtraFunctions.fillArrayWithImages2(17, 5, "gameplay\\maincharacter\\" + folderColor + "\\body"), new int[] { 4, 3 }, 2, width, height, true, false);


            addSprite(mSpriteStopped, sSTATE_STOPPED);
            addSprite(mSpriteTopLeft, sSTATE_TOP_LEFT);
            addSprite(mSpriteTopRight, sSTATE_TOP_RIGHT);
            addSprite(mSpriteDownLeft, sSTATE_BOTTOM_LEFT);
            addSprite(mSpriteDownRight, sSTATE_BOTTOM_RIGHT);
            addSprite(mSpriteVictory, sSTATE_VICTORY);
            addSprite(mSpriteDefeat, sSTATE_LOSE);
            addSprite(mSpriteInverseTopLeft, sSTATE_INVERSE_TOP_LEFT);
            addSprite(mSpriteInverseTopRight, sSTATE_INVERSE_TOP_RIGHT);

            changeToSprite(sSTATE_STOPPED);

            setCollisionRect(70, 75, 70, 90);

            mFeet = new Feet(color);

            //hurt();
        }
Esempio n. 9
0
            public RockerWing()
            {
                int sizeW = 150;
                int sizeH = 93;

                mSprite = new Sprite(ExtraFunctions.fillArrayWithImages2(3, "enemies\\rocker\\wings\\asas"), new int[] { 0, 1, 2 }, 3, sizeW, sizeH, false, false);

                addSprite(mSprite, sFLYING);
                changeToSprite(sFLYING);

                setCollisionRect(75, 80);
            }
Esempio n. 10
0
        public EnemyMongo(SKIN skin, Color color, Vector2 origin)
            : base(color, origin)
        {
            mSkin = skin;

            if (color == Color.Red)
            {
                if (mSkin == SKIN.Normal)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\red\\01\\mongo_red"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
                if (mSkin == SKIN.Pirate)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\red\\02\\mongo_red"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
            }
            if (color == Color.Blue)
            {
                if (mSkin == SKIN.Normal)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\blue\\01\\mongo_blue"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
                if (mSkin == SKIN.Pirate)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\blue\\02\\mongo_blue"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
            }
            if (color == Color.Green)
            {
                if (mSkin == SKIN.Normal)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\green\\01\\mongo_green"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
                if (mSkin == SKIN.Pirate)
                {
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(9, "enemies\\Mongo\\green\\02\\mongo_green"), new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, 2, 100, 100, false, false);
                }
            }

            addSprite(mSpriteWalking, sSTATE_WALKING);

            changeToSprite(sSTATE_WALKING);

            setCollisionRect(15, 15, 70, 70);
            setLocation(origin);
        }
Esempio n. 11
0
        public SoundIcon(Vector2 position)
        {
            mSpriteNormal  = new Sprite(ExtraFunctions.fillArrayWithImages2(1, "mainmenu\\sound_on_on"), new int[] { 0 }, 9, 100, 65, false, false);
            mSpriteShaking = new Sprite(ExtraFunctions.fillArrayWithImages2(8, "mainmenu\\sound_on_on"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 8 }, 1, 100, 65, false, false);
            mSpriteOff     = new Sprite(ExtraFunctions.fillArrayWithImages2(1, "mainmenu\\off_sound"), new int[] { 0 }, 9, 100, 65, false, false);

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            addSprite(mSpriteShaking, sSTATE_SHAKING);
            addSprite(mSpriteOff, sSTATE_OFF);
            //addSprite(mSpriteExploding, sSTATE_EXPLODING);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(25, 8, 56, 60);

            setLocation(position);
            setVisible(true);
        }
Esempio n. 12
0
        public static Color convertSavedColorToColor()
        {
            ProgressObject.PlayerColor p = ExtraFunctions.loadProgress().getColor();

            if (p == ProgressObject.PlayerColor.RED)
            {
                return(Color.Red);
            }
            else
            if (p == ProgressObject.PlayerColor.GREEN)
            {
                return(Color.Green);
            }
            else
            {
                return(Color.Blue);
            }
        }
Esempio n. 13
0
        public Button(String imgNormal, String imgPressed, Rectangle rectArea)
        {
            mSpriteNormal  = new Sprite(ExtraFunctions.fillArrayWithImages(1, imgNormal), new int[] { 0 }, 7, rectArea.Width, rectArea.Height, false, false);
            mSpritePressed = new Sprite(ExtraFunctions.fillArrayWithImages(1, imgPressed), new int[] { 0 }, 7, rectArea.Width, rectArea.Height, false, false);

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            addSprite(mSpritePressed, sSTATE_PRESSED);

            changeToSprite(sSTATE_NORMAL);

            //setCollisionRect(rectArea.Width,rectArea.Height);

            setCollisionRect(0, 0, rectArea.Width, rectArea.Height);

            setLocation(rectArea.X, rectArea.Y);


            mRectArea = rectArea;
        }
Esempio n. 14
0
        //TODO Construir mecanismo de chamar um delegate method when finish animation

        public SelectableCharacter(Vector2 center, Color color)
        {
            mColor = color;

            if (mColor == Color.Red)
            {
                mSpriteUnselected  = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\RED\\Red_unselect_pos"), new int[] { 0 }, 9, 175, 231, false, false);
                mSpriteHighlighted = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\RED\\Red_select"), new int[] { 0 }, 9, 196, 248, false, false);
                mSpriteSelected    = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 16, "gameplay\\selection\\RED\\Selected\\red_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 16 }, 1, 525, 394, true, false);
                mSpriteExplosion   = new Sprite(ExtraFunctions.fillArrayWithImages2(16, 17, "gameplay\\selection\\RED\\Selected\\red_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 17 }, 1, 800, 600, true, false);
            }

            if (mColor == Color.Green)
            {
                mSpriteUnselected  = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\GREEN\\green_unselect_pos"), new int[] { 0 }, 9, 203, 211, false, false);
                mSpriteHighlighted = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\GREEN\\green_select"), new int[] { 0 }, 9, 211, 232, false, false);
                mSpriteSelected    = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 16, "gameplay\\selection\\GREEN\\Selected\\green_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 16 }, 1, 401, 381, true, false);
                mSpriteExplosion   = new Sprite(ExtraFunctions.fillArrayWithImages2(16, 17, "gameplay\\selection\\GREEN\\Selected\\green_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 17 }, 1, 800, 600, true, false);
            }

            if (mColor == Color.Blue)
            {
                mSpriteUnselected  = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\BLUE\\blue_unselect_pos"), new int[] { 0 }, 9, 167, 231, false, false);
                mSpriteHighlighted = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\selection\\BLUE\\blue_select"), new int[] { 0 }, 9, 185, 254, false, false);
                mSpriteSelected    = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 17, "gameplay\\selection\\BLUE\\Selected\\blue_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 17 }, 1, 545, 393, true, false);
                mSpriteExplosion   = new Sprite(ExtraFunctions.fillArrayWithImages2(17, 16, "gameplay\\selection\\BLUE\\Selected\\blue_selected"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 16 }, 1, 800, 600, true, false);
            }

            addSprite(mSpriteUnselected, sSTATE_UNSELECTED);
            addSprite(mSpriteHighlighted, sSTATE_HIGHLIGHTED);
            addSprite(mSpriteSelected, sSTATE_SELECTED);
            addSprite(mSpriteExplosion, sSTATE_EXPLOSION);

            changeToSprite(sSTATE_UNSELECTED);

            setCollisionRect(30, 30, 150, 150);

            setCenter(center.X, center.Y);
            setVisible(true);

            pos = new Vector2(300, 0);
        }
Esempio n. 15
0
        public Collectable(CollectableType type)
        {
            mType = type;

            switch (mType)
            {
            case CollectableType.StagePiece:

                mSpriteNormal    = new Sprite(ExtraFunctions.fillArrayWithImages(10, "gameplay\\collectable\\heart"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 10 }, 1, 40, 40, false, false);
                mSpriteCollected = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\maincharacter\\blue_stopped"), new int[] { 0, 1 }, 1, 45, 45, false, false);
                break;
            }


            addSprite(mSpriteNormal, sSTATE_NORMAL);
            addSprite(mSpriteCollected, sSTATE_COLLECTED);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(40, 40);
        }
Esempio n. 16
0
        public LoadingLogo(Color color)
        {
            /*color = Color.Blue;
             * if (color == Color.Red)
             * {
             *  mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(10, "loading\\loading"), new int[] { 0,1,2,3,4}, 1, 200, 200, false, false);
             * }
             * else
             * if (color == Color.Green)
             * {
             *  mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(10, "loading\\loading"), new int[] { 0,1,2,3,4,5,6 }, 1, 107, 107, false, false);
             * }
             * else
             * if (color == Color.Blue)
             * {
             *
             * }*/
            mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages2(117, "loading\\loading"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 117 /**/ }, 1, 117, 117, false, false);

            addSprite(mSpriteNormal, sSTATE_NORMAL);

            changeToSprite(sSTATE_NORMAL);
        }
Esempio n. 17
0
        //TODO Construir mecanismo de chamar um delegate method when finish animation

        public MacromapShip(Vector2 position, ColorStatus colorStatus)
        {
            if (colorStatus == ColorStatus.Colored)
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(3, "gameplay\\macromap\\barco"), new int[] { 0, 1, 2, 1 }, 9, 132, 109, false, false);
            }
            else
            {
                mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(3, "gameplay\\macromap\\barcobw"), new int[] { 0, 1, 2, 1 }, 9, 132, 109, false, false);
            }

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            //addSprite(mSpriteExploding, sSTATE_EXPLODING);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(40, 40);

            setLocation(position);
            setVisible(true);

            pos = new Vector2(300, 0);
        }
Esempio n. 18
0
        public Rocker(Color color, Vector2 origin)
            : base(color, origin)
        {
            rockerWing = new RockerWing();

            if (color == Color.Red)
            {
                mSpriteFlyingRight     = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\red\\red"), new int[] { 2 }, 4, 72, 110, false, false);
                mSpriteFlyingLeft      = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\red\\red"), new int[] { 3 }, 4, 72, 110, false, false);
                mSpriteFlyingStopped   = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\red\\red"), new int[] { 0 }, 4, 72, 110, false, false);
                mSpriteFlyingAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\red\\red"), new int[] { 1 }, 4, 72, 110, false, false);
            }
            if (color == Color.Blue)
            {
                mSpriteFlyingRight     = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\blue\\blue"), new int[] { 2 }, 4, 72, 110, false, false);
                mSpriteFlyingLeft      = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\blue\\blue"), new int[] { 3 }, 4, 72, 110, false, false);
                mSpriteFlyingStopped   = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\blue\\blue"), new int[] { 0 }, 4, 72, 110, false, false);
                mSpriteFlyingAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\blue\\blue"), new int[] { 1 }, 4, 72, 110, false, false);
            }
            if (color == Color.Green)
            {
                mSpriteFlyingRight     = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\green\\green"), new int[] { 2 }, 4, 72, 110, false, false);
                mSpriteFlyingLeft      = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\green\\green"), new int[] { 3 }, 4, 72, 110, false, false);
                mSpriteFlyingStopped   = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\green\\green"), new int[] { 0 }, 4, 72, 110, false, false);
                mSpriteFlyingAttacking = new Sprite(ExtraFunctions.fillArrayWithImages2(0, 4, "enemies\\rocker\\green\\green"), new int[] { 1 }, 4, 72, 110, false, false);
            }

            addSprite(mSpriteFlyingRight, sSTATE_FLYING_RIGHT);
            addSprite(mSpriteFlyingLeft, sSTATE_FLYING_LEFT);
            addSprite(mSpriteFlyingStopped, sSTATE_FLYING_STOPPED);
            addSprite(mSpriteFlyingAttacking, sSTATE_FLYING_ATTACKING);

            changeToSprite(sSTATE_FLYING_RIGHT);

            setCollisionRect(15, 15, 70, 70);
            setLocation(origin);
        }
Esempio n. 19
0
        public Cursor()
        {
            int sizeBrushInGame = 90;

            mSpriteNormal = new Sprite(ExtraFunctions.fillArrayWithImages(1, "gameplay\\cursors\\cursor"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 1 }, 1, 93, 150, false, false);
            mSpriteBlue   = new Sprite(ExtraFunctions.fillArrayWithImages2(14, "gameplay\\cursors\\blue\\cursor"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 14 }, 1, sizeBrushInGame, sizeBrushInGame, false, false);
            mSpriteGreen  = new Sprite(ExtraFunctions.fillArrayWithImages2(14, "gameplay\\cursors\\green\\cursor"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 14 }, 1, sizeBrushInGame, sizeBrushInGame, false, false);
            mSpriteRed    = new Sprite(ExtraFunctions.fillArrayWithImages2(14, "gameplay\\cursors\\red\\cursor"), new int[] { Sprite.sALL_FRAMES_IN_ORDER, 14 }, 1, sizeBrushInGame, sizeBrushInGame, false, false);

            addSprite(mSpriteNormal, sSTATE_NORMAL);
            addSprite(mSpriteBlue, sSTATE_BLUE);
            addSprite(mSpriteGreen, sSTATE_GREEN);
            addSprite(mSpriteRed, sSTATE_RED);

            changeToSprite(sSTATE_NORMAL);

            setCollisionRect(0, 0, 40, 40);

            for (int i = 0; i < tracers.Length; i++)
            {
                tracers[i]       = new Tracer();
                tracers[i].alive = false;
            }
        }
Esempio n. 20
0
        public MacroMapScreen()
        {
            if (!SoundManager.isPlaying())
            {
                //SoundManager.PlayMusic("sound\\music\\historia1");
            }

            mSpriteBatch = Game1.getInstance().getScreenManager().getSpriteBatch();


            mRectangleExhibitionTexture = new Rectangle(0, 0, 800, 600);

            //load resources

            //  mFade = new Fade(this, "fades\\blackfade");
            //executeFade(mFade, Fade.sFADE_IN_EFFECT_GRADATIVE);

            mCursor = new Cursor();
            mCursor.loadContent(Game1.getInstance().getScreenManager().getContent());

            mTextureBorder         = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("gameplay\\macromap\\mapaborda");
            mTexturePinoBussola    = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("gameplay\\macromap\\bussola_ponteiro_pino");
            mTextureBussola        = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("gameplay\\macromap\\bussola_bg");
            mTextureBussolaPointer = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("gameplay\\macromap\\bussola_ponteiro");

            mTimer = new MTimer(true);

            //ExtraFunctions.saveLevel(2);
            //Game1.print(" >>> " + ExtraFunctions.loadLevel().getCurrentStage());

            //Game1.progressObject.setCurrentStage(2);
            //ExtraFunctions.saveProgress(Game1.progressObject);

            if (ExtraFunctions.loadProgress().getCurrentStage() == 1)
            {
                //    Game1.print("AGAIN 1");
                //  setMacroMapState(MacroMapState.FirstStage);
                SoundManager.LoadSound(cSOUND_FALLING);
                setMacroMapState(MacroMapState.FirstStage);
            }
            if (ExtraFunctions.loadProgress().getCurrentStage() == 2)
            {
                setMacroMapState(MacroMapState.SecondStage);
            }
            if (ExtraFunctions.loadProgress().getCurrentStage() == 3)
            {
                setMacroMapState(MacroMapState.ThirdStage);
            }
            if (ExtraFunctions.loadProgress().getCurrentStage() == 4)
            {
                setMacroMapState(MacroMapState.FourthStage);
            }
            if (ExtraFunctions.loadProgress().getCurrentStage() == 5)
            {
                setMacroMapState(MacroMapState.Finish);
            }

            setMacroMapState(MacroMapState.SecondStage);

            //setMacroMapState(MacroMapState.Finish);

            SoundManager.PlayMusic(cMUSIC_MAP);

            mFade = new Fade(this, "fades\\blackfade", Fade.SPEED.FAST);

            executeFade(mFade, Fade.sFADE_IN_EFFECT_GRADATIVE);

            mTextureClickToStart = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("mainmenu\\clicktoskip");

            mTimerBlinkText = new MTimer(true);
        }
Esempio n. 21
0
        private void processButtonAction(Button button)
        {
            if (button == mButtonPlay)
            {
                SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                mFade = new Fade(this, "fades\\blackfade");
                //
                //TODO if.....
                //ObjectSerialization.Save<ProgressObject>(Game1.sPROGRESS_FILE_NAME, new ProgressObject(1, ProgressObject.PlayerColor.GREEN));

                Game1.progressObject = ExtraFunctions.loadProgress();

                if (Game1.progressObject != null)
                {
                    if (Game1.progressObject.getCurrentStage() > 1)
                    {
                        configureToContinueScreen(true);
                    }
                    else
                    {
                        //SoundManager.stopMusic();

                        ObjectSerialization.Save <ProgressObject>(Game1.sPROGRESS_FILE_NAME, Game1.progressObject.setStageAndColor(1, ProgressObject.PlayerColor.BLUE));
                        executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                        mFadeParam = FADE_PARAM.START_GAME;
                    }
                }

                /*
                 */
            }
            else
            if (button == mButtonContinue)
            {
                //SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                //mFade = new Fade(this, "fades\\blackfade");
                //executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);

                SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                mFadeParam = FADE_PARAM.CONTINUE_GAME;
            }
            else
            if (button == mButtonNewGame)
            {
                //SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                //mFade = new Fade(this, "fades\\blackfade");
                //executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                SoundManager.PlaySound(cSOUND_HIGHLIGHT);

                ObjectSerialization.Save <ProgressObject>(Game1.sPROGRESS_FILE_NAME, Game1.progressObject.setStageAndColor(1, ProgressObject.PlayerColor.BLUE));
                executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                mFadeParam = FADE_PARAM.START_GAME;
            }
            else if (button == mButtonHelp)
            {
                currentScreen = new HelpScreen(this);
                cSCREEN       = SCREENS.HELP_SCREEN;
                SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                // Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MAIN_MENU_HELP, false);
            }
            else if (button == mButtonCredits)
            {
                currentScreen = new CreditsScreen(this);
                cSCREEN       = SCREENS.CREDITS_SCREEN;
                SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                //Game1.getInstance().getScreenManager().changeScreen(ScreenManager.SCREEN_ID_MAIN_MENU_CREDITS, false);
            }
            else if (button == mButtonFullscreen)
            {
                SoundManager.PlaySound(cSOUND_HIGHLIGHT);
                Game1.getInstance().toggleFullscreen();
            }
            else if (button == mButtonExit)
            {
                executeFade(mFade, Fade.sFADE_OUT_EFFECT_GRADATIVE);
                mFadeParam = FADE_PARAM.EXIT_GAME;
            }
        }
Esempio n. 22
0
        public Kakto(Color color, Vector2 origin_, TYPE type_)
            : base(color, origin_)
        {
            type      = type_;
            origin    = origin_;
            left      = false;
            localLeft = false;
            Random rand = new Random(DateTime.Now.Millisecond);

            if (color == Color.Red)
            {
                switch (rand.Next(0, 3))
                {
                case 0:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Red\\03\\red_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 1:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Red\\01\\red_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 2:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Red\\02\\red_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;
                }
            }
            if (color == Color.Blue)
            {
                switch (rand.Next(0, 3))
                {
                case 0:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Blue\\03\\blue_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 1:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Blue\\01\\blue_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 2:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Blue\\02\\blue_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;
                }
            }
            if (color == Color.Green)
            {
                switch (rand.Next(0, 3))
                {
                case 0:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Green\\03\\green_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 1:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Green\\01\\green_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;

                case 2:
                    mSpriteWalking = new Sprite(ExtraFunctions.fillArrayWithImages2(1, 5, "enemies\\Kaktos\\Green\\02\\green_kaktos"), new int[] { 0, 1, 2, 3, 4 }, 9, 95, 95, false, false);
                    break;
                }
            }

            addSprite(mSpriteWalking, sSTATE_WALKING);

            changeToSprite(sSTATE_WALKING);

            setCenterHotspot(new Vector2(274, 101));
            setCollisionRect(0, 0, 90, 90);
            setLocation(origin);
        }