SAIPO 153454f312 修改建议
1.在第一次与父亲对话时加入了对电报机操作的语言
2.在序章中的背景加入视差
3.加入了一个Shake脚本,以提供物体震动(实装到了石堆上面 效果还可以)

4.对检查死亡的机枪手的对话(我不会用fungus哼哼啊啊啊啊)
 1)(已经是一具没有气息的尸体了)
 2)父亲被你们所害,这是你们罪有应得。
2021-09-14 03:08:27 +08:00

58 lines
2.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.InputSystem;
public class AfterCoding : Event
{
//事件:第一关打完码后
[Tooltip("要召唤,得先有,对吧?拖进炮弹的预制体")]
public GameObject shell;
[Tooltip("召唤的炮弹需要知道自己属于哪个轰炸区,请拖入其轰炸区")]
public BombingArea bombingArea;
[Tooltip("请拖入黑幕")]
public GameObject BlackUI;
[Tooltip("请拖第二关BGM")]
public AudioClip clip;
void Start()
{
OnCall();
}
public override void OnCall()
{
//*关闭玩家操控地图
FindObjectOfType<PlayerInput>().SwitchCurrentActionMap("NullMap");
//1.关闭电报机界面
FindObjectOfType<Machine>().m_interface.SetActive(false);
//2.在玩家旁边生成一颗导弹
Shell thisShell = Instantiate(shell,new Vector3(116.539998f,5.96999979f,-4.01295185f),Quaternion.identity).
GetComponent<Shell>();
thisShell.M_BombingArea = bombingArea;
thisShell.YouAreSpecal();
thisShell.target = FindObjectOfType<M_Player>().GetComponent<Animator>();
//3.导弹爆炸后触发玩家死亡动画,这一段写在导弹类里面
}
//4.玩家被炸死开始执行后触发此段,镜头开始缓慢聚焦到主角
public void OnDeadAnimation()
{
StartCoroutine("OnDeadAnimationEnd");//若干秒后执行死亡动画播放完毕后代码
StartCoroutine("StopDead");//本帧结束后停止死亡动画条件防止反复触发
}
private IEnumerator StopDead()
{
yield return new WaitForEndOfFrame();
FindObjectOfType<M_Player>().GetComponent<Animator>().SetBool("IsBoomDead",false);
}
//5.当玩家被炸死动画结束后触发此段
private IEnumerator OnDeadAnimationEnd()
{
yield return new WaitForSeconds(1.1f + 3f);//炸死动画1.1秒 + 3秒留给玩家反应
//黑屏一张铺满的黑色UI显示
BlackUI.SetActive(true);
FindObjectOfType<BGMPlayer>().ChangedTheBGM(clip);
yield return new WaitForSeconds(2f);//两秒后,转移场景
SceneManager.LoadScene("第二关");
}
}