Asset resource defining a playable car. Declares metadata and properties for name, description, 3D model, thumbnail, physics stats and bone names for four wheels for use by the game/editor asset system.
namespace Machines.Resources;
/// <summary>
/// Defines a playable car, its visual identity and stats.
/// </summary>
[AssetType( Name = "Car", Extension = "car" )]
public sealed class CarResource : GameResource
{
/// <summary>
/// Display name of the car.
/// </summary>
[Property]
public string Name { get; set; } = "Unnamed Car";
/// <summary>
/// Short description or flavour text shown in the UI.
/// </summary>
[Property]
public string Description { get; set; } = "";
/// <summary>
/// 3D model for this car.
/// </summary>
[Property]
public Model Model { get; set; }
/// <summary>
/// Preview image for selection screens.
/// </summary>
[Property]
public Texture Thumb { get; set; }
/// <summary>
/// Physics stats for this car.
/// </summary>
[Property, InlineEditor]
public CarStatValues Stats { get; set; } = CarStatValues.Default;
/// <summary>
/// Bone name for the front-left wheel.
/// </summary>
[Property, Group( "Wheel Bones" )]
public string WheelFLBone { get; set; } = "wheel_fl";
/// <summary>
/// Bone name for the front-right wheel.
/// </summary>
[Property, Group( "Wheel Bones" )]
public string WheelFRBone { get; set; } = "wheel_fr";
/// <summary>
/// Bone name for the rear-left wheel.
/// </summary>
[Property, Group( "Wheel Bones" )]
public string WheelBLBone { get; set; } = "wheel_bl";
/// <summary>
/// Bone name for the rear-right wheel.
/// </summary>
[Property, Group( "Wheel Bones" )]
public string WheelBRBone { get; set; } = "wheel_br";
}