Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public void Hack(WorldObject envoker, HackState state)
 {
 }
Ejemplo n.º 3
0
 public void Activate()
 {
     textTimer = Time.time;
     state     = HackState.Activated;
 }