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; }
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; }
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; }
public CTBranch this[ComboAction key] { get { foreach (CTBranch b in branches) if (b.Key == key) return b; return null; } }
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; }
/// <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); }
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; }
public CTBranch this[ComboAction key] { get { foreach (CTBranch b in branches) { if (b.Key == key) { return(b); } } return(null); } }
public CTBranch this[ComboAction key] { get { if (_branches == null) { return(null); } foreach (CTBranch b in _branches) { if (b._key == key) { return(b); } } return(null); } }
public CTMBranch(ComboAction key) { Key = key; Branches = new List <CTMBranch>(); }
public CTMBranch(ComboAction key) { Key = key; Branches = new List<CTMBranch>(); }
public CTBranch(ComboAction key, CTBranch[] branches) { _key = key; _branches = branches; }
public CTBranch this[ComboAction key] { get { if (_branches == null) return null; foreach (CTBranch b in _branches) if (b._key == key) return b; return null; } }