Esempio n. 1
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     activated   = true;
     rend.sprite = activatedColor;
     group.UpdatePowerLevel();
 }
Esempio n. 2
0
 public override void LeaveTile(BasicControls basic)
 {
     base.LeaveTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         ((PlayerCharacter)basic).reachedGoal = false;
     }
 }
Esempio n. 3
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         ((PlayerCharacter)basic).reachedGoal = true;
         goalReachedEvent.Invoke();
     }
 }
Esempio n. 4
0
 public override void EndOnTile(BasicControls basic)
 {
     base.EndOnTile(basic);
     if (basic.type == CharacterType.PLAYER)
     {
         basic.DeathEffect();
         killPlayerEvent.Invoke();
     }
 }
Esempio n. 5
0
 public override void LeaveTile(BasicControls basic)
 {
     base.LeaveTile(basic);
     if (!multiSolve && group.oneTimeSolve)
     {
         return;
     }
     activated = false;
     group.UpdatePowerLevel();
     rend.sprite = deactivatedColor;
 }
Esempio n. 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();
    }
Esempio n. 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));
            }
        }
Esempio n. 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;
        }
Esempio n. 9
0
 public override bool DoAction(BasicControls player, Direction direction)
 {
     return(false);
 }
Esempio n. 10
0
 public virtual void EndOnTile(BasicControls basic)
 {
     currentCharacter = basic;
 }
Esempio n. 11
0
 public virtual void LeaveTile(BasicControls basic)
 {
     currentCharacter = null;
 }
Esempio n. 12
0
 public abstract bool DoAction(BasicControls player, Direction direction);
Esempio n. 13
0
 public override bool DoAction(BasicControls player, Direction direction)
 {
     ChangeState();
     group.UpdatePowerLevel();
     return(true);
 }
Esempio n. 14
0
    public bool IsDangerous(int x, int y)
    {
        BasicControls basic = GetTile(x, y).currentCharacter;

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