Initial Unity 6 scaffold for Cat Kirby Adventures.
Add Phase A greybox vertical slice: third-person movement, forest path, checkpoints, story triggers, and light ability gate.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace KirbyAdventures
|
||||
{
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class AbilityUnlockPedestal : MonoBehaviour
|
||||
{
|
||||
public string StoryLine =
|
||||
"Внутри вспыхнул тихий свет — не снаружи, а из самого сердца Кирби.";
|
||||
bool _used;
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (_used) return;
|
||||
if (other.GetComponent<PlayerMotor>() == null) return;
|
||||
_used = true;
|
||||
if (GameFlow.Instance != null)
|
||||
GameFlow.Instance.UnlockLightAbility();
|
||||
DialogueUI.ShowTemporary(StoryLine, 5f);
|
||||
|
||||
var rend = GetComponentInChildren<Renderer>();
|
||||
if (rend != null)
|
||||
rend.material.color = new Color(1f, 0.92f, 0.35f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user