* Per-map parallax support * Comments for future sloth * c * bet * Fix exception * VV support * Fix parallax * mem * weightless sounds * Gravity stuff * placeholder coz im too lazy to stash don't @ me son * decent clouds * sky * Fast parallax * Imagine spelling * Loicense * perish * Fix weightless status Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
27 lines
662 B
C#
27 lines
662 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using JetBrains.Annotations;
|
|
using Content.Client.Resources;
|
|
using Content.Client.IoC;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.Parallax.Data;
|
|
|
|
[UsedImplicitly]
|
|
[DataDefinition]
|
|
public sealed class ImageParallaxTextureSource : IParallaxTextureSource
|
|
{
|
|
/// <summary>
|
|
/// Texture path.
|
|
/// </summary>
|
|
[DataField("path", required: true)]
|
|
public ResourcePath Path { get; } = default!;
|
|
|
|
async Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel = default)
|
|
{
|
|
return StaticIoC.ResC.GetTexture(Path);
|
|
}
|
|
}
|
|
|