Beispiel #1
0
 public MarioGoombaTopCollision(ICollision side, Game1 game)
 {
     Game   = game;
     Side   = side;
     Mario  = (IMario)Side.TopOrLeft;
     Goomba = (Goomba)Side.BottomOrRight;
 }
Beispiel #2
0
 public KoopaGoombaBottomCollision(ICollision side, Game1 game)
 {
     Side   = side;
     Koopa  = (IKoopa)Side.TopOrLeft;
     Goomba = (Goomba)Side.BottomOrRight;
     Game   = game;
 }
 public GoombaObjectCollision(Goomba goomba, ICollision side, Game1 game)
 {
     this.goomba = goomba;
     this.side   = side;
     collision   = side.Collision;
     Game        = game;
 }
 public GoombaPhysics(Goomba goomba)
 {
     Goomba       = goomba;
     GravityCoef  = PhysicsUtilites.GlobalGravityCoef;
     MaxPosition  = new Vector2(PhysicsUtilites.XMaxPosition, PhysicsUtilites.YMaxPosition);
     MinPosition  = new Vector2(PhysicsUtilites.XMinPosition, PhysicsUtilites.YMinPosition);
     XMaxVelocity = PhysicsUtilites.GoombaMaxVelocityX;
     YMaxVelocity = PhysicsUtilites.GoombaMaxVelocityY;
     XMinVelocity = PhysicsUtilites.GoombaMinVelocityX;
     YMinVelocity = PhysicsUtilites.GoombaMinVelocityY;
     XVelocity    = PhysicsUtilites.EnemyInitVelocity;
     YVelocity    = 0;
 }
Beispiel #5
0
 public GoombaBlockCollision(Goomba goomba, ICollision side, Game1 game)
 {
     Game        = game;
     this.goomba = goomba;
     this.side   = side;
     collision   = side.Collision;
     if (side.BottomOrRight is IBlock)
     {
         block = (IBlock)side.BottomOrRight;
     }
     else
     {
         block = (IBlock)side.TopOrLeft;
     }
 }
 public GoombaObjectCollisionHandler(ICollision side, Goomba goomba, Game1 game)
 {
     this.goomba = goomba;
     Side        = side;
     Game        = game;
 }
Beispiel #7
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (Game.DebugMode)
            {
                switch (GetObject)
                {
                //Blocks
                case "BrickBlock":
                    objBlock = new Block(new Vector2(0, 0), new BrickBlockState());
                    objBlock.draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                case "FloorBlock":
                    objBlock = new Block(new Vector2(0, 0), new FloorBlockState());
                    objBlock.draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                case "HardBlock":
                    objBlock = new Block(new Vector2(0, 0), new HardBlockState());
                    objBlock.draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                case "QuestionBlock":
                    objBlock = new Block(new Vector2(0, 0), new QuestionBlockState());
                    objBlock.draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                case "UsedBlock":
                    objBlock = new Block(new Vector2(0, 0), new UsedBlockState());
                    objBlock.draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                //Items
                case "Coin":
                    objItem = new Coin(new Vector2(0, 0));
                    objItem.draw(spriteBatch, Game.mouse.GetMousePosition);
                    break;

                case "FireFlower":
                    objItem = new FireFlower(new Vector2(0, 0));
                    objItem.draw(spriteBatch, Game.mouse.GetMousePosition);
                    break;

                case "Mushroom":
                    objItem = new Mushroom(new Vector2(0, 0));
                    objItem.draw(spriteBatch, Game.mouse.GetMousePosition);
                    break;

                case "OneUp":
                    objItem = new OneUp(new Vector2(0, 0));
                    objItem.draw(spriteBatch, Game.mouse.GetMousePosition);
                    break;

                case "Star":
                    objItem = new Star(new Vector2(0, 0));
                    objItem.draw(spriteBatch, Game.mouse.GetMousePosition);
                    break;

                //Enemies
                case "Goomba":
                    objGoomba = new Goomba(new Vector2(0, 0));
                    objGoomba.Draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                case "Koopa":
                    objKoopa = new Koopa(new Vector2(0, 0));
                    objKoopa.Draw(spriteBatch, Game.mouse.GetMousePosition, Color.White);
                    break;

                default:
                    break;
                }
            }
        }
 public GoombaGoombaCollision(ICollision Side)
 {
     this.goombaOne = (Goomba)Side.TopOrLeft;
     this.goombaTwo = (Goomba)Side.BottomOrRight;
     this.side      = Side;
 }