public Editor(InputDevice input) { this.input = input; player = new Player(input); player.position.Y = 0.0f; player.position.Z = 15.0f; camera = new FirstPersonCamera(player); camera.width = Application.WIDTH; camera.height = Application.HEIGHT; camera.near = 0.1f; camera.far = 500; camera.fov = 1.1f; depth_values = new float[]{ 0, -150, -400}; curr_depth_index = 0; cursor = new Cursor(6); cursor.color = Color.Gray; level = new Level(); asset_list = new List<object>(); asset_list.Add(Resources.box_model); asset_list.Add(Resources.rock_model); asset_list.Add(Resources.seaurchin_model); asset_list.Add(Resources.ray_texture); asset_list.Add(Resources.starfish_model); instance = this; }
public Hyades(InputDevice input) { this.input = input; instance = this; background_music = Resources.background_music.CreateInstance(); background_music.IsLooped = true; background_music.Play(); player = new Player(input); player.position.Z = 2.0f; camera = new FirstPersonCamera(player); camera.width = Application.WIDTH; camera.height = Application.HEIGHT; camera.near = 0.1f; camera.far = 500; camera.fov = 1.1f; level = new Level(); level.Load(); Skybox skybox = new Skybox(player); level.Add(skybox); StaticModelEntity birthstone = new StaticModelEntity(Resources.rock_model); birthstone.position = Vector3.Zero; birthstone.rotation.X = 1.11592329f; birthstone.rotation.Y = 0.188416481f; birthstone.rotation.Z = 1.31485772f; birthstone.size = new Vector3(0.0006f); AmbientEntityBubblesLogic birthstone_logic = new AmbientEntityBubblesLogic(birthstone, 80, 10); level.Add(birthstone); for (int i = 0; i < 10; i++) { Bubble bubble = new Bubble(0.03f + (float)rand.NextDouble()*0.02f); bubble.SetPosition(new Vector2(-50000, 0)); bubble.SetVelocity(new Vector2(0, -1.0f)); level.Add(bubble); } Enemy enemy; for (int i = 0; i < 2; i++) { enemy = new Fish(); // enemy.size *= 0.1f; enemy.size *= (((float)rand.NextDouble())) * 0.06f + 0.05f; // enemy.size.Z *= 0.2f; //enemy.position.Z = (((float)rand.NextDouble()) -0.5f)*2; enemy.SetPosition(new Vector2(-50000, 0)); level.Add(enemy); } for (int i = 0; i < 1; i++) { enemy = new Octopus(); enemy.size *= 0.1f; enemy.SetPosition(new Vector2(-50000, -10)); level.Add(enemy); } character = new Character(player, input); character.SetPosition(new Vector2(0, 0)); level.Add(character); Enemy.player = character; particlemanager = ParticleManager.GetInstance(); AmbientParticleLogic ambient_logic = new AmbientParticleLogic(character, 10); for (int i = 0; i < 400; i++) { ambient_logic.Emit(); } AmbientCircleParticleLogic ambient_circle_logic = new AmbientCircleParticleLogic(character, 20); for (int i = 0; i < 10; i++) { ambient_circle_logic.Emit(); } WormParticleLogic worm_logic = new WormParticleLogic(character, 10); for (int i = 0; i < 20; i++) { worm_logic.Emit(); } Update(0); }