/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); //player = new BallCharacter(ScreenManager.Game, this); player = new DragonBall(ScreenManager.Game, this); player.position = new Vector3(0f, 0f, 0f); player.scale *= 2; ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); c = new Collectable(ScreenManager.Game, this); c.scale = 10; c.position += new Vector3(0f, 0f, 0f); ScreenManager.Game.Components.Add(c); m_kPlane = new CollisionLevelPiece(ScreenManager.Game, this, "checker_plane_3"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(0f, 0f, 0); ScreenManager.Game.Components.Add(m_kPlane); LevelPiece skySphere = new LevelPiece(ScreenManager.Game, this, "sky_sphere"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(0f, 0f, 0); ScreenManager.Game.Components.Add(m_kPlane); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); player = new BallCharacter(ScreenManager.Game, this); player.position = new Vector3(10f, 25f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); String assetName = "checker_plane_3"; //make a few planes CollisionLevelPiece currentPlane; currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 15; currentPlane.position += new Vector3(0f, -10f, 0); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 10; currentPlane.position += new Vector3(200f, -10f, -300f); currentPlane.setLocalRotation(0, (float)Math.PI / 18); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 10; currentPlane.position += new Vector3(-250f, -10f, -200f); currentPlane.setLocalRotation(0.123f, -(float)Math.PI / 18); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); 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(ScreenManager.Game, this, assetName, new Vector3(0, 100f, 0f), 50); movingPlane.scale = 5; movingPlane.position += new Vector3(0f, 0f, -200f); planes.Add(movingPlane); foreach (LevelPiece p in planes) { ScreenManager.Game.Components.Add(p); } }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); m_kShip = new Ship(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kShip); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new Plane(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kPlane); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); LevelList.Add((LevelData) new SimpleLevel(ScreenManager.Game, this)); LevelList.Add((LevelData) new LevelDataTest(ScreenManager.Game, this)); LevelList.Add((LevelData) new CollectableTest(ScreenManager.Game, this)); //add in any other levels here m_kWallManager = new WallManager(ScreenManager.Game, this); //sets up the level SwitchToNextLevel(); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); player = new BallCharacter(ScreenManager.Game, this); player.position = new Vector3(0f, 25f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new CollisionLevelPiece(ScreenManager.Game, this, "level1"); //m_kPlane.scale = 50; m_kPlane.position += new Vector3(0, -10f, 0); ScreenManager.Game.Components.Add(m_kPlane); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); m_kCountdownTimer = new Utils.CountdownTimer(ScreenManager.Game, new Vector2(500.0f, 50.0f)); ScreenManager.Game.Components.Add(m_kCountdownTimer); player = new DragonBall(ScreenManager.Game, this); //player = new BallCharacter(ScreenManager.Game, this); player.position = new Vector3(0f, 0f, 0f); player.scale *= 3; ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new CollisionLevelPiece(ScreenManager.Game, this, "checker_plane_3"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(50f, -10f, 0); ScreenManager.Game.Components.Add(m_kPlane); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); meshes = new Model[1]; meshes[0] = ScreenManager.Game.Content.Load <Model>("meshes/cone"); player = new BallCharacter(ScreenManager.Game, this); //player.position = new Vector3(10f, 25f, 0f); player.position = new Vector3(0f, 0f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new LevelPiece(ScreenManager.Game, this, "checker_plane"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(150f, -10f, 0); ScreenManager.Game.Components.Add(m_kPlane); celLightingEffect = ScreenManager.Game.Content.Load <Effect>("Cel"); GetEffectParameters(); //Calculate the projection properties first on any //load callback. That way if the window gets resized, //the perspective matrix is updated accordingly float aspectRatio = (float)ScreenManager.Game.GraphicsDevice.Viewport.Width / (float)ScreenManager.Game.GraphicsDevice.Viewport.Height; float fov = MathHelper.PiOver4 * aspectRatio * 3 / 4; projection = Matrix.CreatePerspectiveFieldOfView(fov, aspectRatio, .1f, 1000f); //create a default world matrix world = Matrix.Identity; }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); LevelList.Add((LevelData)new SimpleLevel(ScreenManager.Game, this)); LevelList.Add((LevelData)new LevelDataTest(ScreenManager.Game, this)); LevelList.Add((LevelData)new CollectableTest(ScreenManager.Game, this)); //add in any other levels here m_kWallManager = new WallManager(ScreenManager.Game, this); //sets up the level SwitchToNextLevel(); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); player = new BallCharacter(ScreenManager.Game, this); player.position = new Vector3(10f, 25f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new CollisionLevelPiece(ScreenManager.Game, this, "checker_plane_3"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(150f, -10f, 0); ScreenManager.Game.Components.Add(m_kPlane); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); player = new BallCharacter(ScreenManager.Game, this); player.position = new Vector3(10f, 25f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); String assetName = "checker_plane_3"; //make a few planes CollisionLevelPiece currentPlane; currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 15; currentPlane.position += new Vector3(0f, -10f, 0); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 10; currentPlane.position += new Vector3(200f, -10f, -300f); currentPlane.setLocalRotation(0, (float) Math.PI / 18); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); currentPlane.scale = 10; currentPlane.position += new Vector3(-250f, -10f, -200f); currentPlane.setLocalRotation(0.123f, -(float)Math.PI / 18); planes.Add(currentPlane); currentPlane = new CollisionLevelPiece(ScreenManager.Game, this, assetName); 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(ScreenManager.Game, this, assetName, new Vector3(0, 100f, 0f), 50); movingPlane.scale = 5; movingPlane.position += new Vector3(0f, 0f, -200f); planes.Add(movingPlane); foreach (LevelPiece p in planes) { ScreenManager.Game.Components.Add(p); } }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { base.LoadContent(); meshes = new Model[1]; meshes[0] = ScreenManager.Game.Content.Load<Model>("meshes/cone"); player = new BallCharacter(ScreenManager.Game, this); //player.position = new Vector3(10f, 25f, 0f); player.position = new Vector3(0f, 0f, 0f); ScreenManager.Game.Components.Add(player); m_kWallManager = new WallManager(ScreenManager.Game, this); ScreenManager.Game.Components.Add(m_kWallManager); m_kPlane = new LevelPiece(ScreenManager.Game, this, "checker_plane"); m_kPlane.scale = 15; m_kPlane.position += new Vector3(150f, -10f, 0); ScreenManager.Game.Components.Add(m_kPlane); celLightingEffect = ScreenManager.Game.Content.Load<Effect>("Cel"); GetEffectParameters(); //Calculate the projection properties first on any //load callback. That way if the window gets resized, //the perspective matrix is updated accordingly float aspectRatio = (float)ScreenManager.Game.GraphicsDevice.Viewport.Width / (float)ScreenManager.Game.GraphicsDevice.Viewport.Height; float fov = MathHelper.PiOver4 * aspectRatio * 3 / 4; projection = Matrix.CreatePerspectiveFieldOfView(fov, aspectRatio, .1f, 1000f); //create a default world matrix world = Matrix.Identity; }