using System; using UnityEngine; namespace Heroes.Battle { /// /// Shared configuration for rendering 3D unit models on the 2D battlefield. /// Positioning is always 2D; these values control the virtual viewing angle /// used for rotation, the render ordering that keeps models above the 2D /// board, and the (uniform) Animator parameter names. /// [Serializable] public sealed class UnitViewSettings { [Header("Virtual viewing plane (rotation only)")] [Tooltip("Pitch of the virtual camera below the horizon, in degrees. Drives how models turn " + "when moving up/down/diagonally. Matches the intended camera angle (default 25.06).")] public float viewPitchDegrees = 25.06f; [Tooltip("Apply the standing lean derived from the pitch. Disable to yaw the model only.")] public bool applyViewTilt = true; [Tooltip("Yaw correction if the prefab's forward axis is not +Z (e.g. 180 if it faces -Z).")] public float modelYawOffset = 0f; [Header("Render ordering over the 2D board")] [Tooltip("Local Z offset pushing models towards the camera so they render in front of the board.")] public float modelDepth = -0.5f; [Tooltip("Override the model materials' render queue so opaque models draw over the 2D sprites.")] public bool overrideRenderQueue = true; [Tooltip("Render queue applied when overrideRenderQueue is on (just above the sprite queue of 3000).")] public int renderQueue = 3100; [Header("Retro animation (Heroes 3 stop-motion feel)")] [Tooltip("Sample the Animator at a fixed low frame rate so poses snap instead of interpolating.")] public bool steppedAnimation = true; [Tooltip("Animation frames per second when steppedAnimation is on. ~8-12 gives the Heroes 3 look.")] [Range(2f, 30f)] public float animationFps = 10f; [Header("Animator parameters (uniform across units)")] [Tooltip("Bool parameter set true while the model is walking. Leave empty to skip.")] public string moveBoolParam = "IsMoving"; [Tooltip("Trigger fired when the model attacks. Leave empty to skip.")] public string attackTrigger = "Attack"; [Tooltip("Trigger fired when the stack dies. Leave empty to skip.")] public string deathTrigger = "Die"; } }