public void Initialize(ContentManager content) { //Zugriff auf Attribute der Game1 Klasse spriteBatch = CR4VE.Game1.spriteBatch; graphics = CR4VE.Game1.graphics; //Camera CameraArena.Initialize(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); //Terrain terrain = new Entity(new Vector3(5, -20, -10), "Terrain/arena_hell", content); //BoundingBox lavaBound = new BoundingBox(new Vector3(), new Vector3()); lava = new Entity(new Vector3(0, -110, -30), "Terrain/lavafloor", content); //moveable Entities if (Singleplayer.isCrystal) { player = new CharacterKazumi(startPos, "Kazumi", content); //Kazumi CharacterKazumi.manaLeft = 3; } else { player = new CharacterOphelia(startPos, "Ophelia", content); //Ophelia CharacterOphelia.manaLeft = 3; } BoundingBox playerBound = new BoundingBox(player.Position + new Vector3(-2.5f, -9, -2.5f), player.Position + new Vector3(2.5f, 9, 2.5f)); player.Boundary = playerBound; sphere = new BoundingSphere(player.position, 30); #region Loading AI //Boss je nachdem, wer der Player ist if (Singleplayer.isCrystal) { boss = new BossCrystal(new Vector3(60, 0, 0), "Kazumi", content); } else { boss = new BossHell(new Vector3(60, 0, 0), "albino", content); } boss.boundary = new BoundingBox(boss.position + new Vector3(-4f, -12, -4f), boss.position + new Vector3(4f, 12, 4f)); rangeOfMeleeFromBoss = new BoundingSphere(player.position, 6); #endregion testBoundingBox = new Entity(boss.position, "5x5x5Box1", content); #region Initialize and Reset HUD if (Singleplayer.isCrystal) { kazumiHud = new KazumiHUD(content, graphics); kazumiHud.healthLeft = kazumiHud.fullHealth; fractusBossHUD = new BossCrystalHUD(content, graphics); fractusBossHUD.healthLeft = fractusBossHUD.fullHealth; } else { opheliaHud = new OpheliaHUD(content, graphics); opheliaHud.healthLeft = opheliaHud.fullHealth; seraphinBossHUD = new BossHellHUD(content, graphics); seraphinBossHUD.healthLeft = seraphinBossHUD.fullHealth; } #endregion Sounds.Initialize(content); cont = content; }
public void Initialize(ContentManager content) { //Zugriff auf Attribute der Game1 Klasse spriteBatch = CR4VE.Game1.spriteBatch; graphics = CR4VE.Game1.graphics; CameraArena.Initialize(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); #region player models playerArray = new Character[GameControls.ConnectedControllers]; hudArray = new HUD[GameControls.ConnectedControllers]; for (int i = 0; i < GameControls.ConnectedControllers; i++) { switch (MainMenu.MPSelection[i]) { case "Fractus": { playerArray[i] = new CharacterFractus(new Vector3(0, -12.5f, 10), "Fractus", content,new BoundingBox(new Vector3(0, -12.5f, 10)+ new Vector3(-2.5f, -9, -2.5f), new Vector3(0, -12.5f, 10)+ new Vector3(2.5f, 9, 2.5f))); hudArray[i] = new FractusHUD(content, graphics); } break; case "Kazumi": { playerArray[i] = new CharacterKazumi(new Vector3(0, -12.5f, -10), "Kazumi", content, new BoundingBox(new Vector3(0, -12.5f, -10) + new Vector3(-2.5f, -9, -2.5f), new Vector3(0, -12.5f, -10) + new Vector3(2.5f, 9, 2.5f))); hudArray[i] = new KazumiHUD(content, graphics); } break; case "Ophelia": { playerArray[i] = new CharacterOphelia(new Vector3(-10, -12.5f, 0), "Ophelia", content, new BoundingBox(new Vector3(-10, -12.5f, 0) + new Vector3(-2.5f, -9, -2.5f), new Vector3(-10, -12.5f, 0) + new Vector3(2.5f, 9, 2.5f))); hudArray[i] = new OpheliaHUD(content, graphics); } break; case "Seraphin": { playerArray[i] = new CharacterSeraphin(new Vector3(10, -12.5f, 0), "albino", content, new BoundingBox(new Vector3(10, -12.5f, 0) + new Vector3(-2.5f, -9, -2.5f), new Vector3(10, -12.5f, 0) + new Vector3(2.5f, 9, 2.5f))); hudArray[i] = new SeraphinHUD(content, graphics); } break; default: { } break; } } #endregion //Terrain terrain = new Entity(new Vector3(5, -20, -10), "Terrain/arena_hell", content); lava = new Entity(new Vector3(0, -110, -30), "Terrain/lavafloor", content); //fuer Attacken wichtig cont = content; //Control parameters GameControls.initializeMultiplayer(); //Sounds Sounds.menu.Stop(); }