Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/Moonlit/FootstepPro/StandardController.cs
2026-02-21 16:45:37 +08:00

24 lines
669 B
C#

using UnityEngine;
namespace Moonlit.FootstepPro
{
[AddComponentMenu("FootprintSystem/Standard Controller")]
public class StandardController : IFootstepController
{
public override void Callback(RaycastHit hitInfo, FootInfo foot)
{
SurfaceType surfaceType = GetSurfaceType(hitInfo);
if (surfaceType.AllowsFootprints)
{
GameObject prefab = GetPrefab(surfaceType, foot);
if (!(prefab == null))
{
Vector3 standardPosition = GetStandardPosition(hitInfo);
Quaternion standardRotation = GetStandardRotation(hitInfo, foot);
GameObject gameObject = Object.Instantiate(prefab, standardPosition, standardRotation);
}
}
}
}
}