コード例 #1
0
ファイル: WeaselTracker.cs プロジェクト: mmw125/WeaselTracker
 public WeaselTracker(WeaselDisplay display)
 {
     _display = display;
     // Hide in menu, if necessary
     if (Config.Instance.HideInMenu && CoreAPI.Game.IsInMenu)
     {
         _display.Hide();
     }
 }
コード例 #2
0
        public void OnLoad()
        {
            _display = new WeaselDisplay();
            Core.OverlayCanvas.Children.Add(_display);
            _tracker = new WeaselTracker(_display);
            Core.OverlayCanvas.Children.Add(_tracker.GetDisplay());

            GameEvents.OnGameStart.Add(_tracker.GameStart);
            GameEvents.OnGameEnd.Add(_tracker.GameEnd);
            DeckManagerEvents.OnDeckSelected.Add(_tracker.OnSelectDeck);

            GameEvents.OnPlayerCreateInPlay.Add(_tracker.OnPlayerPlay);
            GameEvents.OnPlayerPlay.Add(_tracker.OnPlayerPlay);
            GameEvents.OnPlayerDeckDiscard.Add(_tracker.OnPlayerDraw);
            GameEvents.OnPlayerCreateInDeck.Add(_tracker.OnPlayerCreateInDeck);

            GameEvents.OnOpponentCreateInPlay.Add(_tracker.OnOpponentCreateInPlay);
            GameEvents.OnOpponentPlay.Add(_tracker.OnOpponentPlay);
            GameEvents.OnOpponentHandDiscard.Add(_tracker.OnOppenentDiscard);
            GameEvents.OnOpponentDeckDiscard.Add(_tracker.OnOppenentDiscard);
            GameEvents.OnOpponentCreateInDeck.Add(_tracker.OnOpponentCreateInDeck);
        }