示例#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
 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;
        }
 /// <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
        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
 public CTBranch(ComboAction key, CTBranch[] branches)
 {
     _key = key;
     _branches = branches;
 }