1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 01:47:33 +08:00

Rename const and make more available

This commit is contained in:
Dean Herbert 2019-08-19 17:46:05 +09:00
parent 4356f2ef9f
commit d224405bc6

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System; using System;
@ -76,11 +76,12 @@ namespace osu.Game.Skinning
Samples?.Dispose(); Samples?.Dispose();
} }
private const double default_frame_time = 1000 / 60d;
public override Drawable GetDrawableComponent(string componentName) public override Drawable GetDrawableComponent(string componentName)
{ {
bool animatable = false; bool animatable = false;
bool looping = true; bool looping = true;
const double frametime = 1000 / 60d;
switch (componentName) switch (componentName)
{ {
@ -145,7 +146,7 @@ namespace osu.Game.Skinning
if (texture != null && animatable) if (texture != null && animatable)
{ {
var animation = new TextureAnimation { DefaultFrameLength = frametime }; var animation = new TextureAnimation { DefaultFrameLength = default_frame_time };
for (int i = 1; texture != null; i++) for (int i = 1; texture != null; i++)
{ {