2021-08-15 01:32:33 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
2021-08-28 00:49:37 +08:00
|
|
|
|
using Fungus;
|
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
using UnityEngine.InputSystem;
|
2021-08-15 01:32:33 +08:00
|
|
|
|
|
|
|
|
|
public class Door : Interactive
|
|
|
|
|
{
|
|
|
|
|
//可交互对象:门的控制类
|
|
|
|
|
public override void OnCall()
|
|
|
|
|
{
|
2021-08-27 01:47:46 +08:00
|
|
|
|
//在开门演出的多态,当门被唤醒,显示CG
|
|
|
|
|
if(FindObjectOfType<IndexRecoder>().stageName == "开门演出")
|
|
|
|
|
{
|
|
|
|
|
CGAdministrator administrator = FindObjectOfType<CGAdministrator>();
|
|
|
|
|
administrator.CallACG("暂用-战友");
|
|
|
|
|
}
|
2021-08-28 00:49:37 +08:00
|
|
|
|
|
|
|
|
|
//如果是在准备出发这一幕被唤醒,则检查是否捡起背包
|
|
|
|
|
if(FindObjectOfType<IndexRecoder>().stageName == "准备出发")
|
|
|
|
|
{
|
|
|
|
|
if(FindObjectOfType<M_Player>().transform.Find("包").gameObject.activeSelf)//如果已经捡起背包
|
|
|
|
|
{
|
|
|
|
|
//加载第一关场景
|
|
|
|
|
SceneManager.LoadScene("第一关");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//弹出对话,要先拿包
|
|
|
|
|
Flowchart.BroadcastFungusMessage("先拿包吧");
|
|
|
|
|
FindObjectOfType<M_Player>().GetComponent<PlayerInput>().SwitchCurrentActionMap("NullMap");
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-08-15 01:32:33 +08:00
|
|
|
|
}
|
|
|
|
|
}
|