Example #1
0
        public void OnUnload()
        {
            Debug.WriteLine("HDTQUESTREWARD: DESTROY");
            // handle unloading here. HDT does not literally unload the assembly
            CoreAPI.OverlayCanvas.Children.Remove(_canvas);

            _canvas = null;
            _pLogic = null;
        }
Example #2
0
        public void OnLoad()
        {
            Debug.WriteLine("HDTQUESTREWARD: OnLoad");
            //when it's loaded upon each restart/turned on by the user

            _canvas = new CardRewardCanvas();
            CoreAPI.OverlayCanvas.Children.Add(_canvas);

            _pLogic = new PluginLogic(_canvas);
            // All event handlers during the game..
            GameEvents.OnGameStart.Add(_pLogic.GameStart);
            GameEvents.OnPlayerHandMouseOver.Add(_pLogic.OnCardHover);
            GameEvents.OnPlayerMinionMouseOver.Add(_pLogic.OnCardHover);

            GameEvents.OnMouseOverOff.Add(_pLogic.ForceHide);
            GameEvents.OnInMenu.Add(_pLogic.ForceHide);

            // DeckManagerEvents.OnDeckSelected.Add(null);
        }
        internal PluginLogic(CardRewardCanvas canvas)
        {
            _canvas = canvas;

            HideIfNecessary();
        }