Пример #1
0
 public target(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type, int color)
 {
     this.enclosingGame = enclosingGame;
     this.location = location;
     this.speed = speed;
     this.type = type;
     this.color = color;
     this.isShot = false;
     this.wasShot = false;
 }
Пример #2
0
 public target(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type, int color)
 {
     this.enclosingGame = enclosingGame;
     this.location      = location;
     this.speed         = speed;
     this.type          = type;
     this.color         = color;
     this.isShot        = false;
     this.wasShot       = false;
 }
Пример #3
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public duck(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type, int color)
        {
            this.enclosingGame = enclosingGame;
            this.location = location;
            this.speed = speed;
            this.type = type;
            this.color = color;
            this.isShot = false;
            this.wasShot = false;

            this.spriteHeight = spriteHeight = 200;
            this.spriteWidth = spriteWidth = 248;

            this.interval = 50f;

            spriteDuck = enclosingGame.contentManager.Load<Texture2D>("duckSpriteSheetv2");

            points = 5;
        }
Пример #4
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public duck(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type, int color)
        {
            this.enclosingGame = enclosingGame;
            this.location      = location;
            this.speed         = speed;
            this.type          = type;
            this.color         = color;
            this.isShot        = false;
            this.wasShot       = false;

            this.spriteHeight = spriteHeight = 200;
            this.spriteWidth  = spriteWidth = 248;

            this.interval = 50f;


            spriteDuck = enclosingGame.contentManager.Load <Texture2D>("duckSpriteSheetv2");

            points = 5;
        }
Пример #5
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public HugeDuck(DuckSlaughterGame enclosingGame, Vector2 location)
        {
            this.enclosingGame = enclosingGame;
            this.location      = location;
            this.type          = type;
            this.color         = color;
            this.isShot        = false;
            this.wasShot       = false;

            this.mouthOpen = false;

            this.interval     = 75;
            this.spriteHeight = spriteHeight = 400;
            this.spriteWidth  = spriteWidth = 505;

            godDuck = enclosingGame.contentManager.Load <Texture2D>("duckGodSpriteSheet");

            //do spaceDuck sprite

            points        = 300;
            pointsCounted = false;
        }
Пример #6
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public HugeDuck(DuckSlaughterGame enclosingGame, Vector2 location)
        {
            this.enclosingGame = enclosingGame;
            this.location = location;
            this.type = type;
            this.color = color;
            this.isShot = false;
            this.wasShot = false;

            this.mouthOpen = false;

            this.interval = 75;
            this.spriteHeight = spriteHeight = 400;
            this.spriteWidth = spriteWidth = 505;

            godDuck = enclosingGame.contentManager.Load<Texture2D>("duckGodSpriteSheet");

            //do spaceDuck sprite

            points = 300;
            pointsCounted = false;
        }
Пример #7
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public spaceDuck(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type)
        {
            this.enclosingGame = enclosingGame;
            this.location = location;
            this.speed = speed;
            this.type = type;
            this.isShot = false;
            this.wasShot = false;

            this.up = true;
            this.frame_up = 100000;
            this.frame_up = 100000;

            this.spriteHeight = spriteHeight = 400;
            this.spriteWidth = spriteWidth = 505;
            this.frozenHasntBeenSet = true;
            //LoadContent(enclosingGame.contentManager);
            spriteDuckAstronaut = enclosingGame.contentManager.Load<Texture2D>("duckAstronautSpriteSheet");

            //do spaceDuck sprite
            points = 10;
            //pointsCounted = false;
        }
Пример #8
0
        /*
         * Constructor takes in enclosingGame and a Vector2 location which is where it should start on the screen and a speed
         * also takes in an int type and int color which will set what type of duck it is
         */
        public spaceDuck(DuckSlaughterGame enclosingGame, Vector2 location, Vector2 speed, int type)
        {
            this.enclosingGame = enclosingGame;
            this.location      = location;
            this.speed         = speed;
            this.type          = type;
            this.isShot        = false;
            this.wasShot       = false;

            this.up       = true;
            this.frame_up = 100000;
            this.frame_up = 100000;

            this.spriteHeight       = spriteHeight = 400;
            this.spriteWidth        = spriteWidth = 505;
            this.frozenHasntBeenSet = true;
            //LoadContent(enclosingGame.contentManager);
            spriteDuckAstronaut = enclosingGame.contentManager.Load <Texture2D>("duckAstronautSpriteSheet");

            //do spaceDuck sprite
            points = 10;
            //pointsCounted = false;
        }
Пример #9
0
        void restart()
        {
            youLoseSound.Play();
            deterministicGame.currentLevel.gameRestart = false;

            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth = 800;
            graphics.ApplyChanges();


            musicControl.Restart();


            // Make the game object.  The game is currently called 'DuckSlaughterGame'
            deterministicGame = new DuckSlaughterGame();
            deterministicGame.ResetGame(playerIdentifiers, playerIdentifiers[0]);
            deterministicGame.LoadContent(Content);
            deterministicGame.Initialize();

            // Debugging setup
            lastPressedKeys = new List<Keys>();
            activePlayer = playerIdentifiers[0];
            paused = false;
            gameStarted = false;


            //Added
            isHost = false;
            chatText = "";

            reader.Close();
            writer.Close();

            networkSession.Dispose();

            networkSession = null;

            reader = new PacketReader();
            writer = new PacketWriter();
            chatlines = 0;
            isChatting = false;
            mouseChange = false;
            buttonPressed = false;
            others = new player[4];
            update = true;
            gameStarted = false;

            inMenu = true;
            startS.Show();
            helpS.Hide();
            activeS = startS;
            releasedKeys = new List<Keys>();
        }
Пример #10
0
        // Constructor
        public Game06()
        {
            musicControl = new MusicControl();


            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            // Make the game object.  The game is currently called 'DuckSlaughterGame'.

            deterministicGame = new DuckSlaughterGame();

            // Debugging setup

            lastPressedKeys = new List<Keys>();
            activePlayer = playerIdentifiers[0];
            paused = false;
            gameStarted = false;


            //Added
            Components.Add(new GamerServicesComponent(this));
            isHost = false;
            chatText = "";
            reader = new PacketReader();
            writer = new PacketWriter();
            chatlines = 0;
            isChatting = false;
            mouseChange = false;
            buttonPressed = false;
            others = new player[4];
            update = true;

            inMenu = true;
            releasedKeys = new List<Keys>();


        }