Esempio n. 1
0
 public void Dispose()
 {
     gameManager.OnGameStart -= delegateFunction;
     gameManager = null;
     delegateFunction = null;
     handler = null;
 }
Esempio n. 2
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. 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;
        }
Esempio n. 4
0
File: Timer.cs Progetto: BjkGkh/R106
        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. 5
0
        public GiveScore(int maxCountPerGame, int scoreToGive, GameManager gameManager, RoomItem item, WiredHandler handler)
        {
            this.maxCountPerGame = maxCountPerGame;
            this.currentGameCount = 0;
            this.scoreToGive = scoreToGive;
            this.delegateFunction = new RoomEventDelegate(gameManager_OnGameStart);
            this.gameManager = gameManager;
            this.item = item;
            this.handler = handler;

            gameManager.OnGameStart += delegateFunction;
        }
Esempio n. 6
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. 7
0
File: Room.cs Progetto: habb0/Bfly
 internal GameManager GetGameManager()
 {
     if (game == null)
         game = new GameManager(this);
     return game;
 }