Roman 00aaa37856 任务:实装和完善部分音效,修复场景问题
1.实装死亡重开系统:
*:增加被航弹炸死的死法
*:增加被地雷炸死的死法
*:增加了被碉堡打死的死法
*:增加被夜间碉堡扫死的死法
*:增加被夜间巡逻的人打死的死法
*:增加被直升机打死的死法
2.修改碉堡警告UI颜色
3.编写开始游戏界面
4.编写感谢游玩界面
5.修复老兵牺牲动画的Bug

(*:第二关的炮火已经越来越好了,但是目前只有炮火,晚上肯定也会开枪吧?希望增加一些随机快速闪烁的光源表示晚上的枪。
xx:人声问题请待定,加上音乐后好像又不是很违和了
(*:碉堡警告音效系统做完了,但是人声感觉上非常奇怪,建议修改
(*:敌人被石头吸引系统实装完成,但是很突兀,建议还是不要出现语言了

接下来的任务:
*:试图做得更好
2021-09-14 23:56:07 +08:00

49 lines
1.3 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;
public class Helicopter : MonoBehaviour
{
//直升机类,控制第二关最后的直升机
public bool canGo = false;//记录自己目前是否可以前进了,在事件中改变
[Tooltip("填入直升机追踪的速度")]
public float speed;
[Tooltip("拖入枪击音效")]
public AudioSource gunSound;
[Tooltip("拖入第二关的普通BGM死亡后得换回普通BGM")]
public AudioClip normalClip;
void Start()
{
}
// Update is called once per frame
void Update()
{
if(canGo)
{
transform.position = new Vector3(
// x加
transform.position.x + speed * Time.deltaTime,
// yz不变
transform.position.y ,transform.position.z
);
}
}
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
Debug.Log("玩家被直升机发现,判定死亡");
other.GetComponent<M_Player>().YouAreShootingDead();
gunSound.Play();
FindObjectOfType<BGMPlayer>().ChangedTheBGM(normalClip);
//让直升机停下来
canGo = false;
}
}
}