- UI SFX v3: procedurally synthesized one-shots (Tools/synth_ui_sfx.py) wired to buttons, rewards, errors and red dots via UiSfx, gated by the SFX setting. - Five formal enemies (Hornlet, Dashlet, Shellhorn, HornCaptain, GreatHorn): Hunyuan 50k -> 2000-tri XPbr, DGXA TokenRig, Idle/Walk/Attack, nested per type in PrototypeArena; PrototypeBattle.Enemy gains presentation-only Moving/Strikes. - Formal partners for all ten pets in the arena and portraits, including new VineSprite, ThunderLeopard and TideWhale. - Pipeline fixes: reject local TokenRig fallback, drop loose mesh islands, configurable Unity run_script timeout, companion static stage. - Also includes concurrent work from another tool in this working tree (FlameLion, enemy combat FX, challenge mode, home explorer, server updates). - Resources registered in Doc/ResDesc_*.md; verified on isolated :18081. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using UnityEngine;
|
|
|
|
namespace HotUpdate.Gameplay
|
|
{
|
|
/// <summary>Placeholder explorer: swings the authored legs while the root is moved.</summary>
|
|
public sealed class ExplorerPuppet : MonoBehaviour
|
|
{
|
|
Transform _legL, _legR, _body;
|
|
Vector3 _last;
|
|
Vector3 _bodyRest;
|
|
|
|
void Awake()
|
|
{
|
|
_legL = transform.Find("LegL");
|
|
_legR = transform.Find("LegR");
|
|
_body = transform.Find("Body");
|
|
if (_body != null) _bodyRest = _body.localPosition;
|
|
_last = transform.position;
|
|
}
|
|
|
|
void LateUpdate()
|
|
{
|
|
Vector3 delta = transform.position - _last;
|
|
_last = transform.position;
|
|
float speed = new Vector2(delta.x, delta.z).magnitude / Mathf.Max(Time.deltaTime, 0.0001f);
|
|
bool walking = speed > 0.05f;
|
|
float swing = walking ? Mathf.Sin(Time.time * 8f) * 32f : 0f;
|
|
if (_legL != null) _legL.localRotation = Quaternion.Euler(swing, 0, 0);
|
|
if (_legR != null) _legR.localRotation = Quaternion.Euler(-swing, 0, 0);
|
|
if (_body != null)
|
|
_body.localPosition = _bodyRest + Vector3.up * (walking ? Mathf.Abs(Mathf.Sin(Time.time * 8f)) * 0.05f : Mathf.Sin(Time.time * 2f) * 0.015f);
|
|
}
|
|
}
|
|
}
|