コード例 #1
0
        protected override void UpdateInitialTransforms()
        {
            base.UpdateInitialTransforms();

            const float end_scale          = 0.6f;
            const float random_scale_range = 1.6f;

            ScaleContainer.ScaleTo(HitObject.Scale * (end_scale + random_scale_range * RNG.NextSingle()))
            .Then().ScaleTo(HitObject.Scale * end_scale, HitObject.TimePreempt);

            ScaleContainer.RotateTo(getRandomAngle())
            .Then()
            .RotateTo(getRandomAngle(), HitObject.TimePreempt);
コード例 #2
0
ファイル: DrawableBanana.cs プロジェクト: rick424rick/osu
        protected override void UpdateInitialTransforms()
        {
            base.UpdateInitialTransforms();

            const float end_scale          = 0.6f;
            const float random_scale_range = 1.6f;

            ScaleContainer.ScaleTo(HitObject.Scale * (end_scale + random_scale_range * RandomSingle(3)))
            .Then().ScaleTo(HitObject.Scale * end_scale, HitObject.TimePreempt);

            ScaleContainer.RotateTo(getRandomAngle(1))
            .Then()
            .RotateTo(getRandomAngle(2), HitObject.TimePreempt);

            float getRandomAngle(int series) => 180 * (RandomSingle(series) * 2 - 1);
        }