Final-Bomber  0.1
Bomberman/Dynablaster remake in C# using XNA.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
GameSettings.cs
Go to the documentation of this file.
1 using FBServer.Core;
2 using FBServer.Core.WorldEngine;
3 using FBServer.Host;
4 using System;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Text;
8 using System.Threading.Tasks;
9 
10 namespace FBServer
11 {
12  static class GameSettings
13  {
14  public static string GameName;
15 
16  public static ClientCollection PlayingClients;
17  public static GameValues GameValues = new GameValues();
18 
19  public static List<Map> mapPlayList = new List<Map>();
20  public static List<Map> Maps = new List<Map>();
21  static int currentMap = 0;
22  public static int CurrentMap
23  {
24  get { return currentMap; }
25  set
26  {
27  if (value > mapPlayList.Count - 1)
28  {
29  currentMap = 0;
30  }
31  else
32  {
33  currentMap = value;
34  }
35  }
36  }
37 
38  public static Map GetCurrentMap()
39  {
40  if (GameSettings.mapPlayList.Count > 0)
41  return GameSettings.mapPlayList[GameSettings.currentMap];
42  else
43  return null;
44  }
45 
46  public static GameServer GameServer;
47 
48  public static int Speed;
49 
50  #region Settings
51  public static bool BombsExplodeBombs = false;
52  #endregion
53  }
54 
55  public class GameValues
56  {
57  public bool RecievedValues = true;
60 
61  public class PowerupValues
62  {
63  public int MovementSpeed;
64  public float Tickrate;
65  public int Lifes;
66  public int BombRange;
67  public int BombAmount;
68  }
69 
70  public class PowerupDrops
71  {
72  public int Powerups;
73  public int MovementSpeed;
74  public int Tickrate;
75  public int Lifes;
76  public int BombRange;
77  public int BombAmount;
78 
79  public void SetValues(int speed, int rate, int life, int range, int bomb)
80  {
81  MovementSpeed = speed;
82  Tickrate = speed + rate;
83  Lifes = speed + rate + life;
84  BombRange = speed + rate + life + range;
85  BombAmount = speed + rate + life + range + bomb;
86  }
87  }
88  }
89 }
PowerupDrops PowerupDrop
Definition: GameSettings.cs:59
PowerupValues Powerup
Definition: GameSettings.cs:58
void SetValues(int speed, int rate, int life, int range, int bomb)
Definition: GameSettings.cs:79