Roman fcc2089ae4 任务:替换美术素材、填充剧情
1.替换和实装美术素材
(1.制作基督小怪闪电动画
(2.替换镰刀CD贴图
(3.重做贵族动画
(4.添加交互按键提示,包含catching物体时浮现Y键,以及被缠抱时浮现摇杆转动动画
(5.实装特洛伊木马的召唤炸弹攻击的动画
(6.实装玩家鬼魂动画

2.填充剧情
*.新的演出继承自进入式触发器,OnCall内编写演出内容
*.村的开幕演出中额外补上:根据当前玩家进度开关事件碰撞体的功能
制作演出:
(1.贵族之怒演出编写完毕
(2.农民之叹演出编写完毕
(3.爱欲之附演出编写完毕
(4.安拉之拉演出编写完毕
(5.以撒之童演出编写完毕
(6.那位大人演出编写完毕
*.修改村开幕演出逻辑,使开幕演出时根据进度显示和隐藏剧情的触发器
(7.修改地藏开场演出,让其开场先执行一次敲钟攻击,很帅
(8.修改伊斯兰前置关演出,加上神之对话
(9.修改以撒开幕演出,增加一小段展示段

*优化和修复
1.修复以撒大闪电多次判定的问题
2.修复只有佛教前置关有死亡记录显示的bug

*.修复运行测试发现问题:
1.佛教前置关开幕演出走出太多
2.佛教前置关开幕演出角色名字没有替换
3.佛教前置关遮挡关系异常
4.伊斯兰前置关开幕演出走出太多
5.伊斯兰前置关忘记安排小怪
6.伊斯兰前置关隔间演出触发器不够高
7.基督前置关对话UI人物太大
8.读取留言板UI存在问题,需要在每个场景分别解决
9.伊斯兰前置关转移块颜色未改透明
10.增加以撒生命值
11.最终对话错别字

*.至此,游戏除了音乐音效部分基本完成,还差一些美术素材
*.进入最后阶段,调试和看修改结果时,务必调用当前场景的OnCall,否则可能触发深不可测的Bug

*建议
1.给基督小怪的闪电添加shader
2.目前炸弹爆炸没有效果

下班
2021-12-28 00:35:00 +08:00

239 lines
8.2 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;
using Sirenix.OdinInspector;
using DG.Tweening;
/// <summary>
/// 地藏Boss类继承于Enemy
/// </summary>
public class DiZang : Enemy
{
// _____ _ _ _
// | __ \ | | | (_)
// | |__) | _| |__ | |_ ___
// | ___/ | | | '_ \| | |/ __|
// | | | |_| | |_) | | | (__
// |_| \__,_|_.__/|_|_|\___|
/// <summary>
/// 攻击之间的间隔时间
/// </summary>
[Header("攻击之间的间隔时间")][FoldoutGroup("地藏")]
public float timeBetweenAttacks;
/// <summary>
/// 到底在上面还是下面生成爱欲品的玩家位置Y轴的界限
/// </summary>
[Header("到底在上面还是下面生成爱欲品的玩家位置Y轴的界限")][FoldoutGroup("地藏")]
public float aiYuPinBuildLimit;
[Header("爱欲品怪物预制体")][FoldoutGroup("地藏")]
public GameObject aiYuPin;
/// <summary>
/// 场景上方的落怪点组,用来召唤爱欲品
/// </summary>
[Header("场景上方的落怪点组")][ListDrawerSettings][FoldoutGroup("地藏")]
public List<ThrowingPoint> throwingPointGroupUp;
/// <summary>
/// 场景下方的落怪点组,用来召唤爱欲品
/// </summary>
[Header("场景下方的落怪点组")][ListDrawerSettings][FoldoutGroup("地藏")]
public List<ThrowingPoint> throwingPointGroupDown;
/// <summary>
/// 使用召唤爱欲品后有多少时间的后摇
/// </summary>
[Header("使用召唤爱欲品后有多少时间的后摇")][FoldoutGroup("地藏")]
public float CallAiYuPinEndTime;
// _____ _ _
// | __ \ (_) | |
// | |__) | __ ___ ____ _| |_ ___
// | ___/ '__| \ \ / / _` | __/ _ \
// | | | | | |\ V / (_| | || __/
// |_| |_| |_| \_/ \__,_|\__\___|
private MoneyBox moneyBox;
private delegate IEnumerator Action();
private enum PlayerState{,};
private MyPlayer player;
/// <summary>
/// 本次使用的落怪点位置组
/// </summary>
[Header("本次使用的落怪点位置组")][ListDrawerSettings][FoldoutGroup("地藏")]
[SerializeField][ListDrawerSettings][ReadOnly]
private List<ThrowingPoint> throwingPointGroupUse;
private Bell myBell;
private DiZangsHadn myHand;
public VibrationManager vibrationManager;
/// <summary>
/// 现在正在敲钟攻击吗?(包括上下浮)
/// </summary>
public bool inBell = false;
// _____ _ _ ____ _
// / ____| | | | _ \ | |
// | | __ _| | | |_) | __ _ ___| | __
// | | / _` | | | _ < / _` |/ __| |/ /
// | |___| (_| | | | |_) | (_| | (__| <
// \_____\__,_|_|_|____/ \__,_|\___|_|\_\
void Start(){
Init();
}
// _ _ _
// | \ | | | |
// | \| | ___ _ __ _ __ ___ __ _| |
// | . ` |/ _ \| '__| '_ ` _ \ / _` | |
// | |\ | (_) | | | | | | | | (_| | |
// |_| \_|\___/|_| |_| |_| |_|\__,_|_|
private void Init(){
//找到组件和物体
moneyBox = FindObjectOfType<MoneyBox>();
player = FindObjectOfType<MyPlayer>();
myBell = transform.Find("钟").GetComponent<Bell>();
myHand = transform.Find("手").GetComponent<DiZangsHadn>();
vibrationManager = FindObjectOfType<VibrationManager>();
//告诉钟自己是主人
myBell.owner = this;
//初始化生命值
HPLeft = HP;
}
/// <summary>
/// 执行一次攻击
/// </summary>
private new IEnumerator ATK(){
//等待攻击间隔
yield return new WaitForSeconds(timeBetweenAttacks);
//决定行动
//如果有钱,则执行拿钱
if(moneyBox.hasMoney)StartCoroutine(TakeTheMoney());
else{
//否则,随机执行召唤或者敲钟
Action action =
((Random.Range(-1f,1f) > 0) ? (Action)RingTheBell : (Action)CallAiYuPin);
StartCoroutine(action());
}
// //
// yield return new WaitForEndOfFrame();
// StartCoroutine(RingTheBell());
// //
}
/// <summary>
/// 召唤爱欲品的时候Call这个
/// </summary>
private IEnumerator CallAiYuPin(){
Debug.Log("正在使用:召唤");
//确定玩家在上半边还是下半边
PlayerState playerState =
((player.transform.position.y > aiYuPinBuildLimit) ? PlayerState.: PlayerState.);
//根据玩家位置状态确定所用落怪位置组
throwingPointGroupUse =
((playerState == PlayerState.) ?
throwingPointGroupUp : throwingPointGroupDown);
//创建一个储存生成的爱欲品的列表用于使他们在一段时间后开始Seek
List<AiYuPin> aiYuPins = new List<AiYuPin>();
//遍历位置组
foreach(ThrowingPoint t in throwingPointGroupUse){
//生成一个爱欲品
AiYuPin temp =Instantiate(
aiYuPin,
t.transform.position,//在位置组中元素的位置
Quaternion.identity
).GetComponent<AiYuPin>();
//初始化爱欲品
//该状态为wander使其先保持不动
temp.state = State.wander;
//修改爱欲品面部朝向
if(t.dir.x == -1) temp.transform.rotation = Quaternion.Euler(
temp.transform.rotation.x,
-180f,
temp.transform.localScale.z
);
//根据投掷点内信息给予爱欲品投掷速度
temp.GetComponent<Rigidbody2D>().velocity = t.dir * t.strength;
//把这个爱欲品加入列表
aiYuPins.Add(temp);
}
//一段时间后使他们开始Seek
yield return new WaitForSeconds(0.8f);
foreach(AiYuPin a in aiYuPins){
a.state = State.seek;
}
//等待攻击后摇结束
yield return new WaitForSeconds(CallAiYuPinEndTime);
//发送信号,本次攻击宣告结束
ATKEnd();
}
/// <summary>
/// 敲钟的时候Call这个
/// </summary>
public IEnumerator RingTheBell(){
Debug.Log("正在使用:敲钟");
inBell = true;
StartCoroutine(vibrationManager.ShakePad(0.5f,0.2f,6f,VibrationManager.PadShakeitem.));
yield return new WaitForEndOfFrame();
myBell.ATK(player);
//开始震动屏幕
vibrationManager.BellShakeScream();
}
/// <summary>
/// 拿钱的时候Call这个
/// </summary>
private IEnumerator TakeTheMoney(){
yield return new WaitForEndOfFrame();
Debug.Log("正在使用:拿钱");
myHand.ATK();
}
// ______ _
// | ____| | |
// | |____ _____ _ __ | |_
// | __\ \ / / _ \ '_ \| __|
// | |___\ V / __/ | | | |_
// |______\_/ \___|_| |_|\__|
public override void OnFindThePlayer(Transform target){
if(state == State.wander){
state = State.atk;
//StartCoroutine(ATK());
//开始显示血条UI
FindObjectOfType<BossHPBar>().OnShowUI();
}
}
/// <summary>
/// 攻击结束的时候触发,重新开始新一轮攻击
/// </summary>
public void ATKEnd(){
if(state == State.atk){
StartCoroutine(ATK());inBell = false;
}
}
public override void OnDead(){
//修改状态至死亡
state = State.dead;
//播放死亡动画
GetComponent<Animator>().SetBool("isDead",true);
//令钟猛地上浮
myBell.DOKill();
myBell.floatTweener.Kill();
myBell.transform.DOLocalMoveY(
8f,
1f
);
//开启转移块
FindObjectOfType<Transfer>().GetComponent<BoxCollider2D>().enabled = true;
//上传玩家进度
FindObjectOfType<PlayerInfo>().rate = (int) MyPlayer.Progress.;
FindObjectOfType<PlayerInfo>().UpdatePlayerInfo();
}
}