Example #1
0
 private void UpdateIOInstance(IComponentIO io, int timePast)
 {
     if (io.hackedTime <= 0)
     {
         return;
     }
     io.hackedTime = Mathf.Clamp(io.hackedTime - timePast, 0, int.MaxValue);
 }
Example #2
0
 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;
 }
Example #3
0
 public void OnInput(IComponentIO source, string input)
 {
     IOTerminal.I.AppendTextLine(input);
     source.GetOnOutputEvent().RemoveListener(OnInput);
 }