private void Update() { switch (state) { case HackState.Pre: if ((Time.time - cursorTimer) >= cursorBlinkTime) { blink = !blink; cursorTimer = Time.time; } inputLine.text = blink ? ">_" : ">"; outputLine.text = ""; break; case HackState.Activated: inputLine.text = text[index]; outputLine.text = ""; if ((Time.time - textTimer) >= successTime) { outputLine.text = successText; } if ((Time.time - textTimer) >= animTime) { index++; textTimer = Time.time; if (index >= text.Length) { state = HackState.Complete; completeEvent.Invoke(); } } break; case HackState.Complete: break; } }
public void Hack(WorldObject envoker, HackState state) { }
public void Activate() { textTimer = Time.time; state = HackState.Activated; }