コード例 #1
0
ファイル: Interp.cs プロジェクト: Blightbuster/Green-Hell
        public static float Float(float t, InterpolationMode mode)
        {
            float result;

            switch (mode)
            {
            case InterpolationMode.None:
                result = Interp.None(t, 0f, 1f);
                break;

            case InterpolationMode.InOutCubic:
                result = Interp.InOutCubic(t, 0f, 1f);
                break;

            case InterpolationMode.InOutQuintic:
                result = Interp.InOutQuintic(t, 0f, 1f);
                break;

            case InterpolationMode.InOutSine:
                result = Interp.InOutSine(t, 0f, 1f);
                break;

            case InterpolationMode.InQuintic:
                result = Interp.InQuintic(t, 0f, 1f);
                break;

            case InterpolationMode.InQuartic:
                result = Interp.InQuartic(t, 0f, 1f);
                break;

            case InterpolationMode.InCubic:
                result = Interp.InCubic(t, 0f, 1f);
                break;

            case InterpolationMode.InQuadratic:
                result = Interp.InQuadratic(t, 0f, 1f);
                break;

            case InterpolationMode.InElastic:
                result = Interp.OutElastic(t, 0f, 1f);
                break;

            case InterpolationMode.InElasticSmall:
                result = Interp.InElasticSmall(t, 0f, 1f);
                break;

            case InterpolationMode.InElasticBig:
                result = Interp.InElasticBig(t, 0f, 1f);
                break;

            case InterpolationMode.InSine:
                result = Interp.InSine(t, 0f, 1f);
                break;

            case InterpolationMode.InBack:
                result = Interp.InBack(t, 0f, 1f);
                break;

            case InterpolationMode.OutQuintic:
                result = Interp.OutQuintic(t, 0f, 1f);
                break;

            case InterpolationMode.OutQuartic:
                result = Interp.OutQuartic(t, 0f, 1f);
                break;

            case InterpolationMode.OutCubic:
                result = Interp.OutCubic(t, 0f, 1f);
                break;

            case InterpolationMode.OutInCubic:
                result = Interp.OutInCubic(t, 0f, 1f);
                break;

            case InterpolationMode.OutInQuartic:
                result = Interp.OutInCubic(t, 0f, 1f);
                break;

            case InterpolationMode.OutElastic:
                result = Interp.OutElastic(t, 0f, 1f);
                break;

            case InterpolationMode.OutElasticSmall:
                result = Interp.OutElasticSmall(t, 0f, 1f);
                break;

            case InterpolationMode.OutElasticBig:
                result = Interp.OutElasticBig(t, 0f, 1f);
                break;

            case InterpolationMode.OutSine:
                result = Interp.OutSine(t, 0f, 1f);
                break;

            case InterpolationMode.OutBack:
                result = Interp.OutBack(t, 0f, 1f);
                break;

            case InterpolationMode.OutBackCubic:
                result = Interp.OutBackCubic(t, 0f, 1f);
                break;

            case InterpolationMode.OutBackQuartic:
                result = Interp.OutBackQuartic(t, 0f, 1f);
                break;

            case InterpolationMode.BackInCubic:
                result = Interp.BackInCubic(t, 0f, 1f);
                break;

            case InterpolationMode.BackInQuartic:
                result = Interp.BackInQuartic(t, 0f, 1f);
                break;

            default:
                result = 0f;
                break;
            }
            return(result);
        }