@@ -1,8 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Text.Json.Serialization;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Maths;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
|
||||
namespace Content.MapRenderer;
|
||||
@@ -45,31 +43,31 @@ public sealed class LayerGroup
|
||||
public GroupSource Source { get; set; } = new();
|
||||
public List<Layer> Layers { get; set; } = new();
|
||||
|
||||
public static LayerGroup DefaultParallax(IResourceManager resourceManager, ParallaxOutput output)
|
||||
public static LayerGroup DefaultParallax()
|
||||
{
|
||||
return new LayerGroup
|
||||
{
|
||||
Scale = new Position(0.1f, 0.1f),
|
||||
Source = new GroupSource
|
||||
{
|
||||
Url = output.ReferenceResourceFile(resourceManager, new ResPath("/Textures/Parallaxes/layer1.png")),
|
||||
Extent = new Extent(6000, 4000),
|
||||
Url = "https://i.imgur.com/3YO8KRd.png",
|
||||
Extent = new Extent(6000, 4000)
|
||||
},
|
||||
Layers = new List<Layer>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Url = output.ReferenceResourceFile(resourceManager, new ResPath("/Textures/Parallaxes/layer1.png")),
|
||||
Url = "https://i.imgur.com/IannmmK.png"
|
||||
},
|
||||
new()
|
||||
{
|
||||
Url = output.ReferenceResourceFile(resourceManager, new ResPath("/Textures/Parallaxes/layer2.png")),
|
||||
Url = "https://i.imgur.com/T3W6JsE.png",
|
||||
Composition = "lighter",
|
||||
ParallaxScale = new Position(0.2f, 0.2f)
|
||||
},
|
||||
new()
|
||||
{
|
||||
Url = output.ReferenceResourceFile(resourceManager, new ResPath("/Textures/Parallaxes/layer3.png")),
|
||||
Url = "https://i.imgur.com/T3W6JsE.png",
|
||||
Composition = "lighter",
|
||||
ParallaxScale = new Position(0.3f, 0.3f)
|
||||
}
|
||||
@@ -93,13 +91,9 @@ public sealed class Layer
|
||||
|
||||
public readonly struct Extent
|
||||
{
|
||||
[JsonInclude]
|
||||
public readonly float X1;
|
||||
[JsonInclude]
|
||||
public readonly float Y1;
|
||||
[JsonInclude]
|
||||
public readonly float X2;
|
||||
[JsonInclude]
|
||||
public readonly float Y2;
|
||||
|
||||
public Extent()
|
||||
@@ -129,9 +123,7 @@ public readonly struct Extent
|
||||
|
||||
public readonly struct Position
|
||||
{
|
||||
[JsonInclude]
|
||||
public readonly float X;
|
||||
[JsonInclude]
|
||||
public readonly float Y;
|
||||
|
||||
public Position(float x, float y)
|
||||
|
||||
Reference in New Issue
Block a user