36 lines
731 B
C#
36 lines
731 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Convention;
|
|
using Dreamteck.Splines;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.InputSystem.Utilities;
|
|
using UnityEngine.UI;
|
|
|
|
public class Control : MonoBehaviour
|
|
{
|
|
public List<string> Typings = new();
|
|
|
|
private void Catching(char ch)
|
|
{
|
|
Typings.Add(ch.ToString());
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
Keyboard.current.onTextInput += Catching;
|
|
StartCoroutine(DelayUpdate());
|
|
}
|
|
|
|
IEnumerator DelayUpdate()
|
|
{
|
|
while(true)
|
|
{
|
|
if (Typings.Count > 0)
|
|
Typings.RemoveAt(0);
|
|
yield return new WaitForSeconds(0.25f);
|
|
}
|
|
}
|
|
}
|