2017-09-07 21:55:05 +00:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// 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
|
|
|
|
|
{
|
|
|
|
|
public class LayerDefinition
|
|
|
|
|
{
|
|
|
|
|
public string Name;
|
|
|
|
|
public int Depth;
|
|
|
|
|
public bool EnabledWhenPassing = true;
|
2017-09-08 10:11:57 +00:00
|
|
|
|
public bool EnabledWhenFailing = true;
|
2017-09-07 21:55:05 +00:00
|
|
|
|
|
2017-09-08 11:04:53 +00:00
|
|
|
|
private readonly List<IElementDefinition> elements = new List<IElementDefinition>();
|
|
|
|
|
public IEnumerable<IElementDefinition> Elements => elements;
|
2017-09-08 10:11:57 +00:00
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
public LayerDefinition(string name, int depth)
|
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Depth = depth;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-08 11:04:53 +00:00
|
|
|
|
public void Add(IElementDefinition element)
|
2017-09-07 21:55:05 +00:00
|
|
|
|
{
|
|
|
|
|
elements.Add(element);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StoryboardLayer CreateDrawable()
|
|
|
|
|
=> new StoryboardLayer(this) { Depth = Depth, };
|
|
|
|
|
}
|
|
|
|
|
}
|