Warcorrespondents/Assets/Scripts/事件/AfterReparedTheMachine.cs
Roman cae653bda3 任务:实装和完善部分音效,修复场景问题
(*:合并了SAIPOVersion
1.修改小时候主角的图层,解决脚部穿过问题(是脚会裂开,不是图层问题)
2.为序章战场适配应有的音效
3.为序章战场适配镜头震动
4.更换开门CG为新
5.使播放CG的时候玩家无法操作
6.添加移动水缸音效
7.添加穿上行囊音效(衣服摩擦)
8.添加了开门演出对话中敲门声的音效
9.使得多态【准备出发】幕中,不再能触发镜子的对话
10.给修理电话线界面换上美术素材
11.修正航弹的碰撞体,目前太短了,头部会嵌入一部分到地底才会爆炸
12.更换投掷系统的音效为新
(*:修正了捡拾音效出现的时机
13.制作并实装新的碉堡发射动画
(*:为了适配动画,我增加了一座碉堡,也适配了闪光灯
14.修复玩家在第一关终点被卡住的问题
15.更换夜间云的贴图
16.修复了敌人的脚步声3D特性不明显的问题

(*:建议给第一个CG加上音效
(*:建议给第一关加上微弱的雨声
(*:建议给第一关查看地图加上音效
(*:建议触发老兵牺牲事件的时候加上音效
(*:建议考虑玩家回去查看牺牲的老兵的可能性
(*:建议添加碉堡发令员的音效
(*:建议添加电报机页面撕掉错误输入的音效
(*:建议添加打开电报机界面的音效
(*:建议把碉堡发令员的指挥做成动态的
(*:现在的碉堡子弹过于整齐划一,看起来十分违和,建议修改
(*:建议加上碉堡处的挡板被击动画
(*:建议给第二关的云加上视差组件
(*:建议优化以下第二关的背景枪火光,现在太虚了,没有什么实际感
(*:建议加上敌人被声音吸引后的音效(霓虹语)
(*:机枪开枪音效太软了,跟在打气枪一样,建议换成更有力的

我们正在越变越好,加油!
2021-09-10 01:20:36 +08:00

98 lines
3.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 Fungus;
using UnityEngine.InputSystem;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using Cinemachine;
public class AfterReparedTheMachine : Event
{
private RepairBench repairBench;
private CinemachineVirtualCamera Vcamera;
[Tooltip("请拖入巡逻敌人")]
public Patrolman patrolman1;
[Tooltip("请拖入巡逻敌人")]
public Patrolman patrolman2;
private M_Player player;
[Tooltip("请拖入电报机UI界面")]
public GameObject MachineUI;
[Tooltip("请拖入倒计时UI")]
public Text countDown;
private int leftTime = 10;
public GameObject blackUI;
private Machine machine;
public WVParallax parallax;
public AudioSource gunAudio;
void Start()
{
repairBench = FindObjectOfType<RepairBench>();
Vcamera = FindObjectOfType<CinemachineVirtualCamera>();
player = FindObjectOfType<M_Player>();
machine = FindObjectOfType<Machine>();
//OnCall();
}
//事件,当修完电报机
public override void OnCall()
{
StartCoroutine("Process");
}
private IEnumerator Process()
{
parallax.canParallax = false;
//1.关闭玩家操作地图
FindObjectOfType<PlayerInput>().
SwitchCurrentActionMap("NullMap");
//2.给玩家若干反应时间,然后关闭修理电报机界面
yield return new WaitForSeconds(0f);
repairBench.m_interface.SetActive(false);
//3.再过若干时间,镜头跟踪物改为敌人
yield return new WaitForSeconds(2f);
Vcamera.Follow = patrolman1.transform;
//4.同时敌人的targe改为玩家
patrolman1.ChangeTargetTo(player.transform);
patrolman2.ChangeTargetTo(player.transform);
patrolman1.GetComponent<Animator>().SetBool("IsRush",true);
patrolman2.GetComponent<Animator>().SetBool("IsRush",true);
//5.若干时间后,镜头跟踪物改为玩家
yield return new WaitForSeconds(4f);
Vcamera.Follow = player.transform;
//6.若干短时间后敌人的target改为普通巡逻点
yield return new WaitForSeconds(1f);
patrolman1.ChangeTargetTo(patrolman1.point1);
patrolman2.ChangeTargetTo(patrolman1.point1);
//7.若干时间后,弹出对话【被发现了】
Flowchart.BroadcastFungusMessage("被发现了");
}
public void AfterChat()
{
machine.OnCall();
player.catched = machine;
MachineUI.SetActive(true);
player.GetComponent<PlayerInput>().
SwitchCurrentActionMap("PlayerInCoding");
countDown.gameObject.SetActive(true);
InvokeRepeating("CountDown",0,1);
}
private void CountDown()
{
countDown.text = "倒计时" + leftTime;
leftTime--;
if(leftTime == 0)
{
//当倒计时结束
blackUI.SetActive(true);
Invoke("PlayGunAudio",1.5f);
}
}
private void PlayGunAudio()
{
gunAudio.Play();
}
}