nomadro/apps/minigame-unity/Assets/Scripts/Game/QuestBeacon.cs
Eric 58a845db32 Add WeChat minigame triple-engine scaffold with Godot Chiang Mai plaza SoT.
Unity and Cocos stay as parallel schemes; apps/minigame ships the Godot 4.7 WeChat pack for DevTools.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-06 20:17:14 +08:00

27 lines
635 B
C#

using UnityEngine;
namespace Nomadro.Minigame
{
/// <summary>Spinning + bobbing quest marker.</summary>
public class QuestBeacon : MonoBehaviour
{
public float spin = 90f;
public float bob = 0.25f;
public float bobSpeed = 2.2f;
Vector3 _base;
void OnEnable()
{
_base = transform.position;
}
void Update()
{
transform.Rotate(0f, spin * Time.deltaTime, 0f, Space.World);
var y = _base.y + Mathf.Sin(Time.time * bobSpeed) * bob;
transform.position = new Vector3(_base.x, y, _base.z);
}
}
}