using UnityEngine; /// /// A selectable player pose: an held while the player is idle, plus a /// y-offset applied to the visual model only while stuck to the ceiling (so the pose hangs at the /// right height). The first ScriptableObject in this project. /// /// Named PlayerPose (not Pose) to avoid shadowing the built-in UnityEngine.Pose struct, mirroring /// why the controller is PlayerCharacterController and not just "PlayerController". /// [CreateAssetMenu(fileName = "NewPose", menuName = "Chameleon/Pose")] public class PlayerPose : ScriptableObject { [Tooltip("Clip held while the player is idle in this pose (looped if the clip itself loops, " + "otherwise frozen on its last frame). Authored for the paintman generic rig; clips for " + "other hierarchies will not retarget.")] [SerializeField] private AnimationClip clip; [Tooltip("Local-up offset added to the visual model ONLY while stuck to the ceiling, so the pose " + "hangs at the right height. Ignored on the ground and on walls. Meters.")] [SerializeField] private float ceilingYOffset; /// Idle clip for this pose (may be null). public AnimationClip Clip => clip; /// Local-up offset applied to the model only while on the ceiling. public float CeilingYOffset => ceilingYOffset; }