Ejemplo n.º 1
0
 private void MogumoguInitialize()
 {
     headAnimationNowCount = headAnimationCount;
     headAnimationNowTime  = headAnimationTime;
     eHeadStatus           = E_HEAD_STATUS.CLOSE;
     UVRect.y = (int)eHeadStatus * UVRect.height;
     headObj_RawImage.uvRect = UVRect;
 }
Ejemplo n.º 2
0
    private void MogumoguUpdate()
    {
        headAnimationNowTime -= Time.deltaTime;

        if (headAnimationNowTime <= 0)
        {
            headAnimationNowTime    = headAnimationTime;
            eHeadStatus             = (E_HEAD_STATUS)(((int)eHeadStatus + 1) % ((int)E_HEAD_STATUS.OPEN + 1));
            UVRect.y                = (int)eHeadStatus * UVRect.height;
            headObj_RawImage.uvRect = UVRect;
            headAnimationNowCount--;
        }

        if (headAnimationNowCount == 0)
        {
            ChangeStatus(E_HEAD_STATUS.CLOSE);
        }
    }
Ejemplo n.º 3
0
    private void ChangeStatus(E_HEAD_STATUS changeStatus)
    {
        switch (eStatus)
        {
        case E_HEAD_STATUS.CLOSE:
            CloseFinalize();
            break;

        case E_HEAD_STATUS.OPEN:
            OpenFinalize();
            break;

        case E_HEAD_STATUS.MOGUMOGU:
            MogumoguFinalize();
            break;

        case E_HEAD_STATUS.ADJUST:
            AdjustFinalize();
            break;
        }

        eStatus = changeStatus;
        switch (eStatus)
        {
        case E_HEAD_STATUS.CLOSE:
            CloseInitialize();
            break;

        case E_HEAD_STATUS.OPEN:
            OpenInitialize();
            break;

        case E_HEAD_STATUS.MOGUMOGU:
            MogumoguInitialize();
            break;

        case E_HEAD_STATUS.ADJUST:
            AdjustInitialize();
            break;
        }
    }