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>
27 lines
635 B
C#
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);
|
|
}
|
|
}
|
|
}
|