Example #1
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);
        }
Example #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);
        }
Example #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);
            }
Example #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);
        }
Example #5
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);
        }
Example #6
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);
        }
Example #7
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();
        }
Example #8
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);
            }
Example #9
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);
        }
Example #10
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);
        }
Example #11
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);
        }
Example #12
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);
        }
Example #13
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);
        }
Example #14
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;
            }
        }
Example #15
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);
        }