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

            circle.Rotation = disc.Rotation;
            ticks.Rotation  = disc.Rotation;

            float relativeCircleScale = spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;

            disc.ScaleTo(relativeCircleScale + (1 - relativeCircleScale) * Progress, 200, Easing.OutQuint);

            symbol.RotateTo(disc.Rotation / 2, 500, Easing.OutQuint);
        }
コード例 #2
0
        protected override void UpdateAfterChildren()
        {
            base.UpdateAfterChildren();

            circle.Rotation = Disc.Rotation;
            Ticks.Rotation  = Disc.Rotation;
            spmCounter.SetRotation(Disc.RotationAbsolute);

            float relativeCircleScale = Spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;

            Disc.ScaleTo(relativeCircleScale + (1 - relativeCircleScale) * Progress, 200, Easing.OutQuint);

            symbol.RotateTo(Disc.Rotation / 2, 500, Easing.OutQuint);
        }
コード例 #3
0
ファイル: DrawableSpinner.cs プロジェクト: gpsbird/osu-1
        protected override void UpdateAfterChildren()
        {
            base.UpdateAfterChildren();

            if (!SpmCounter.IsPresent && Disc.Tracking)
            {
                SpmCounter.FadeIn(HitObject.TimeFadeIn);
            }

            circle.Rotation = Disc.Rotation;
            Ticks.Rotation  = Disc.Rotation;
            SpmCounter.SetRotation(Disc.RotationAbsolute);

            float relativeCircleScale = Spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;

            Disc.ScaleTo(relativeCircleScale + (1 - relativeCircleScale) * Progress, 200, Easing.OutQuint);

            symbol.RotateTo(Disc.Rotation / 2, 500, Easing.OutQuint);
        }
コード例 #4
0
 protected override void LoadComplete()
 {
     base.LoadComplete();
     icon.RotateTo(0).Then()
     .RotateTo(90, 200).Then()
     .RotateTo(180, 200).Then()
     .RotateTo(270, 200).Then()
     .RotateTo(360, 200)
     .Loop();
 }
コード例 #5
0
        protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
        {
            base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);

            if (!IsHovered)
            {
                return;
            }

            bool   rightward = beatIndex % 2 == 1;
            double duration  = timingPoint.BeatLength / 2;

            icon.RotateTo(rightward ? 10 : -10, duration * 2, Easing.InOutSine);

            icon.Animate(
                i => i.MoveToY(-10, duration, Easing.Out),
                i => i.ScaleTo(1, duration, Easing.Out)
                ).Then(
                i => i.MoveToY(0, duration, Easing.In),
                i => i.ScaleTo(new Vector2(1, 0.9f), duration, Easing.In)
                );
        }
コード例 #6
0
        protected override void UpdateInitialTransforms()
        {
            base.UpdateInitialTransforms();

            circleContainer.ScaleTo(Spinner.Scale * 0.3f);
            circleContainer.ScaleTo(Spinner.Scale, HitObject.TimePreempt / 1.4f, Easing.OutQuint);

            Disc.RotateTo(-720);
            symbol.RotateTo(-720);

            mainContainer
            .ScaleTo(0)
            .ScaleTo(Spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, HitObject.TimePreempt - 150, Easing.OutQuint)
            .Then()
            .ScaleTo(1, 500, Easing.OutQuint);
        }
コード例 #7
0
        private void load(TextureStore textures)
        {
            ButtonFlowContainer.Add(editButton = new IconButton(FontAwesome.Solid.Download, Colour4.SkyBlue, true, Colour4.PowderBlue));

            BottomContainer.Add(new SpriteText
            {
                Font = new FontUsage(size: SMALL_TEXT_SIZE),
                Text = @"Este proyecto está en el servidor, descargalo para editarlo!",
            });

            ImageContainer.Add(loadingIcon = new SpriteIcon
            {
                Size             = new Vector2(.7f),
                RelativeSizeAxes = Axes.Both,
                FillMode         = FillMode.Fit,
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
                Icon             = FontAwesome.Solid.Spinner,
            });

            editButton.Enabled.Value = false;
            loadingIcon.RotateTo(0).Then().RotateTo(360, 1500).Loop();

            ProjectName.Text         = onlineProject.Name;
            ProjectDescription.Text  = onlineProject.Description;
            editButton.Enabled.Value = true;
            Schedule(async() =>
            {
                var texture = await textures.GetAsync(@$ "https://gamestogo.company/api/Games/DownloadFile/{onlineProject.Image}");

                Schedule(() =>
                {
                    ProjectImage.Texture = texture;
                    loadingIcon.FadeOut();
                });
            });

            editButton.Action += downloadProject;

            var userRequest = new GetUserRequest(onlineProject.Creator.ID);

            userRequest.Success += user => UsernameBox.Text = @$ "De {user.Username} (Ultima vez editado {onlineProject.DateTimeLastEdited:dd/MM/yyyy HH:mm}) Estado: {onlineProject.Status.GetDescription()}";
            api.Queue(userRequest);
        }
コード例 #8
0
ファイル: IconButton.cs プロジェクト: Rovehacks/GamesToGo
        protected override void LoadComplete()
        {
            base.LoadComplete();

            loadingIcon.RotateTo(0).Then().RotateTo(360, 1500).Loop();
        }