Esempio n. 1
0
 public void OnAttackClicked()
 {
     WidgetManager.GetInstance().Show(m_CanvasEnemyList.gameObject, false, false);
     m_CanvasEnemyList.OnEnemySelected = OnAttackEnemySelected;
     m_CanvasEnemyList.Show();
     m_CanvasEnemyList.SetColumn(0);
 }
Esempio n. 2
0
        private void OnSelectCharacter(int _charaId)
        {
            m_SelectedCharacterId = _charaId;
            Weapon equippedWeapon = GameStateManager.GetInstance().GetCharacter(_charaId).m_EquippedWeapon;

            WidgetManager.GetInstance().Show(m_CanvasWeaponSelector.gameObject, false, false);
            m_CanvasWeaponSelector.Activate(equippedWeapon);
        }
Esempio n. 3
0
 void Close()
 {
     WidgetManager.GetInstance().Hide();
     if (m_OnClose != null)
     {
         OnClose();
     }
 }
        void ShowTab(Canvas _tabCanvas)
        {
            //HideAllTab();
            WidgetManager.GetInstance().Hide();
            WidgetManager.GetInstance().Show(_tabCanvas.gameObject, true, false);

            //_tabCanvas.gameObject.SetActive(true);
        }
Esempio n. 5
0
        public void OnMagicClicked()
        {
            WidgetManager.GetInstance().Show(m_CanvasMagicList.gameObject, false, false);
            int characterId = GameTurnManager.GetInstance().GetCurrentPawn().GetComponent <PawnBehavior>().m_CharacterId;

            MagicId[] availableMagic = GameStateManager.GetInstance().GetCharacter(characterId).m_AvailableMagic;
            m_CanvasMagicList.InitializeMagicList(availableMagic);

            m_CanvasMagicList.OnClicked = OnMagicMagicSelected;
        }
        private void Cancel()
        {
            WidgetManager.GetInstance().Hide();
            if (OnCanvasClosed != null)
            {
                OnCanvasClosed();
            }

            GameMaster.GetInstance().TurnHistory_RemoveHighlightedEnemies();
            GameMaster.GetInstance().m_UITurnHistory.HidePreview();
        }
Esempio n. 7
0
        public CorkBoardViewModel(CorkBoardView win)
        {
            window = win;

            NoteViewModel  = new NoteViewModel();
            StampViewModel = new StampViewModel();

            viewSource.Source  = WidgetManager.GetInstance().Widgets;
            viewSource.Filter += viewSource_Filter;
            WidgetView         = viewSource.View;

            SetupEvents();
        }
Esempio n. 8
0
 private void BindCommands()
 {
     NewStampCommand = new RelayCommand(x =>
     {
         WidgetManager.GetInstance()
         .Widgets.Add(new Stamp
         {
             Text  = x.ToString(),
             Angle = GetRandomAngle(),
             X     = 10,
             Y     = 10
         });
     });
 }
Esempio n. 9
0
 private void BindCommands()
 {
     NewNoteCommand = new RelayCommand(x =>
     {
         WidgetManager.GetInstance()
         .Widgets.Add(new Note
         {
             Body      = x.ToString(),
             Angle     = GetRandomAngle(),
             X         = 10,
             Y         = 10,
             Timestamp = DateTime.Now,
             Color     = GetRandomColor()
         });
     });
 }
Esempio n. 10
0
        private void OnMagicMagicSelected(MagicId _id)
        {
            //get the action
            MagicDescription desc        = MagicManager.GetInstance().GetDescription(_id);
            ActionRunner     magicAction = GameTurnManager.GetInstance().GetCurrentPawn().GetComponent <PawnActions>().GetAction(_id);

            magicAction.ActionDescription = desc;

            //set the action in the game master
            GameMaster.GetInstance().SetSelectedAction(magicAction);

            //show enemy selection
            WidgetManager.GetInstance().Show(m_CanvasEnemyList.gameObject, false, false);
            m_CanvasEnemyList.OnEnemySelected = OnMagicEnemySelected;
            m_CanvasEnemyList.OnCanvasClosed  = OnMagicEnemyClosed;
            m_CanvasEnemyList.Show();
            m_CanvasEnemyList.SetColumn(1);
        }
Esempio n. 11
0
 public override void OnExit()
 {
     WidgetManager.GetInstance().HideAll();
 }
Esempio n. 12
0
        private void NoteControl_GotFocus(object sender, RoutedEventArgs e)
        {
            var w = (IWidget)DataContext;

            WidgetManager.GetInstance().ChangeZOrder(w);
        }
Esempio n. 13
0
 private void onCanvasClose()
 {
     WidgetManager.GetInstance().Hide();
     m_OnCanvasClose();
 }
Esempio n. 14
0
 private void onWeaponClicked(ref Weapon wep)
 {
     WidgetManager.GetInstance().Hide();
     m_OnWeaponSelected(wep);
     m_OnCanvasClose();
 }
Esempio n. 15
0
 public void HideActionsMenu()
 {
     WidgetManager.GetInstance().Hide();
     m_ActionsMenu.Hide();
 }
Esempio n. 16
0
 public void ShowActionsMenu()
 {
     WidgetManager.GetInstance().Show(m_ActionsMenu.gameObject, false, false);
     m_ActionsMenu.Show();
 }