예제 #1
0
        private void UpdateDisplay()
        {
            if (qte == null)
            {
                return;
            }

            // Checks if the QTE is done
            qte.Do();
            if (qte.IsDone())
            {
                Hide();
                return;
            }


            combos.text = "";

            if (qte is ComboAction)
            {
                ComboAction comboAction = (ComboAction)qte;
                foreach (string s in comboAction.expectedCombos)
                {
                    combos.text += s + " ";
                }

                combos.text = combos.text.Remove(combos.text.Length - 1);
            }

            slider.transform.localScale = new Vector3(1, 1, 1);
            slider.value = qte.progression;
        }
예제 #2
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;
        }
예제 #3
0
        public void AddCombo(ComboAction[] combo)
        {
            List<CTMBranch> current = branches;
            bool found = true;

            foreach (ComboAction c in combo)
            {
                if (found)
                {
                    found = false;
                    foreach (CTMBranch b in current)
                    {
                        if (c == b.Key)
                        {
                            current = b.Branches;
                            found = true;
                            break;
                        }
                    }
                }

                if (!found)
                {
                    CTMBranch b = new CTMBranch(c);

                    current.Add(b);

                    current = b.Branches;
                }
            }

            if (combo.Length > longest) longest = combo.Length;
        }
예제 #4
0
파일: ComboTree.cs 프로젝트: hvp/Elemental
 public CTBranch this[ComboAction key]
 {
     get
     {
         foreach (CTBranch b in branches)
             if (b.Key == key) return b;
         return null;
     }
 }
예제 #5
0
        public PlayerInputAction(Command start, Command finish, ComboAction tap, ComboAction hold)
        {
            Start  = start;
            Finish = finish;
            Tap    = tap;
            Hold   = hold;

            started = false;
        }
예제 #6
0
 /// <summary>
 ///     WIP
 ///     Gets the spell to cast based on the action
 /// </summary>
 /// <param name="mode"></param>
 /// <returns></returns>
 public static OnAction GetAction(ComboAction mode)
 {
     switch (mode)
     {
         case ComboAction.Q:
             return CastQ;
         case ComboAction.E:
             return CastE;
     }
     return null;
 }
예제 #7
0
        /// <summary>
        ///     WIP
        ///     Gets the spell to cast based on the action
        /// </summary>
        /// <param name="mode"></param>
        /// <returns></returns>
        public static OnAction GetAction(ComboAction mode)
        {
            switch (mode)
            {
            case ComboAction.Q:
                return(CastQ);

            case ComboAction.E:
                return(CastE);
            }
            return(null);
        }
예제 #8
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;
        }
예제 #9
0
 public CTBranch this[ComboAction key]
 {
     get
     {
         foreach (CTBranch b in branches)
         {
             if (b.Key == key)
             {
                 return(b);
             }
         }
         return(null);
     }
 }
예제 #10
0
        public CTBranch this[ComboAction key]
        {
            get
            {
                if (_branches == null)
                {
                    return(null);
                }

                foreach (CTBranch b in _branches)
                {
                    if (b._key == key)
                    {
                        return(b);
                    }
                }
                return(null);
            }
        }
예제 #11
0
 public CTMBranch(ComboAction key)
 {
     Key      = key;
     Branches = new List <CTMBranch>();
 }
예제 #12
0
 public CTMBranch(ComboAction key)
 {
     Key = key;
     Branches = new List<CTMBranch>();
 }
예제 #13
0
 public CTBranch(ComboAction key, CTBranch[] branches)
 {
     _key      = key;
     _branches = branches;
 }
예제 #14
0
        public PlayerInputAction(Command start, Command finish, ComboAction tap, ComboAction hold)
        {
            Start = start;
            Finish = finish;
            Tap = tap;
            Hold = hold;

            started = false;
        }
예제 #15
0
파일: ComboTree.cs 프로젝트: hvp/Elemental
        public CTBranch this[ComboAction key]
        {
            get
            {
                if (_branches == null) return null;

                foreach (CTBranch b in _branches)
                    if (b._key == key) return b;
                return null;
            }
        }
예제 #16
0
파일: ComboTree.cs 프로젝트: hvp/Elemental
 public CTBranch(ComboAction key, CTBranch[] branches)
 {
     _key = key;
     _branches = branches;
 }