优化: 1.基督小怪的shader添加完毕,但是小怪的闪电似乎有bug,见末尾bug集合 2.给炸弹爆炸加入了粒子特效 3.优化了死亡的屏幕后特效,现在做到了只有黑白区域才会渲染死亡鬼魂的效果 音效: 1.制作了地藏的全部音效 2.制作了特洛伊木马的全部音效 3.制作了以撒的全部音效 4.制作了玩家 跳跃,挥锤子,扔镰刀,受击,死亡,与击中敌人的音效,目前还缺少交互音效 5.制作了爱欲品的抱人音效 6.制作了所有与爆炸相关的音效 音效大体上已经制作完毕,逻辑也已经写完了 如果有不合适的音效改起来还算容易 问题: 1.目前在交互时(对话,看牌子),玩家可以进行挥砍和跳跃 2.基督石像的雷击效果只有一半不知道是不是bug 3.基督石像我没有找到他的受击函数,所以他的受击音效我没有制作 下班,绷不住了,真就干了后半夜。
70 lines
2.2 KiB
C#
70 lines
2.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Cinemachine;
|
|
using Sirenix.OdinInspector;
|
|
using Fungus;
|
|
|
|
/// <summary>
|
|
/// 演出,贵族之怒
|
|
/// </summary>
|
|
public class NobleFury : Stage
|
|
{
|
|
[Header("贵族")]
|
|
public Transform noble;
|
|
[Header("宗教信徒")]
|
|
public NormalEnemy enemy;
|
|
|
|
private bool conversationEnd = false;
|
|
private bool conversationEnd1 = false;
|
|
private CinemachineVirtualCamera m_Camera;
|
|
protected override void Init(){
|
|
//找到必要的游戏物体和组件
|
|
base.Init();
|
|
m_Camera = FindObjectOfType<CinemachineVirtualCamera>();
|
|
}
|
|
|
|
protected override IEnumerator Main(){
|
|
yield return new WaitForEndOfFrame();
|
|
//让玩家停下来
|
|
player.inputDir = 0;
|
|
//让怪物停下来
|
|
enemy.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeAll;
|
|
//镜头指向贵族
|
|
m_Camera.Follow = noble;
|
|
yield return new WaitForSeconds(1f);
|
|
//执行贵族踢人动画
|
|
noble.GetComponent<Animator>().SetBool("isKick",true);
|
|
//执行宗教小怪的死亡动画
|
|
enemy.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.None;
|
|
enemy.OnBeHit(MyPlayer.AtkMethod.反弹炸弹,-1);
|
|
yield return new WaitForSeconds(2f);
|
|
noble.GetComponent<Animator>().SetBool("isKick",false);
|
|
//Callfungus对话
|
|
Flowchart.BroadcastFungusMessage("贵族之怒");
|
|
yield return new WaitUntil(
|
|
() => {
|
|
return conversationEnd;
|
|
}
|
|
);
|
|
yield return new WaitForSeconds(1f);
|
|
noble.localScale = new Vector3(1,1,1);
|
|
yield return new WaitForSeconds(1f);
|
|
Flowchart.BroadcastFungusMessage("贵族对话");
|
|
yield return new WaitUntil(
|
|
() => {
|
|
return conversationEnd1;
|
|
}
|
|
);
|
|
//将摄像机重新对准玩家
|
|
m_Camera.Follow = player.transform;
|
|
//执行善后工作
|
|
StartCoroutine(base.Main());
|
|
}
|
|
|
|
public void ConversationEnd(){conversationEnd = true;}
|
|
public void ConversationEnd1(){conversationEnd1 = true;}
|
|
|
|
|
|
}
|