Roman 6c935a7d3f 任务:替换现有美术素材和动画、完善游戏的流程化
*:合并了SAIPOVersion
场景【第二关】
1.放置巡逻类敌人
*制作AC【巡逻敌人】
2.完善巡逻类敌人,具有以下特性:
(1.普通巡逻时,执行走路动画
(2.监测到玩家时,执行开枪动画
(3.给动画添加事件,开枪瞬间播放玩家死亡动画
(4.当听到石头声音,执行听见动画
(5.结束后让敌人冲向石头落地处
(6.到达石头落地处后,执行检查动画
(7.检查动画结束后,返回步行状态继续巡逻
3.布置了投掷物堆
4.布置了挡板,具有以下特性:
(1.当玩家位于挡板后,标记自身被遮挡,不会被敌人发现
(2.当玩家离开挡板后,标记自身未被遮挡,会被敌人发现
(3.修改敌人逻辑,当发现挡板后的玩家,无事发生,而当发现无遮挡的玩家,执行开枪和玩家死亡动画
5.解决了玩家转身后无法投掷的问题
6.放置了两个敌人
7.放置了两个挡板
8.布置营地
9.给桌子加上修理电报机系统
10.替换修理电报机界面UI美术素材
11.提高了修理台的转速
2021-09-03 16:03:44 +08:00

54 lines
2.1 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;
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(119.539998f,5.96999979f,-4.01295185f),Quaternion.identity).
GetComponent<Shell>();
thisShell.M_BombingArea = bombingArea;
thisShell.YouAreSpecal();
//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);
yield return new WaitForSeconds(2f);//两秒后,转移场景
SceneManager.LoadScene("第二关");
}
}