2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
using osu.Game.Storyboards.Drawables;
|
|
|
|
|
using System.Collections.Generic;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-07 21:55:05 +00:00
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
|
{
|
2017-09-13 09:22:24 +00:00
|
|
|
|
public class StoryboardLayer
|
2017-09-07 21:55:05 +00:00
|
|
|
|
{
|
2020-03-25 02:08:08 +00:00
|
|
|
|
public readonly string Name;
|
|
|
|
|
|
|
|
|
|
public readonly int Depth;
|
|
|
|
|
|
|
|
|
|
public readonly bool Masking;
|
|
|
|
|
|
|
|
|
|
public bool VisibleWhenPassing = true;
|
|
|
|
|
|
|
|
|
|
public bool VisibleWhenFailing = true;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-03-26 07:16:28 +00:00
|
|
|
|
public List<IStoryboardElement> Elements = new List<IStoryboardElement>();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2020-03-24 05:51:37 +00:00
|
|
|
|
public StoryboardLayer(string name, int depth, bool masking = true)
|
2017-09-07 21:55:05 +00:00
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Depth = depth;
|
2020-03-24 05:51:37 +00:00
|
|
|
|
Masking = masking;
|
2017-09-07 21:55:05 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-09-13 09:22:24 +00:00
|
|
|
|
public void Add(IStoryboardElement element)
|
2017-09-07 21:55:05 +00:00
|
|
|
|
{
|
2019-03-26 07:16:28 +00:00
|
|
|
|
Elements.Add(element);
|
2017-09-07 21:55:05 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-05-25 07:17:28 +00:00
|
|
|
|
public virtual DrawableStoryboardLayer CreateDrawable()
|
2020-05-18 19:12:14 +00:00
|
|
|
|
=> new DrawableStoryboardLayer(this) { Depth = Depth, Name = Name };
|
2017-09-07 21:55:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|