MoTaForPSVita/Assets/Scripts/Event/Level/EventLevel2Actor3.cs

27 lines
954 B
C#
Raw Normal View History

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