public override void ExecuteResponseAction(TextContents contents) { foreach (InjectableResponseAction action in actions) { action.ExecuteResponseAction(contents); } }
/// <summary> /// Constructs a cell with a double as its content. /// </summary> public Cell(string cellName, double content) { _cellName = cellName; _textContents = new TextContents(String.Empty, false); _doubleContents = new DoubleContents(content, true); //contains a double _formulaContents = new FormulaContents(null, null, false); }
/// <summary> /// Constructs a cell with a string as its content. /// </summary> public Cell(string cellName, string content) { _cellName = cellName; _textContents = new TextContents(content, true); //contains a string _doubleContents = new DoubleContents(0, false); _formulaContents = new FormulaContents(null, null, false); }
private readonly TextContents _textContents; //Keeps track of the contents as a string #endregion Fields #region Constructors /// <summary> /// Constructs an empty cell. /// </summary> public Cell(string cellName) { _cellName = cellName; _textContents = new TextContents(String.Empty, true); //contains an empty string _doubleContents = new DoubleContents(0, false); _formulaContents = new FormulaContents(null, null, false); }
public override void ExecuteResponseAction(TextContents contents) { if (DialogState.hasVisited == null) { DialogState.hasVisited = new Dictionary <int, bool>(); } DialogState.hasVisited[contents.id] = true; }
public static void SetDisplayText(TextContents contents, NPC npc = null) { if (instance != null) { instance.displayText = contents; _npcHead = npc; } }
public override void ExecuteResponseAction(TextContents contents) { if (DialogState.hints == null) { DialogState.hints = new List <HintContent>(); } DialogState.hints.Add(hint); }
public void CallEvent(TextContents toDisplay, int callerId = -1, bool ignoreCount = false, UnityAction OnClick = null) { if (_currentUI == null) { _currentUI = GameObject.Instantiate(_uiPrefab, _canvasTransform); _currentUI.GetComponent <TextContentUIDisplay>().Start(); } //TextContentUIDisplay.SetDisplayText(toDisplay, OnClick); if (!ignoreCount) { _eventsToCall -= 1; if (_eventsToCall <= 0) { #warning Victory condition here } } }
public void DeleteText(int startPos, int endPos) { if (!Editable) { return; } if (startPos < 0) { startPos = 0; } if (endPos < 0 || endPos > textExpert.Length) { endPos = textExpert.Length; } if (startPos > endPos) { startPos = endPos; } if (TextContents == null) { return; } // This provider allows us to avoid string manip when // the control itself supports manipulation directly. if (insertDeleteProvider != null) { try { insertDeleteProvider.DeleteText(startPos, endPos); } catch (ElementNotEnabledException e) { Log.Debug(e); } return; } TextContents = TextContents.Remove(startPos, endPos - startPos); }
public virtual void ExecuteResponseAction(TextContents contents) { Debug.Log("InjectableResponseAction::ExecuteResponseAction " + contents.id); }
/// <summary> /// Constructs a cell with a Formula as its content. /// </summary> public Cell(string cellName, Formula content, object value) { _cellName = cellName; _textContents = new TextContents(String.Empty, false); _doubleContents = new DoubleContents(0, false); _formulaContents = new FormulaContents(content, value, true); //contains a formula }
public override void ExecuteResponseAction(TextContents contents) { sound.PlayDelayed(0.4f); }