Warcorrespondents/Assets/Scripts/BlackHouseGunLight.cs
Roman d61a850951 *合并了SAIPOVersion
任务:实装和完善部分音效,修复场景问题
1.增加走路时的脚步声音效
2.将Listener转移到玩家身上防止立体声出现问题
3.删除了跑步扬尘效果
4.增加了跑步时的脚步声音效
5.加快了跑步动画为原来的1.2倍,使之步频加快,看起来更加真实。
6.加快了导弹的下落速度,但是加长了导弹的下落前阴影提示时间
7.加强了阴影的闪烁幅度和宽度
8.提高了阴影的阿尔法值
9.提高了修完第一根电报线后生成导弹的高度,防止其漏个头出来
10.添加了修复电报线的音效
11.添加了打开任务书的音效
12.削弱地雷音效的3D特性,使得其爆炸时音量不至于过小
13.增加了爬坑音效
14.修复了电报机音效
15.降低了电报机音量
16.增加了跳下坑的音效
17.关闭了战场背景音的3D特性
18.调整了水流音效的影响范围和衰弱等级
19.降低了水流声的音量
(*:拾取投掷物的音效过于机械,建议更换
20.实装了投掷系统的音效(拾取物品、丢出物品、投掷物着地)
(*:着地音效太重了,而投掷物是很轻的石块
(*:投出音效太假了,像是什么棍子挥动的声音
2021-09-09 00:59:27 +08:00

55 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BlackHouseGunLight : MonoBehaviour
{
private bool upLight = true;
public GameObject light1;
public GameObject light2;
public bool isFire = false;
public bool isInvoke = false;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (isFire && (!isInvoke))
{
InvokeRepeating("ChangeLight",0f,0.05f);
isInvoke = true;
}
if (!isFire && isInvoke)
{
CancelInvoke();
isInvoke = false;
light1.SetActive(false);
light2.SetActive(false);
}
}
void ChangeLight()
{
if (upLight)
{
light1.SetActive(upLight);
light2.SetActive(upLight);
upLight = false;
}
else
{
light2.SetActive(upLight);
light1.SetActive(upLight);
upLight = true;
}
}
}