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

            // roughly matches osu-stable
            float  startRotation = RNG.NextSingle() * 20;
            double duration      = HitObject.TimePreempt + 2000;

            ScaleContainer.RotateTo(startRotation).RotateTo(startRotation + 720, duration);
        }
コード例 #2
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);
コード例 #3
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);
        }
コード例 #4
0
    public void ScaleLocally(float size)
    {
        var blocks             = SelectionManager.Instance.blocks;
        var scaleContainerList = new ScaleContainerList();

        foreach (var block in blocks)
        {
            var scaleContainer = new ScaleContainer();
            scaleContainer.transform = block.transform;
            scaleContainer.lastScale = block.transform.localScale;
            scaleContainer.newScale  = Vector3.one * size;
            scaleContainerList.list.Add(scaleContainer);
            block.transform.localScale = Vector3.one * size;
        }

        undoList.Add(scaleContainerList);
    }
コード例 #5
0
ファイル: DrawableFruit.cs プロジェクト: ohCRTV/osu
        protected override void UpdateInitialTransforms()
        {
            base.UpdateInitialTransforms();

            ScaleContainer.RotateTo((RandomSingle(1) - 0.5f) * 40);
        }