using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Scoring;
namespace osu.Game.Skinning.Scripting
{
///
/// Interface for communication between the game and skin scripts.
///
public interface ISkinScriptHost
{
///
/// Gets the current beatmap.
///
IBeatmap CurrentBeatmap { get; }
///
/// Gets the audio manager for sound playback.
///
IAudioManager AudioManager { get; }
///
/// Gets the current skin.
///
ISkin CurrentSkin { get; }
///
/// Gets the current ruleset info.
///
IRulesetInfo CurrentRuleset { get; }
///
/// Creates a new drawable component of the specified type.
///
/// The type of component to create.
/// The created component.
Drawable CreateComponent(string componentType);
///
/// Gets a texture from the current skin.
///
/// The name of the texture.
/// The texture, or null if not found.
Texture GetTexture(string name);
///
/// Gets a sample from the current skin.
///
/// The name of the sample.
/// The sample, or null if not found.
ISample GetSample(string name);
///
/// Subscribe to a game event.
///
/// The name of the event to subscribe to.
void SubscribeToEvent(string eventName);
///
/// Log a message to the osu! log.
///
/// The message to log.
/// The log level.
void Log(string message, LogLevel level = LogLevel.Information);
}
///
/// Log levels for skin script messages.
///
public enum LogLevel
{
Debug,
Information,
Warning,
Error
}
}