Esempio n. 1
0
        public void AddAction(ComboAction action)
        {
            if (action == ComboAction.Pause && _branch == null)
            {
                return;
            }

            if (_branch != null)
            {
                _branch = _branch[action];
            }

            if (_branch == null)
            {
                _branch = _tree[action];
            }

            if (_branch != null)
            {
                Debug.Post(_branch.Key);
            }
            else
            {
                Debug.Post("-");
            }

            _validTimer = 0;
        }
Esempio n. 2
0
        public ComboTree Finalize()
        {
            CTBranch[] final = new CTBranch[branches.Count];

            for (int i = 0; i < branches.Count; i++)
                final[i] = fillBranch(branches[i]);

            return new ComboTree(final, longest);
        }
Esempio n. 3
0
        public ComboTree Finalize()
        {
            CTBranch[] final = new CTBranch[branches.Count];

            for (int i = 0; i < branches.Count; i++)
            {
                final[i] = fillBranch(branches[i]);
            }

            return(new ComboTree(final, longest));
        }
Esempio n. 4
0
        //recursive portion of finalize
        private CTBranch fillBranch(CTMBranch from)
        {
            if(from.Branches.Count == 0)
                return new CTBranch(from.Key, null);

            CTBranch[] branches = new CTBranch[from.Branches.Count];

            for (int i = 0; i < from.Branches.Count; i++)
                branches[i] = fillBranch(from.Branches[i]);

            return new CTBranch(from.Key, branches);
        }
Esempio n. 5
0
        public int Update(float seconds)
        {
            _validTimer += seconds;
            if (_validTimer > 1)
            {
                _validTimer = 0;
                _branch = null;
                Debug.Post("-");
            }

            return -1;
        }
Esempio n. 6
0
        public int Update(float seconds)
        {
            _validTimer += seconds;
            if (_validTimer > 1)
            {
                _validTimer = 0;
                _branch     = null;
                Debug.Post("-");
            }


            return(-1);
        }
Esempio n. 7
0
        public void AddAction(ComboAction action)
        {
            if (action == ComboAction.Pause && _branch == null) return;

            if(_branch != null)_branch = _branch[action];

            if (_branch == null)_branch = _tree[action];

            if (_branch != null) Debug.Post(_branch.Key);
            else Debug.Post("-");

            _validTimer = 0;
        }
Esempio n. 8
0
        //recursive portion of finalize
        private CTBranch fillBranch(CTMBranch from)
        {
            if (from.Branches.Count == 0)
            {
                return(new CTBranch(from.Key, null));
            }

            CTBranch[] branches = new CTBranch[from.Branches.Count];

            for (int i = 0; i < from.Branches.Count; i++)
            {
                branches[i] = fillBranch(from.Branches[i]);
            }

            return(new CTBranch(from.Key, branches));
        }
Esempio n. 9
0
 public ComboTree(CTBranch[] tree, int longest)
 {
     _longest = longest;
     branches = tree;
 }
Esempio n. 10
0
 public CTBranch(ComboAction key, CTBranch[] branches)
 {
     _key = key;
     _branches = branches;
 }