Esempio n. 1
0
        public GameEnds(RoomItem item, WiredHandler handler, GameManager gameManager)
        {
            this.item = item;
            this.handler = handler;
            this.gameEndsDeletgate = new RoomEventDelegate(gameManager_OnGameEnd);

            gameManager.OnGameEnd += gameEndsDeletgate;
        }
Esempio n. 2
0
        public GiveScore(int maxCountPerGame, int scoreToGive, GameManager gameManager, uint itemID)
        {
            this.maxCountPerGame = maxCountPerGame;
            this.currentGameCount = 0;
            this.scoreToGive = scoreToGive;
            this.delegateFunction = new RoomEventDelegate(gameManager_OnGameStart);
            this.gameManager = gameManager;
            this.itemID = itemID;

            gameManager.OnGameStart += delegateFunction;
        }
Esempio n. 3
0
        public Timer(RoomItem item, WiredHandler handler, int cycleCount, GameManager gameManager)
        {
            this.item = item;
            this.handler = handler;
            this.requiredCycles = cycleCount;
            this.currentCycle = 0;
            this.delegateFunction = new RoomEventDelegate(gameManager_OnGameEnd);

            gameManager.OnGameEnd += delegateFunction;
            this.disposed = false;
        }
Esempio n. 4
0
        public ScoreAchieved(RoomItem item, WiredHandler handler, int scoreLevel, GameManager gameManager)
        {
            this.item = item;
            this.handler = handler;
            this.scoreLevel = scoreLevel;
            this.used = false;
            this.scoreChangedDelegate = new TeamScoreChangedDelegate(gameManager_OnScoreChanged);
            this.gameEndDeletgate = new RoomEventDelegate(gameManager_OnGameEnd);

            gameManager.OnScoreChanged += scoreChangedDelegate;
            gameManager.OnGameEnd += gameEndDeletgate;
        }
Esempio n. 5
0
 public void Dispose()
 {
     gameManager.OnGameStart -= delegateFunction;
     gameManager = null;
     delegateFunction = null;
 }
Esempio n. 6
0
File: Room.cs Progetto: BjkGkh/Boon
 public GameManager GetGameManager()
 {
     if (_gameManager == null)
         _gameManager = new GameManager(this);
     return _gameManager;
 }