Beispiel #1
0
 public BasicSuperManager(Camera2d camera)
 {
     superFreezeDelayTime = 60;
     superFreezeTimer     = 0;
     timeAllowedToZoom    = 10;
     this.camera          = camera;
 }
Beispiel #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            cam       = new Camera2d(Config.Instance.GameWidth, Config.Instance.ScreenWidth, Config.Instance.GameHeight, Config.Instance.ScreenHeight);
            cam.Pos   = new Vector2(512.0f, 360.0f);
            mainFrame = new Rectangle(-450, 0, 2400, Config.Instance.GameHeight);

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            spriteFont   = Content.Load <SpriteFont>("testf");
            comboManager = new ComboManager(spriteFont);

            BGMManager bgmManager = new BGMManager(Content);

            projectileManager = new ProjectileManager(Content);
            throwManager      = new OneButtonThrowManager();
            superManager      = new BasicSuperManager(cam);

            menuBg = Content.Load <Texture2D>("bg2");

            dummyTexture = new Texture2D(GraphicsDevice, 1, 1);

            dummyTexture.SetData(new Color[] { Color.White });


            testHitbox = new Rectangle(100, 100, 100, 100);

            testHitInfo = new HitInfo(3, 20, Hitzone.HIGH);
            testHitInfo.IsHardKnockDown = true;
            testHitInfo.AirUntechTime   = 8000;
            testHitInfo.AirXVelocity    = 80;
            testHitInfo.AirYVelocity    = -100;

            effect = Content.Load <SoundEffect>("slap_large");

            characterSelection = new CharacterSelectList(Content);

            player1CharacterId = "HuntingHorn";


            PlayerFactory playerFactory = new PlayerFactory();

            playerFactory.DummyTexture = dummyTexture;
            player1 = (HuntingHornPlayer)playerFactory.createCharacter(player1CharacterId, Content, 1, comboManager, throwManager, superManager, projectileManager);

            //player1.Sprite.a
            roundManager   = new RoundManager(player1, player2);
            animationsList = player1.Sprite.AnimationsList;
            player1.Sprite.CurrentAnimation      = animationsList[index];
            player1.Sprite.CurrentAnimation      = "hit";
            player1.ProjectileA.CurrentAnimation = "note1";
        }
Beispiel #3
0
 public Layer(Camera2d camera)
 {
     this.camera = camera;
     Parallax    = Vector2.One;
     Sprites     = new List <BackgroundObject>();
 }
Beispiel #4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            cam    = new Camera2d(Config.Instance.GameWidth, Config.Instance.ScreenWidth, Config.Instance.GameHeight, Config.Instance.ScreenHeight);
            layers = new List <Layer>
            {
                new Layer(cam)
                {
                    Parallax = new Vector2(0.2f, 1.0f)
                },
                new Layer(cam)
                {
                    Parallax = new Vector2(0.3f, 1.0f)
                },
                new Layer(cam)
                {
                    Parallax = new Vector2(0.4f, 1.0f)
                },
                new Layer(cam)
                {
                    Parallax = new Vector2(0.8f, 1.0f)
                },
                new Layer(cam)
                {
                    Parallax = new Vector2(1.0f, 1.0f)
                },
                new Layer(cam)
                {
                    Parallax = new Vector2(1.0f, 1.0f)
                }
            };

            Texture2D test = Content.Load <Texture2D>("new_groundplane");

            layers[0].Sprites.Add(new BackgroundObject {
                texture = Content.Load <Texture2D>("background"), mainFrame = new Rectangle(-100, 0, 2200, Config.Instance.GameHeight)
            });
            layers[1].Sprites.Add(new BackgroundObject {
                texture = Content.Load <Texture2D>(@"main_castle"), mainFrame = new Rectangle(-100, 275, 2200, Config.Instance.GameHeight - 300)
            });
            layers[2].Sprites.Add(new BackgroundObject {
                texture = Content.Load <Texture2D>(@"midground"), mainFrame = new Rectangle(-100, 100, 2200, Config.Instance.GameHeight)
            });
            //layers[3].Sprites.Add(new BackgroundObject { texture = Content.Load<Texture2D>(@"foreground"), mainFrame = new Rectangle(-100, 0, 2200, Config.Instance.GameHeight) });
            layers[4].Sprites.Add(new BackgroundObject {
                texture = Content.Load <Texture2D>(@"new_groundplane"), mainFrame = new Rectangle(500, 0, 2200, Config.Instance.GameHeight)
            });
            //cam.Pos = new Vector2(Config.Instance.GameWidth/2, 360.0f);
            mainFrame = new Rectangle(-150, -450, 2200, Config.Instance.GameHeight);

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            spriteFont   = Content.Load <SpriteFont>("slant");
            ingameFont   = Content.Load <SpriteFont>("arvil");
            comboManager = new ComboManager(ingameFont);

            BGMManager bgmManager = new BGMManager(Content);

            projectileManager = new ProjectileManager(Content);
            throwManager      = new OneButtonThrowManager();
            superManager      = new BasicSuperManager(cam);
            //background = Content.Load<Texture2D>("background");
            //background2 = Content.Load<Texture2D>("main_castle");

            menuBg = Content.Load <Texture2D>("bg2");

            victoryDots = Content.Load <Texture2D>("winDots");

            dummyTexture = new Texture2D(GraphicsDevice, 1, 1);

            dummyTexture.SetData(new Color[] { Color.White });


            testHitbox = new Rectangle(100, 100, 100, 100);

            testHitInfo = new HitInfo(3, 20, Hitzone.HIGH);
            testHitInfo.IsHardKnockDown = true;
            testHitInfo.AirUntechTime   = 8000;
            testHitInfo.AirXVelocity    = 80;
            testHitInfo.AirYVelocity    = 2;

            effect = Content.Load <SoundEffect>("hit_3");
            hit2   = Content.Load <SoundEffect>("hit_4");
            slash  = Content.Load <SoundEffect>("stab_1");
            slash2 = Content.Load <SoundEffect>("stab_2");
            strum  = Content.Load <SoundEffect>("strum_1");

            //MediaPlayer.Play(bgmManager.getRandomBGM());
            //MediaPlayer.Volume = 0.4f;

            player1Controls.setControl("down", Keys.Down);
            player1Controls.setControl("right", Keys.Right);
            player1Controls.setControl("left", Keys.Left);
            player1Controls.setControl("up", Keys.Up);
            player1Controls.setControl("a", Keys.A);
            player1Controls.setControl("b", Keys.S);
            player1Controls.setControl("c", Keys.D);
            player1Controls.setControl("d", Keys.Z);
            player1Controls.setControl("start", Keys.Enter);

            player2Controls.setControl("down", Keys.K);
            player2Controls.setControl("right", Keys.L);
            player2Controls.setControl("left", Keys.J);
            player2Controls.setControl("up", Keys.I);
            player2Controls.setControl("a", Keys.F);
            player2Controls.setControl("b", Keys.G);
            player2Controls.setControl("c", Keys.H);
            player2Controls.setControl("d", Keys.V);
            player2Controls.setControl("start", Keys.End);

            characterSelection = new CharacterSelectList(Content);
            gameState          = GameState.MAINMENU;
            player1CharacterId = "LongSword";

            player2CharacterId = "HuntingHorn";

            pauseMenu = new PauseMenu(spriteFont);

            pressStart = Content.Load <Texture2D>("press_start");
            mainMenu   = new MainMenu(spriteFont, pressStart);

            titleScreen   = Content.Load <Texture2D>("Rising_Force_Title");
            loadingScreen = Content.Load <Texture2D>("VS_Screen");
            demoEndScreen = Content.Load <Texture2D>("thank_you");

            player1NamePlate = Content.Load <Texture2D>("Liara_game_text");
            player2NamePlate = Content.Load <Texture2D>("Aydin_game_text");
        }