예제 #1
0
    /* ------------- Glyph sequences ------------ */

    public void glyphPressed(int glyphId)
    {
        if (!waitingForGlyphs)
        {
            return;
        }

        GlyphType type = glyphOrder [currGlyphInSeq];

        switch (type)
        {
        case GlyphType.Hat:
            Debug.Log("Selected hat " + glyphId);
            currSequence.hat = glyphId;
            break;

        case GlyphType.Poncho:
            Debug.Log("Selected poncho " + glyphId);
            currSequence.poncho = glyphId;
            break;

        case GlyphType.Action:
            currSequence.action = glyphId % 2 == 0
                                        ? ActionGlyph.Down : ActionGlyph.Up;
            Debug.Log("Selected action " + currSequence.action);
            break;
        }

        currGlyphInSeq++;
        currentGlyphIdSequence.Add(glyphId);
        principalSymbolSet.renderGlyphs(currentGlyphIdSequence);
        if (currGlyphInSeq >= glyphOrder.Count)
        {
            CompleteGlyphSequence();
        }
    }