예제 #1
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     activated   = true;
     rend.sprite = activatedColor;
     group.UpdatePowerLevel();
 }
예제 #2
0
 public override void LeaveTile(BasicControls basic)
 {
     base.LeaveTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         ((PlayerCharacter)basic).reachedGoal = false;
     }
 }
예제 #3
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         ((PlayerCharacter)basic).reachedGoal = true;
         goalReachedEvent.Invoke();
     }
 }
예제 #4
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         basic.DeathEffect();
         killPlayerEvent.Invoke();
     }
 }
예제 #5
0
 public override void LeaveTile(BasicControls basic)
 {
     base.LeaveTile(basic);
     if (!multiSolve && group.oneTimeSolve)
     {
         return;
     }
     activated = false;
     group.UpdatePowerLevel();
     rend.sprite = deactivatedColor;
 }
예제 #6
0
    public override void EndOnTile(BasicControls basic)
    {
        base.EndOnTile(basic);
        if (!active || basic.type != CharacterType.PLAYER)
        {
            return;
        }

        PlayerCharacter player = (PlayerCharacter)basic;

        player.DeathEffect();
        killPlayerEvent.Invoke();
    }
예제 #7
0
        public Controller()
        {
            _mainForm             = new BasicControls(this);
            _mainForm.FormClosed += MainFormClosed;
            _mainForm.UpdateForm();

            var serverAccounts = AppModel.ServerAccounts.Query().ToList();

            foreach (var serverAccount in serverAccounts)
            {
                if (SelectedServerAccountId == 0)
                {
                    SelectedServerAccountId = serverAccount.Id;
                }

                var model = AccountModel.GetModel(serverAccount.Id);

                _syncAccounts.Add(serverAccount.Id, new SyncAccounts(this, model));
            }
        }
예제 #8
0
        private void NavView_ItemInvoked(object sender, NavigationViewItemInvokedEventArgs e)
        {
            var nviContent = e.InvokedItem.ToString();

            if (_pages.ContainsKey(nviContent))
            {
                //navView.Content = _pages[nviContent];
                _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
            }
            else
            {
                switch (nviContent)
                {
                case "Theme Manager":
                    var tm = new ThemeManagerPage();
                    _pages.Add("Theme Manager", tm);
                    //navView.Content = tm;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "Basic Controls":
                    var item = new BasicControls();
                    _pages.Add("Basic Controls", item);
                    //navView.Content = item;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "ContentDialog":
                    var dia = new Dialogs();
                    _pages.Add("ContentDialog", dia);
                    //navView.Content = dia;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "Icons":
                    var ico = new IconsPage();
                    _pages.Add("Icons", ico);
                    //navView.Content = ico;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "NavigationView":
                    var nv = new NavViewPage();
                    _pages.Add("NavigationView", nv);
                    //navView.Content = nv;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "Settings":
                    var st = new SettingsPage();
                    _pages.Add("Settings", st);
                    //navView.Content = st;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "Color Picker":
                    var c = new ColorPickerPage();
                    _pages.Add("Color Picker", c);
                    //navView.Content = c;
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "Frame":
                    var f = new FramePage();
                    _pages.Add("Frame", f);
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;

                case "NumberBox":
                    var nb = new NumberBoxPage();
                    _pages.Add("NumberBox", nb);
                    _frame.Navigate(_pages[nviContent].GetType(), null, e.RecommendedNavigationTransitionInfo);
                    break;
                }
            }
            navView.Header = nviContent;
        }
예제 #9
0
 public override bool DoAction(BasicControls player, Direction direction)
 {
     return(false);
 }
예제 #10
0
 public virtual void EndOnTile(BasicControls basic)
 {
     currentCharacter = basic;
 }
예제 #11
0
 public virtual void LeaveTile(BasicControls basic)
 {
     currentCharacter = null;
 }
예제 #12
0
 public abstract bool DoAction(BasicControls player, Direction direction);
예제 #13
0
 public override bool DoAction(BasicControls player, Direction direction)
 {
     ChangeState();
     group.UpdatePowerLevel();
     return(true);
 }
예제 #14
0
    public bool IsDangerous(int x, int y)
    {
        BasicControls basic = GetTile(x, y).currentCharacter;

        return(basic && basic.type == CharacterType.ENEMY);
    }