CDN Integration

This commit is contained in:
dingo
2025-12-19 10:12:17 -05:00
parent 351478fedb
commit 260e6fa072
11 changed files with 2316 additions and 63 deletions
+21 -16
View File
@@ -68,26 +68,31 @@ public class DungeonMobDefinition
[MaxLength(1024)]
public string AbilitiesJson { get; set; } = "{}";
// Visuals - reference to sprite/animation
// Visuals
/// <summary>
/// Path to the mob's .tscn scene file on CDN (e.g., "scenes/mobs/skeleton.tscn")
/// If null/empty, client uses fallback placeholder shape
/// </summary>
[MaxLength(256)]
public string? ScenePath { get; set; }
/// <summary>
/// Color tint applied to the mob (hex, e.g., "#ff0000" for red variant)
/// </summary>
[MaxLength(16)]
public string TintColor { get; set; } = "#ffffff";
/// <summary>
/// Scale multiplier for the mob (1.0 = normal size)
/// </summary>
public float Scale { get; set; } = 1.0f;
// Legacy fields - kept for backwards compatibility, ScenePath takes priority
[MaxLength(128)]
public string SpriteSheet { get; set; } = "mobs/skeleton.png";
public int SpriteIndex { get; set; } = 0; // Index in spritesheet
public string SpriteSheet { get; set; } = "";
public int SpriteWidth { get; set; } = 32;
public int SpriteHeight { get; set; } = 32;
[MaxLength(16)]
public string TintColor { get; set; } = "#ffffff"; // Color tint for variants
// Animation frames (JSON array of frame indices)
[MaxLength(256)]
public string IdleFrames { get; set; } = "[0]";
[MaxLength(256)]
public string WalkFrames { get; set; } = "[0,1,2,3]";
[MaxLength(256)]
public string AttackFrames { get; set; } = "[4,5]";
[MaxLength(256)]
public string DeathFrames { get; set; } = "[6,7]";
public float AnimationSpeed { get; set; } = 8f; // Frames per second
public bool IsEnabled { get; set; } = true;