59 lines
1.5 KiB
C#
59 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Godot;
|
|
|
|
namespace StarSkyPresenter;
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public class StarConfig
|
|
{
|
|
public string id { get; set; }
|
|
public float x { get; set; }
|
|
public float y { get; set; }
|
|
public float rot { get; set; }
|
|
public float scale { get; set; }
|
|
public string image { get; set; }
|
|
}
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public class StarSceneData
|
|
{
|
|
public float? x { get; set; }
|
|
public float? y { get; set; }
|
|
public float? rot { get; set; }
|
|
public float? scale { get; set; }
|
|
}
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public class TransitionConfig
|
|
{
|
|
public bool fade_in { get; set; } = false;
|
|
public bool fade_out { get; set; } = false;
|
|
public double t { get; set; } = 1;
|
|
public string x { get; set; } = "lin";
|
|
public string y { get; set; } = "lin";
|
|
}
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public class SceneConfig
|
|
{
|
|
public Dictionary<string, StarSceneData> stars { get; set; }
|
|
public TransitionConfig transition { get; set; }
|
|
}
|
|
|
|
public class Scene
|
|
{
|
|
public Dictionary<string, Star> stars { get; set; }
|
|
public TransitionConfig transition { get; set; }
|
|
}
|
|
|
|
public class Star
|
|
{
|
|
public string Id { get; set; }
|
|
public float X { get; set; }
|
|
public float Y { get; set; }
|
|
public float Rot { get; set; }
|
|
public float Alpha { get; set; } = 0;
|
|
public float Scale { get; set; }
|
|
public Sprite2D Sprite { get; set; }
|
|
} |