Esempio n. 1
0
    private Sprite ImageTypeToSprite(UDC.ImageType imageType)
    {
        string path = "";

        switch (imageType)
        {
        case UDC.ImageType.Left:
            path = "Sprites/UDCommand/leftArrow";
            break;

        case UDC.ImageType.Down:
            path = "Sprites/UDCommand/downArrow";
            break;

        case UDC.ImageType.Right:
            path = "Sprites/UDCommand/rightArrow";
            break;

        case UDC.ImageType.Up:
            path = "Sprites/UDCommand/upArrow";
            break;

        case UDC.ImageType.Square:
            path = "Sprites/UDCommand/square";
            break;

        case UDC.ImageType.Cross:
            path = "Sprites/UDCommand/cross";
            break;

        case UDC.ImageType.Circle:
            path = "Sprites/UDCommand/circle";
            break;

        case UDC.ImageType.Triangle:
            path = "Sprites/UDCommand/triangle";
            break;
        }

        return(Resources.Load <Sprite>(path));
    }
Esempio n. 2
0
 private TFC.ActionInputs ImageTypeToActionInput(UDC.ImageType imageType)
 {
     return((TFC.ActionInputs)((int)imageType % 4) + 1);
 }
Esempio n. 3
0
 private TFC.InputType ImageTypeToInputType(UDC.ImageType imageType)
 {
     return((TFC.InputType)imageType + 1);
 }