예제 #1
0
        public BallCharacter(Game game, GameplayScreen host)
            : base(game, host)
        {
            //modelName = "testBallThing";
            modelName = "DragonBall";
            //modelName = "cloud_1";
            scale = 15;

            //quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), (float)Math.PI / 2);
            quat = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 0);

            fMass = 10;
            bPhysicsDriven = true;
            fTerminalVelocity = 450;
            collidedWithStage = false;
            damping = new Vector3(0.99f, 0.99f, 0.99f);

            //rotationAxis = Vector3.Up;
            rotationVelocity = 1;

            mixCelWithTexture = true;
            celLightColor = Color.Gold.ToVector4();
            textureName = "dBallT";
            enableCelShading = true;
        }
예제 #2
0
        public LevelPiece(Game game, GameplayScreen host, String assetName)
            : base(game, host)
        {
            // TODO: Construct any child components here
            modelName = assetName;
            position = new Vector3(0f, 0f, 0f);
            // DO NOT ADJUST SCALE IN A CONSTRUCTOR
            //scale = 50;
            m_rotX = 0;
            m_rotZ = 0;
            //quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), (float)Math.PI / 2);
            quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 0);
            originalRot = quat;
            m_rotationOffset = Vector3.Zero;
            //effect.TextureEnabled = true;
            m_localRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 0);

            m_fScaleX = 1.0f;
            m_fScaleY = 1.0f;
            m_fScaleZ = 1.0f;
            enableCelShading = true;
            mixCelWithTexture = false;
            celLightColor = Color.SkyBlue.ToVector4();
            outlineThickness = 0.000f;
            layerTwoSharp = 0.3f;
            layerTwoContrib = 0.08f;
        }
예제 #3
0
        public Level1(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(10f, 35f, 0f);
            //make a few planes
            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, 0);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, -360f);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, -720f);
            planes.Add(currentPlane);

            //goal
            goal = new GoalObject(game, host);
            goal.position += new Vector3(0, 20, -820);
            goal.scale = 10;

            //death bound for this level
            m_fDeathBound = -100f;
        }
예제 #4
0
 public WallManager(Game game, GameplayScreen host)
     : base(game)
 {
     hostScreen = host;
     this.game = game;
     wallCubeList = new ArrayList();
 }
예제 #5
0
        public Wall(Game game, GameplayScreen host)
            : base(game, host)
        {
            position = new Vector3(0f, 0f, 0f);
            modelName = "cube";

            scale = 5;
        }
예제 #6
0
 public LevelData(Game game, GameplayScreen host)
     : base(game)
 {
     gravityVec = new Vector3(0, -100, 0);
     planes = new List<CollisionLevelPiece>();
     collectables = new List<Collectable>();
     startingLocation = Vector3.Zero;
     //default value
     m_fDeathBound = 0;
 }
        public CollectableTest(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(10f, 25f, 0f);
            //make a few planes
            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, -10f, 0);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 10;
            currentPlane.position += new Vector3(200f, -10f, -300f);
            currentPlane.setLocalRotation(0, (float)Math.PI / 18);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 10;
            currentPlane.position += new Vector3(-250f, -10f, -200f);
            currentPlane.setLocalRotation(0.123f, -(float)Math.PI / 18);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 5;
            currentPlane.position += new Vector3(-220f, 10f, 80f);
            planes.Add(currentPlane);

            //moving level piece
            MovingLevelPiece movingPlane;
            //50 is a good movement speed
            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(0, 100f, 0f), 50);
            movingPlane.scale = 5;
            movingPlane.position += new Vector3(0f, 0f, -250f);
            planes.Add(movingPlane);

            goal = new GoalObject(game, host);
            goal.position += new Vector3(0, 10, -50);
            goal.scale = 5;
            //game.Components.Add(goal);

            //foreach (LevelPiece p in planes)
            //{
            //    game.Components.Add(p);
            //}

            Collectable collect1 = new Collectable(game, host);
            collect1.position = new Vector3(40, 10, 40);
            collectables.Add(collect1);

            //foreach (Collectable collect in collectables)
            //{
            //    game.Components.Add(collect);
            //}
        }
        public CollisionLevelPiece(Game game, GameplayScreen host, String assetName)
            : base(game, host, assetName)
        {
            //all collision pieces are checker planes
            modelName = "checker_plane_3";
            TVIndices = new List<MeshDataExtractor.TriangleVertexIndices>();
            verticies = new List<Vector3>();

            nonCollideAsset = new LevelPieceAsset(game, host, "cloud_2");
            //nonCollideAsset = new LevelPieceAsset(game, host, "DragonBall");
        }
예제 #9
0
        public Missile(Game game, GameplayScreen host)
            : base(game, host)
        {
            modelName = "Missile";

            missileTimer = new Utils.Timer();
            quat = Quaternion.CreateFromRotationMatrix(Matrix.CreateRotationX((float)Math.PI / 2));

            bPhysicsDriven = true;
            fTerminalVelocity *= 1.5f;
        }
예제 #10
0
        public SkySphere(Game game, GameplayScreen host)
            : base(game, host)
        {
            position = new Vector3(0f, 0f, 0f);
            modelName = "sky_sphere_y";
            quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), (float)Math.PI / 2);

            scale = 500;
            textureName = "ysky";
            mixCelWithTexture = true;
            skyCulling = true;
            //enableCelShading = true;
        }
 public MovingLevelPiece(Game game, GameplayScreen host, String assetName, Vector3 pMovement, float pMoveSpeed)
     : base(game, host, assetName)
 {
     m_movement = pMovement;
     m_moveVelocity = m_movement;
     if (m_moveVelocity.LengthSquared() != 0)
     {
         m_moveVelocity.Normalize();
     }
     //50 is a good number, fyi
     m_moveVelocity *= pMoveSpeed;
     m_currentMovement = Vector3.Zero;
 }
예제 #12
0
        public SimpleLevel(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(10f, 25f, 0f);
            //make a few planes
            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, -10f, 0);
            planes.Add(currentPlane);

            goal = new GoalObject(game, host);
            goal.position += new Vector3(40, 10, -20);
            goal.scale = 5;
        }
예제 #13
0
        public Ship(Game game, GameplayScreen host)
            : base(game, host)
        {
            // modelName = "testBallThing";
            modelName = "Ship";
            //m_scale *= 5;

            //quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), (float)Math.PI / 2);
            quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 0);
            //GameplayScreen.soundbank.PlayCue("Ship_Spawn");

            fMass = 10;
            bPhysicsDriven = true;
            fTerminalVelocity = 450;
            isAlive = true;
        }
예제 #14
0
        public Level3(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(10f, 35f, 0f);
            //make a few planes
            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, 0);
            planes.Add(currentPlane);

            /*
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, -360f);
            planes.Add(currentPlane);
            */

            //moving level piece
            MovingLevelPiece movingPlane;
            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(0, -500f, 0), 80f);
            movingPlane.scale = 15;
            movingPlane.position += new Vector3(0f, 400f, -360f);
            planes.Add(movingPlane);

            //wall
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 160f, -550f);
            currentPlane.setLocalRotation((float)Math.PI / 2, 0);
            planes.Add(currentPlane);

            //cloud above wall
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 300f, -730f);
            planes.Add(currentPlane);

            //goal
            goal = new GoalObject(game, host);
            goal.position += new Vector3(0, 300, -830);
            goal.scale = 10;

            //death bound for this level
            m_fDeathBound = -250f;
        }
예제 #15
0
 //public const Vector3 OriginalFacing
 public Plane(Game game, GameplayScreen host)
     : base(game, host)
 {
     // TODO: Construct any child components here
     modelName = "checker_plane";
     position = new Vector3(0f, 0f, 0f);
     //scale = 50;
     rotX = 0;
     rotZ = 0;
     //quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), (float)Math.PI / 2);
     quat = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 0);
     originalRot = quat;
     TVIndices = new List<MeshDataExtractor.TriangleVertexIndices>();
     verticies = new List<Vector3>();
     rotationOffset = Vector3.Zero;
     //effect.TextureEnabled = true;
 }
예제 #16
0
        public Level2(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(1f, 35f, 1f);
            //make a few planes

            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, 0);
            planes.Add(currentPlane);

            MovingLevelPiece movingPlane;
            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(300, 0f, 0), 85f);
            movingPlane.scale = 15;
            movingPlane.position += new Vector3(-150f, 0f, -360f);
            planes.Add(movingPlane);

            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(300, 0f, 0), -85f);
            movingPlane.scale = 15;
            movingPlane.position += new Vector3(150f, 0f, -720f);
            planes.Add(movingPlane);

            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(300, 0f, 0), 85f);
            movingPlane.scale = 15;
            movingPlane.position += new Vector3(-150f, 0f, -1080f);
            planes.Add(movingPlane);

            movingPlane = new MovingLevelPiece(game, host, "checker_plane_3", new Vector3(300, 0f, 0), -85f);
            movingPlane.scale = 15;
            movingPlane.position += new Vector3(150f, 0f, -1440f);
            planes.Add(movingPlane);

            //goal
            goal = new GoalObject(game, host);
            goal.position += new Vector3(0, 20, -1540f);
            goal.scale = 10;

            //death bound for this level
            m_fDeathBound = -100f;
        }
예제 #17
0
        public Level4(Game game, GameplayScreen host)
            : base(game, host)
        {
            startingLocation = new Vector3(1f, 35f, 100f);
            //make a few planes

            CollisionLevelPiece currentPlane;
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 15;
            currentPlane.position += new Vector3(0f, 0f, 0);
            planes.Add(currentPlane);

            //Left arm

            //large arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 9;
            currentPlane.position += new Vector3(-180f, 0f, -288);
            planes.Add(currentPlane);

            //smaller arms
            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(-252f, 0f, -432);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(-108f, 0f, -432);
            planes.Add(currentPlane);

            //tiny arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-252f, 0f, -480);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-108f, 0f, -480);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-252f, 0f, -504);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-108f, 0f, -504);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-252f, 0f, -528);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(-108f, 0f, -528);
            planes.Add(currentPlane);

            //small arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(-252f, 0f, -576);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(-108f, 0f, -576);
            planes.Add(currentPlane);

            //large arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 9;
            currentPlane.position += new Vector3(-180f, 0f, -720);
            planes.Add(currentPlane);

            //Right arm

            //large arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 9;
            currentPlane.position += new Vector3(180f, 0f, -288);
            planes.Add(currentPlane);

            //smaller arms

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(252f, 0f, -432);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(108f, 0f, -432);
            planes.Add(currentPlane);

            //tiny arms

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(252f, 0f, -480);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(108f, 0f, -480);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(252f, 0f, -504);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(108f, 0f, -504);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(252f, 0f, -528);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 1;
            currentPlane.position += new Vector3(108f, 0f, -528);
            planes.Add(currentPlane);

            //small arms

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(252f, 0f, -576);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 3;
            currentPlane.position += new Vector3(108f, 0f, -576);
            planes.Add(currentPlane);

            //large arm

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 9;
            currentPlane.position += new Vector3(180f, 0f, -720);
            planes.Add(currentPlane);

            //connecting bar

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 2;
            currentPlane.position += new Vector3(48f, 0f, -804);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 2;
            currentPlane.position += new Vector3(-48f, 0f, -804);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 2;
            currentPlane.position += new Vector3(0f, 0f, -804);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 2;
            currentPlane.position += new Vector3(0f, 0f, -852);
            planes.Add(currentPlane);

            currentPlane = new CollisionLevelPiece(game, host, "checker_plane_3");
            currentPlane.scale = 2;
            currentPlane.position += new Vector3(0f, 0f, -900);
            planes.Add(currentPlane);

            //goal
            goal = new GoalObject(game, host);
            goal.position += new Vector3(0, 10, -1000);
            goal.scale = 10;

            //collectables

            //death bound for this level
            m_fDeathBound = -250f;
        }
예제 #18
0
 public LevelPieceAsset(Game game, GameplayScreen host, String assetName)
     : base(game, host, assetName)
 {
 }
예제 #19
0
        public Actor(Game game, GameplayScreen host)
            : base(game)
        {
            //the host contains useful things such as a camera matrix
            hostScreen = host;

            // TODO: Construct any child components here
            timer = new Utils.Timer();
            worldTransform = new Matrix();
            worldTransform = Matrix.Identity;

            // DO NOT ADJUST SCALE IN A CONSTRUCTOR
            m_scale = 1.0f;
            m_position = new Vector3(0.0f, 0.0f, 0.0f);
            m_quat = Quaternion.Identity;
            m_changed = true;
            modifyWorldTransform();

            m_velocity = new Vector3(0.0f, 0.0f, 0.0f);
            //default, rotate zero speed around the Up vector
            m_rotationAxis = Vector3.Up;
            m_rotationVelocity = 0.0f;

            fMass = 1;
            fTerminalVelocity = 350;
            vForce = Vector3.Zero;
            vAcceleration = Vector3.Zero;
            bPhysicsDriven = false;
        }