private void UpdateIOInstance(IComponentIO io, int timePast) { if (io.hackedTime <= 0) { return; } io.hackedTime = Mathf.Clamp(io.hackedTime - timePast, 0, int.MaxValue); }
public virtual void OnInput(IComponentIO source, string input) { if (hackedTime > 0) { return; } entityBody = GetComponent <Entity>(); if (entityBody == null) { Debug.Log($"OnInput: {source} {input} {entityBody}"); return; } parsedInput = new ParsedPath(entityBody.currentDirectory, input); if (!HandleInputError(source, parsedInput.error)) { return; } parsedInput = null; }
public void OnInput(IComponentIO source, string input) { IOTerminal.I.AppendTextLine(input); source.GetOnOutputEvent().RemoveListener(OnInput); }