예제 #1
0
    public void onChangePartII()
    {
        int val = -1;

        int.TryParse(partIIState.text, out val);
        if (val != -1)
        {
            characterLoader.playPart2Animation(charAnimator, currCharIndex, val);
        }
    }
예제 #2
0
    /**
     * sets the parameter for the part's animation layer to be value given
     */
    public void setPartLayerParam(int cCode, GameObject c, int partIndex, int value)
    {
        Animator a = c.GetComponent <Animator>();

        switch (partIndex)
        {
        case 1:                 //part 1
            characterLoader.playPart1Animation(a, cCode, value);
            break;

        case 2:                 //part 2
            characterLoader.playPart2Animation(a, cCode, value);
            break;

        default:
            Debug.Log("unknown layer");
            break;
        }
    }