示例#1
0
 // Start is called before the first frame update
 void Start()
 {
     text  = GetComponent <Text>();
     ascii = new Dictionary <int, string>();
     foreach (var key in Keycodes.getCodes())
     {
         ascii.Add((int)key, key.ToString());
     }
 }
示例#2
0
    private void Awake()
    {
        if (singleton != null)
        {
            return;
        }

        singleton = this;
        Keycodes.GetKeycodes();
    }
示例#3
0
    // Start is called before the first frame update
    void Awake()
    {
        if (instance == null)
        {
            DontDestroyOnLoad(gameObject);
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
        gameOver = false;
        winNum   = 0;

        Keycodes.addCodes();
    }
示例#4
0
    // Update is called once per frame
    void Update()
    {
        int myCode = (int)Keycodes.getPlayerCode(playerNumber);

        text.text = Mutilate(ascii[myCode]);
    }
示例#5
0
 public void RandomizeKey()
 {
     Keycodes.getNewCode(playerNum);
     currentKey = Keycodes.getPlayerCode(playerNum);
 }
示例#6
0
 public void BlockKey()
 {
     Keycodes.BlockCode(playerNum);
     currentKey = KeyCode.At;
 }