Merge remote-tracking branch 'origin/feat/inport-props' into feat/craft-discovery
# Conflicts: # Assets/External/Animated PBR Chest Demo/Materials/WoodChest.mat # Packages/com.distantlands.cozy.core/Content/Integration/Import for BiRP.unitypackage.meta # Packages/com.distantlands.cozy.core/Content/Integration/Import for HDRP.unitypackage.meta # Packages/com.distantlands.cozy.core/Content/Integration/Import for URP.unitypackage.meta
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Ashwild.Player;
|
||||
|
||||
namespace Ashwild.Inventory
|
||||
{
|
||||
@@ -59,6 +60,12 @@ namespace Ashwild.Inventory
|
||||
[SerializeField] private GameObject worldPrefab;
|
||||
[SerializeField] private GameObject handPrefab;
|
||||
|
||||
[Header("Animation")]
|
||||
[Tooltip("Clips the owner's first-person arms play while holding this item. Empty = bare-hand set.")]
|
||||
[SerializeField] private PlayerAnimationSet armsAnimationSet;
|
||||
[Tooltip("Clips the third-person body plays while holding this item, as seen by other players.")]
|
||||
[SerializeField] private PlayerAnimationSet bodyAnimationSet;
|
||||
|
||||
public string ItemName => itemName;
|
||||
public Sprite Icon => icon;
|
||||
public string Description => description;
|
||||
@@ -92,5 +99,16 @@ namespace Ashwild.Inventory
|
||||
public float FuelSeconds => fuelSeconds;
|
||||
public GameObject WorldPrefab => worldPrefab;
|
||||
public GameObject HandPrefab => handPrefab;
|
||||
|
||||
/// <summary>
|
||||
/// The clip set this item imposes on one of the player's two rigs. Kept as a lookup rather than
|
||||
/// two public properties so a binder can be pointed at either rig from the inspector and stay
|
||||
/// the same component — the arms and the body run identical code on different data.
|
||||
/// Returns null when the item authors nothing, which makes the binder fall back to bare hands.
|
||||
/// </summary>
|
||||
public PlayerAnimationSet GetAnimationSet(PlayerAnimationRig rig)
|
||||
{
|
||||
return rig == PlayerAnimationRig.Arms ? armsAnimationSet : bodyAnimationSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user