Example #1
0
 public cCritterBossDragonKnight(cGame3D pownergame, cVector3 position, cCritterBullet bullet, float firerate = 4.0f, int health = 20, int model = 7)
     : base(pownergame, position, model, bullet, firerate, health)
 {
     setRadius(4.0f);
     //custom animation frames
     Sprite.setstate(State.Other, 53, 63, StateType.Repeat);
 }
Example #2
0
 public cCritter3DPlayer(cGame pownergame)
     : base(pownergame)
 {
     BulletClass = new cCritter3DPlayerBullet();
     Sprite      = new cSpriteQuake(ModelsMD2.Goku);
     //Sprite.FillColor = Color.DarkGreen;
     Sprite.SpriteAttitude = cMatrix3.scale(2, 0.8f, 0.4f);
     setRadius(0.42f);               //Default cCritter.PLAYERRADIUS is 0.4.
     setHealth(10);
     moveTo(_movebox.Center.add(new cVector3(0.0f, 0.0f, 16.0f)));
     WrapFlag             = cCritter.CLAMP; //Use CLAMP so you stop dead at edges.
     Armed                = true;           //Let's use bullets.
     MaxSpeed             = cGame3D.MAXPLAYERSPEED + 20;
     AbsorberFlag         = true;           //Keeps player from being buffeted about.
     ListenerAcceleration = 160.0f;         //So Hopper can overcome gravity.  Only affects hop.
     owner                = pownergame as cGame3D;
     // YHopper hop strength 12.0
     Listener = new cListenerQuakeScooterYHopper(0.2f, 15.0f);
     // the two arguments are walkspeed and hop strength -- JC
     gohanSpawned = false;
     addForce(new cForceGravity(50.0f));    /* Uses  gravity. Default strength is 25.0.
                                             * Gravity	will affect player using cListenerHopper. */
     AttitudeToMotionLock = false;          //It looks nicer is you don't turn the player with motion.
     Attitude             = new cMatrix3(new cVector3(0.0f, 0.0f, -1.0f), new cVector3(-1.0f, 0.0f, 0.0f),
                                         new cVector3(0.0f, 1.0f, 0.0f), Position);
     numDragBallsCollected = 0;
 }
Example #3
0
        // Try jumping through this hoop
        public cCritterDragonball(cGame pownergame) :
            base(pownergame)
        {
            _game = pownergame as cGame3D;

            /* The sprites look nice from afar, but bitmap speed is really slow
             *  when you get close to them, so don't use this. */
            cSpriteSphere sphere = new cSpriteSphere(20, 16, 16);

            sphere.FillColor       = Color.Orange;
            sphere.Filled          = true;
            sphere.LineWidthWeight = 0.5f;
            Sprite = sphere;
            //rotate(new cSpin((float)Math.PI / 2.0f, new cVector3(0.0f, 0.0f, 1.0f)));
            setRadius(0.5f);
            this.clearForcelist();
            addForce(new cForceDrag(100.0f));
        }
 public cCritterBossDrFreak(cGame3D pownergame)
     : base(pownergame)
 {
 }
 public cCritterBossDrFreak(cGame3D pownergame, cVector3 position, cCritterBullet bullet, float firerate = 4.0f, int health = 20, int model = 6)
     : base(pownergame, position, model, bullet, firerate, health)
 {
 }
Example #6
0
 public cCritterBossDragonKnight(cGame3D pownergame)
     : base(pownergame)
 {
 }
Example #7
0
        public cRoom(cGame3D game, int room = 1)
        {
            this.game = game;
            game.Biota.purgeCritters <cCritterWall>();
            game.Biota.purgeCritters <cCritter3Dcharacter>();
            game.Biota.purgeCritters <cCritterShape>();
            doorcollision = false;
            int roomSize = 100;

            if (room == 1)
            {
                Room1();
            }
            if (room == 2)
            {
                Room2();
            }
            if (room == 3)
            {
                Room3();
            }
            game.setBorder(roomSize, 16.0f, roomSize);             // size of the world


            cRealBox3 skeleton = new cRealBox3();

            skeleton.copy(game.Border);
            game.setSkyBox(skeleton);
            game.SkyBox.setSideSolidColor(cRealBox3.HIZ, Color.Green);            //Make the near HIZ transparent
            game.SkyBox.setSideSolidColor(cRealBox3.LOZ, Color.Green);            //Far wall
            game.SkyBox.setSideSolidColor(cRealBox3.LOX, Color.DarkOrchid);       //left wall
            game.SkyBox.setSideTexture(cRealBox3.HIX, BitmapRes.Wall2, 2);        //right wall
            game.SkyBox.setSideTexture(cRealBox3.LOY, BitmapRes.Graphics3);       //floor
            game.SkyBox.setSideTexture(cRealBox3.HIY, BitmapRes.Sky);             //ceiling
            width = roomSize / mazePlanx.Count;



            for (int i = 0; i < mazePlanx.Count; i++)
            {
                for (int j = 0; j < mazePlanx.Count; j++)
                {
                    if (mazePlanx[i][j])
                    {
                        float        height        = 0.3f * game.Border.YSize;
                        float        ycenter       = -game.Border.YRadius + height / 2.0f;
                        float        wallthickness = cGame3D.WALLTHICKNESS;
                        cCritterWall pwall         = new cCritterWall(
                            new cVector3(game.Border.Hix - (width * j), ycenter, game.Border.Hiz - (width * i)),
                            new cVector3(game.Border.Hix - (width * (j + 1)), ycenter, game.Border.Hiz - (width * i)),
                            height,                             //thickness param for wall's dy which goes perpendicular to the
                            //baseline established by the frist two args, up the screen
                            wallthickness,                      //height argument for this wall's dz  goes into the screen
                            game);
                        cSpriteTextureBox pspritebox =
                            new cSpriteTextureBox(pwall.Skeleton, BitmapRes.Wall3, 16);                             //Sets all sides

                        pwall.Sprite = pspritebox;
                    }
                }
            }
            for (int i = 0; i < mazePlanx.Count; i++)
            {
                for (int j = 0; j < mazePlanx.Count; j++)
                {
                    if (mazePlanz[i][j])
                    {
                        float        height        = 0.3f * game.Border.YSize;
                        float        ycenter       = -game.Border.YRadius + height / 2.0f;
                        float        wallthickness = cGame3D.WALLTHICKNESS;
                        cCritterWall pwall         = new cCritterWall(
                            new cVector3(game.Border.Hix - (width * i), ycenter, game.Border.Hiz - (width * j)),
                            new cVector3(game.Border.Hix - (width * i), ycenter, game.Border.Hiz - (width * (j + 1))),
                            wallthickness,                      //thickness param for wall's dy which goes perpendicular to the
                                                                //baseline established by the frist two args, up the screen
                            height,                             //height argument for this wall's dz  goes into the screen
                            game);
                        cSpriteTextureBox pspritebox =
                            new cSpriteTextureBox(pwall.Skeleton, BitmapRes.Wall3, 16);                             //Sets all sides

                        pwall.Sprite = pspritebox;
                    }
                }
            }
        }
Example #8
0
        public cCritterBossMog(cGame3D pownergame)
            : base(pownergame)
        {

        }