Beispiel #1
0
 public HttpWrapper(HttpClient client)
 {
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
     _client             = client;
     _client.BaseAddress = new Uri(apiUrl);
     _singleton          = DebugLogSingleton.GetInstance();
 }
Beispiel #2
0
 public BaloonCommand(BaloonFactory factory, BaloonTypes baloonType)
 {
     this._factory    = factory;
     this._baloonType = baloonType;
     this._singleton  = DebugLogSingleton.GetInstance();
     this._singleton.Log <BaloonCommand>("Command", "Initializing baloon command");
 }
Beispiel #3
0
 public TowerCommand(TowerFactory factory, Point location, TowerTypes towerType)
 {
     this._factory   = factory;
     this._location  = location;
     this._towerType = towerType;
     this._singleton = DebugLogSingleton.GetInstance();
     this._singleton.Log <TowerCommand>("Command", "Initializing tower command");
 }
Beispiel #4
0
 private GameStateSingleton()
 {
     Players                = new List <Player>();
     _entities              = new ListItertor <IRenderable>();
     _towerEntities         = new ListItertor <IRenderable>();
     AllowAddPlayer1Baloons = true;
     AllowAddPlayer2Baloons = true;
     InConstructionMode     = false;
     _singleton             = DebugLogSingleton.GetInstance();
     _singleton.Log <GameStateSingleton>("Singleton", "Initializing game state. ");
 }
Beispiel #5
0
 public Game(int width, int height)
 {
     _width  = width;
     _height = height;
     _points = new List <PointF[]>();
     _gameState.AddPlayer(new Player("Player 1 (you)"));
     _waveDirector = new WaveDirector();
     _waveDirector.SetBuilder(new FirstWave());
     _singleton = DebugLogSingleton.GetInstance();
     _singleton.Log <IGameFacade>("Facade", "IGameFacade method: Update use facade pattern.");
     waveCreator    = new Timer(i => _generateWave(), null, 0, 20000);
     _facadeCounter = 0;
 }
Beispiel #6
0
 public Player1Movement()
 {
     _singleton = DebugLogSingleton.GetInstance();
 }
Beispiel #7
0
 public UIButtonsHandler()
 {
     _logSingleton = DebugLogSingleton.GetInstance();
     _currentState = new SpawningMode();
 }
Beispiel #8
0
 public BaloonFactory(bool isPlayer1Factory)
 {
     this.isPlayer1Factory = isPlayer1Factory;
     _singleton            = DebugLogSingleton.GetInstance();
     createdBaloons        = new List <IBaloon>();
 }
Beispiel #9
0
 public MementosStorer()
 {
     _mementos     = new Stack <Memento>();
     _logSingleton = DebugLogSingleton.GetInstance();
 }
Beispiel #10
0
 public FirstWave()
 {
     _singleton = DebugLogSingleton.GetInstance();
 }
Beispiel #11
0
 public WaveDirector()
 {
     _singleton = DebugLogSingleton.GetInstance();
 }
Beispiel #12
0
 public IntermediateDamage()
 {
     _logSingleton = DebugLogSingleton.GetInstance();
 }
Beispiel #13
0
 public WeakDamage()
 {
     _logSingleton = DebugLogSingleton.GetInstance();
 }
Beispiel #14
0
 public StrongDamage()
 {
     _logSingleton = DebugLogSingleton.GetInstance();
 }