Exemplo n.º 1
0
    public static LogEntry.LetterPayload[] GetLetterPayloadsFromCurrentWord()
    {
        LogEntry.LetterPayload[] toRet = new LogEntry.LetterPayload[currentSelection.Count];
        for (int i = 0; i < currentSelection.Count; ++i)
        {
            toRet[i] = new LogEntry.LetterPayload(currentWord[i] + "", (int)currentSelection[i].x, (int)currentSelection[i].y);
        }

        return(toRet);
    }
Exemplo n.º 2
0
    // BNW_LetterSelected or BNW_LetterDeselected logging
    public static void LogAction(string key, string letter, int x, int y)
    {
        if (!GameManagerScript.logging)
        {
            return;
        }

        //Debug.Log("Attempts to log data");
        LogEntry.LetterPayload payload = new LogEntry.LetterPayload();
        payload.SetValues(letter, x, y);

        LetterLogEntry entry = new LetterLogEntry();

        entry.SetValues(key, "BNW_Action", payload);
        Log(entry);

        ++BoxScript.totalInteractions;
    }
Exemplo n.º 3
0
    // BNW_LetterSelected or BNW_LetterDeselected logging
    public static void LogAction(string key, Vector2 pos)
    {
        if (!GameManagerScript.logging)
        {
            return;
        }

        //Debug.Log("Attempts to log data");
        string letter = BoxScript.grid[(int)pos.x, (int)pos.y].gameObject.GetComponent <BoxScript>().Letter;

        LogEntry.LetterPayload payload = new LogEntry.LetterPayload();
        payload.SetValues(letter, (int)pos.x, (int)pos.y);
        LetterLogEntry entry = new LetterLogEntry();

        entry.SetValues(key, "BNW_Action", payload);
        Log(entry);

        // TODO: this needs to happen elsewhere
        ++BoxScript.totalInteractions;
    }