2024-04-30 17:39:50 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class EventLevel2Actor3 : ActorController
|
|
|
|
{
|
|
|
|
public override bool Interaction()
|
|
|
|
{
|
2024-05-01 00:28:48 +08:00
|
|
|
// 老头说话
|
|
|
|
GameManager.Instance.UIManager.ShowDialog(GetComponent<ResourceController>().Name, new List<string> { "感谢你救了我,这 1000 金币务必收下。" }, () =>
|
2024-04-30 17:39:50 +08:00
|
|
|
{
|
2024-05-01 00:28:48 +08:00
|
|
|
// 获得金币
|
2024-04-30 17:39:50 +08:00
|
|
|
GameManager.Instance.PlayerManager.PlayerInfo.Gold += 1000;
|
2024-05-01 00:28:48 +08:00
|
|
|
// 提示信息
|
|
|
|
GameManager.Instance.UIManager.ShowInfo("获得 1000 金币。");
|
|
|
|
// 音频播放
|
2024-04-30 17:39:50 +08:00
|
|
|
GameManager.Instance.SoundManager.PlaySound(ESoundType.Music, "1-9");
|
2024-05-01 00:28:48 +08:00
|
|
|
// 打开人物控制器
|
2024-04-30 17:39:50 +08:00
|
|
|
GameManager.Instance.PlayerManager.Enable = true;
|
2024-05-01 00:28:48 +08:00
|
|
|
// NPC 回收
|
2024-04-30 17:39:50 +08:00
|
|
|
GameManager.Instance.PoolManager.RecycleResource(gameObject);
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|