Пример #1
0
        public GameStarts(RoomItem item, WiredHandler handler, GameManager gameManager)
        {
            this.item = item;
            this.handler = handler;
            this.gameStartsDeletgate = new RoomEventDelegate(gameManager_OnGameStart);

            gameManager.OnGameStart += gameStartsDeletgate;
        }
Пример #2
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;
        }
Пример #3
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;
        }
Пример #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;
        }
Пример #5
0
 public void Dispose()
 {
     gameManager.OnGameStart -= delegateFunction;
     gameManager = null;
     delegateFunction = null;
 }
Пример #6
0
 internal GameManager GetGameManager()
 {
     if (game == null)
         game = new GameManager(this);
     return game;
 }