Ejemplo n.º 1
0
 public static void NewSelectPlayer(LiveShell _live)
 {
     while (_selectedPlayers.Count > 0)
     {
         LiveShell _toRem = _selectedPlayers.First();
         _toRem.IsSelectP = false;
     }
     _live.IsSelectP = true;
 }
Ejemplo n.º 2
0
 public static void ShiftSelectPlayer(LiveShell _live)
 {
     if (_selectedPlayers.Contains(_live))
     {
         _selectedPlayers.Remove(_live);
         _live.GetLive.IsSelect = false;
     }
     else
     {
         _selectedPlayers.Add(_live);
         _live.GetLive.IsSelect = true;
     }
     _live.RePaint();
 }
Ejemplo n.º 3
0
        public static void SelectPlayer(LiveShell _live)
        {
            List <LiveShell> _toRePaint = new List <LiveShell>(_selectedPlayers);

            foreach (LiveShell _liveController in _selectedPlayers)
            {
                _liveController.GetLive.IsSelect = false;
            }

            _selectedPlayers.Clear();
            _selectedPlayers.Add(_live);
            _live.GetLive.IsSelect = true;

            _toRePaint.Add(_live);
            foreach (LiveShell _liveController in _toRePaint)
            {
                _liveController.RePaint();
            }
        }
Ejemplo n.º 4
0
        public Presenter(LokPokWindow _window, IData _data)
        {
            _lives        = _data.Load();
            _canvas       = _window.LokpokCanvas;
            _window.Move += this.Move;

            //_window.Move += (DIRECTION direction) =>
            //{
            //    foreach (LiveShell _currentCharacter in Storage.SelectedPlayers)
            //    {
            //        _currentCharacter.GetLive.Move(direction);
            //        Canvas.SetLeft(_currentCharacter, _currentCharacter.GetLive.GetLeft);
            //        Canvas.SetTop(_currentCharacter, _currentCharacter.GetLive.GetTop);
            //        _currentCharacter.GetLive.ChangeHealthPoints(-10);
            //    }
            //};

            foreach (Live _live in _lives)
            {
                LiveShell _liveShell = new LiveShell(_live);
                Storage.AddLive(_liveShell);

                _liveShell.GetMainWindowShift += _window.GetShiftDown;
                _liveShell.MessageInLog       += _window.PrintInLog;

                _liveShell.UpdateBar += () =>
                {
                    _window.HpBarsStackPanel1.Children.Clear();
                    //MessageBox.Show(Storage.SelectedHpBars.Count.ToString());
                    foreach (var hpbar in _liveShell.HpBarsList)
                    {
                        _window.HpBarsStackPanel1.Children.Add(hpbar);
                    }
                };

                _canvas.Children.Add(_liveShell.ShellGrid);
                Canvas.SetLeft(_liveShell.ShellGrid, _live.GetLeft);
                Canvas.SetTop(_liveShell.ShellGrid, _live.GetTop);
            }
        }
Ejemplo n.º 5
0
 public static void AddLive(LiveShell _player)
 {
     _lives.Add(_player);
 }