Esempio n. 1
0
 public override void Interact(Player player)
 {
     if (Manager.UserData.GameState.Health >= Player.MaxHealth)
         SoundManager.PlaySound(DataHandler.Sounds[SoundType.Beep], SoundCategory.SFX);
     else
     {
         player.Heal(healamout);
         World.GetInstance().Destroy(this);
     }
 }
Esempio n. 2
0
 public abstract void Interact(Player player);
Esempio n. 3
0
 protected override void DamagePlayer(Player player)
 {
     SoundManager.PlaySound(DataHandler.Sounds[SoundType.Mutantattack], SoundCategory.SFX);
     player.TakeDamage(offence);
 }
Esempio n. 4
0
 protected abstract void DamagePlayer(Player player);
Esempio n. 5
0
 public void OnActivated(params object[] args)
 {
     Manager.GameSettings.MusicVolume = 0.05f;
     SoundManager.StopAllLoops();
     SoundManager.PlaySound(DataHandler.Sounds[SoundType.Loop], SoundCategory.Music, true);
     gameover = won = false;
     // Specifications of the world
     short cameradistance = 40;
     // Create world
     world.FloorWidth = cellspr;
     world.FloorHeight = cellspr;
     world.Clear();
     world.ActiveCam = new OrbitCamera(cameradistance);
     world.CreateTerrain();
     #region TestCode
     //world.Add(new StarBox(new Vector3(50, 0, 100)));
     //world.Add(new FirstAidBag(new Vector3(50, 0, 100)));
     //world.Add(new LandMine(new Vector3(50, 0, 100)));
     //world.Add(new Dagger(player.Position, player.Rotation));
     //world.Add(new BrickWall(new Vector3(-Wall.WallLowAnchor.X, 0, -Wall.WallLowAnchor.Z), 0));
     //world.Add(new BrickWall(new Vector3(-Wall.WallLowAnchor.Z, 0, -Wall.WallLowAnchor.X), 1));
     #endregion
     int d = 6;
     currentmap = new Map(cellspr, cellspr, new Rectangle(cellspr / 2 - d / 2, cellspr / 2 - d / 2, d, d));
     currentmap.BuildMaze();
     player = new Player(new Vector3((cellspr / 2 + d / 4) * Map.Celld, 0, cellspr / 2 * Map.Celld), Vector3.Zero, 0.02f);
     player.Rotation = new Vector3(0, -MathHelper.PiOver2, 0);
     esc = new EscapeDrone(new Vector3((cellspr / 2 - d / 4) * Map.Celld, 0, cellspr / 2 * Map.Celld));
     world.Add(player);
     world.Add(esc);
     //player.Position += new Vector3(-300, 0, 0);
     //player.Position = esc.Position;
     /*
     Model testmodel = Manager.Game.Content.Load<Model>("Models\\Fence\\model");
     Object3D obj = new Object3D(testmodel, Vector3.Zero, Vector3.Zero, Vector3.Zero, Vector3.Zero, 2);
     obj.Position = player.Position + new Vector3(50,0,50);
     world.Add(obj);
     */
     new NPCCoordinator(currentmap);
     var coord = NPCCoordinator.GetInstance();
     PopulateMap();
     BuildGUI();
     #if !DEBUG
     Manager.Game.IsMouseVisible = false;
     world.ActiveCam.LockMouse = true;
     #endif
 }
Esempio n. 6
0
 private void Triggered(Player player)
 {
     if (player != null)
         player.TakeDamage(damage);
     SoundManager.PlaySound(DataHandler.Sounds[SoundType.Mine], SoundCategory.SFX);
 }
Esempio n. 7
0
 private void Defused(Player player)
 {
     Manager.IncrementScore(DefuseScore);
 }
Esempio n. 8
0
 public void Interact(Player player)
 {
     if (Destroyed) return;
     World.GetInstance().Destroy(this);
     Defused(player);
 }
Esempio n. 9
0
 public override void Interact(Player player)
 {
     Manager.IncrementScore(scoreincrement);
     World.GetInstance().Destroy(this);
 }