2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-09-08 05:55:05 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Game.Storyboards.Drawables;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
|
{
|
2017-09-13 17:22:24 +08:00
|
|
|
|
public class StoryboardLayer
|
2017-09-08 05:55:05 +08:00
|
|
|
|
{
|
|
|
|
|
public string Name;
|
|
|
|
|
public int Depth;
|
|
|
|
|
public bool EnabledWhenPassing = true;
|
2017-09-08 18:11:57 +08:00
|
|
|
|
public bool EnabledWhenFailing = true;
|
2017-09-08 05:55:05 +08:00
|
|
|
|
|
2017-09-13 17:22:24 +08:00
|
|
|
|
private readonly List<IStoryboardElement> elements = new List<IStoryboardElement>();
|
|
|
|
|
public IEnumerable<IStoryboardElement> Elements => elements;
|
2017-09-08 18:11:57 +08:00
|
|
|
|
|
2017-09-13 17:22:24 +08:00
|
|
|
|
public StoryboardLayer(string name, int depth)
|
2017-09-08 05:55:05 +08:00
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Depth = depth;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-13 17:22:24 +08:00
|
|
|
|
public void Add(IStoryboardElement element)
|
2017-09-08 05:55:05 +08:00
|
|
|
|
{
|
|
|
|
|
elements.Add(element);
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-13 17:22:24 +08:00
|
|
|
|
public DrawableStoryboardLayer CreateDrawable()
|
|
|
|
|
=> new DrawableStoryboardLayer(this) { Depth = Depth, };
|
2017-09-08 05:55:05 +08:00
|
|
|
|
}
|
|
|
|
|
}
|