
1.实装玩家回头查看老兵出发对话的情节 2.降低了打开电报机音效的音量 3.更换第二段CG,实现淡入淡出效果 4.当玩家还没修完电话线就和电报机互动,触发对话【没修完呢】 5.将新的出字音效实装到每一个场景 6.解决如果玩家投掷过快会导致无法退出投掷状态的Bug 7.实装大部分BGM 8.给序章战场的假电报机也加上没连完线的对话 9.新增开发者捷径,如果输入。。--。直接判定打完全部句子 (*:建议把碉堡发令员的指挥做成动态的 (*:第二关的炮火已经越来越好了,但是目前只有炮火,晚上肯定也会开枪吧?希望增加一些随机快速闪烁的光源表示晚上的枪。 (*目前碉堡音效出现和消失得十分突然,建议在首尾稍微加一些淡入淡出效果 (*:建议把倒地后的机枪手也加上调查对话 xx:人声问题请待定,加上音乐后好像又不是很违和了 (*:碉堡警告音效系统做完了,但是人声感觉上非常奇怪,建议修改 (*:敌人被石头吸引系统实装完成,但是很突兀,建议还是不要出现语言了 接下来的任务: 1.实装按键引导 2.更换投掷物堆系统为火堆系统 3.实装第二关最后追逐关卡 4.制作开始界面 5.制作Thanks 4 Play 能看到效果的努力,这回有动力了吧?加油吧
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class BGMPlayer : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
private AudioSource audioPlayer;
|
|
private bool isSlowlyStopTheClip;
|
|
[Tooltip("请填入BGM切换时淡出原BGM的速度")]
|
|
public float fadeSpeed;
|
|
private AudioClip newBGM;
|
|
private float defulatVolume;
|
|
|
|
|
|
void Start()
|
|
{
|
|
DontDestroyOnLoad(gameObject);
|
|
audioPlayer = GetComponent<AudioSource>();
|
|
defulatVolume = audioPlayer.volume;
|
|
if(FindObjectsOfType<BGMPlayer>().Length > 1) Destroy(gameObject);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if(isSlowlyStopTheClip)
|
|
{
|
|
audioPlayer.volume -= fadeSpeed*Time.deltaTime;
|
|
if(audioPlayer.volume.Equals(0f))
|
|
{
|
|
isSlowlyStopTheClip = false;
|
|
audioPlayer.clip = newBGM;
|
|
audioPlayer.volume = defulatVolume;
|
|
audioPlayer.Play();
|
|
}
|
|
}
|
|
}
|
|
|
|
public void ChangedTheBGM(AudioClip newBGM)
|
|
{
|
|
isSlowlyStopTheClip = true;
|
|
this.newBGM = newBGM;
|
|
}
|
|
}
|