SAIPO 6bd74c6c0c 合并了分支
1.序章-家中
  1)加入了后处理volume对象,添加了Bloom,轻微暗角与重新映射动态范围
2.序章-战场
  1)加入了后处理volume对象,与一些色调色轮调整
  2)(建议这个场景也加入爆炸声和屏幕震动,因为背景也有炮弹,现在太平静了)
3.第一关
  1)加入了后处理volume对象,与一些色调色轮调整
  2)修复了枪光的bug
4.第二关
  1)加入了后处理volume对象,与一些色调色轮调整
  2)加入了背景的炮火效果
  3)加入了解决的两声枪响
5.在music effects文件夹里加入了不合适的音效的替代
2021-09-09 22:08:49 +08:00

57 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GunLight : 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()
{
if(isFire)
InvokeRepeating("ChangeLight",1f,0.05f);
}
// 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);
}
}
void ChangeLight()
{
if (upLight)
{
light1.SetActive(upLight);
// light2.SetActive(upLight);
upLight = false;
}
else
{
// light2.SetActive(upLight);
light1.SetActive(upLight);
upLight = true;
}
}
}