Pool catcher trail sprite

This commit is contained in:
ekrctb
2020-12-07 18:12:55 +09:00
parent 8757c89246
commit 12c6b3c1fb
2 changed files with 28 additions and 12 deletions

View File

@ -1,17 +1,29 @@
// 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.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Pooling;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osuTK;
namespace osu.Game.Rulesets.Catch.UI
{
public class CatcherTrailSprite : Sprite
public class CatcherTrailSprite : PoolableDrawable
{
public CatcherTrailSprite(Texture texture)
public Texture Texture
{
Texture = texture;
set => sprite.Texture = value;
}
private readonly Sprite sprite;
public CatcherTrailSprite()
{
InternalChild = sprite = new Sprite
{
RelativeSizeAxes = Axes.Both
};
Size = new Vector2(CatcherArea.CATCHER_SIZE);