Roman 96843244ae 任务:流程化游戏
*.编写黑块逻辑
(*.具有状态in、all、out
(1.当被呼出,执行呼出事件
((1.分type执行“入”的Tween动画
((2.入动画结束后,修改自身状态至all
((3.等待一定的加载时间后,修改自身状态为out,并开始出动画
((4.出动画结束后,找到“开幕演出”游戏物体,找到它的Stage并触发
((5.完成善后工作,将块移回原来的位置
(2.start时,检查场景内是否有其他转场块。若有,删除自己

1.制作转场
(1.触发转移
(2.关闭操作地图
(4.令玩家一直向右移动
(3.呼出黑块
(4.等待、直到黑块进入全覆盖状态
(5.根据字典经行场景转移
(6.黑块内部协程级时结束后,揭开黑幕
(7.揭开动画结束后
(8.找到“开幕演出”游戏物体,找到它的Stage并触发

3.流程化游戏
(1.将各个场景简单连接

4.修改各场景开幕演出,使开幕演出时修改玩家位置至指定位置

5.制作和替换美术素材,增加部分动画
(1.制作地藏石像动画

*优化和修复
1.修复佛教前置关陷阱小怪抽动的问题
2.修复佛教前置关掉怪陷阱下落太慢的问题

建议:
1.给普通关卡和村也加上类似Boos的全局shader,目前从关卡间过度的时候能够看出明显的区别
2.建议给地藏敲钟攻击的灰尘加上渐隐,目前是瞬间消失的,十分违和
3.建议给普通的炸弹也加上拖尾,很酷
4.以撒发怒时变红太快了,消散得也太快了
5.以撒鬼魂的粒子也建议加上淡入和淡出

*.至此,已经基本完成了游戏的流程化,已经能够顺利地连成一条线了,并且可以在关卡失败的时候在当前场景重生
*.接下来就是填充剧情和美化场景,明天应该能把数据库互动做好

下班
2021-12-23 01:19:03 +08:00

105 lines
3.0 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 DG.Tweening;
using Sirenix.OdinInspector;
using UnityEngine.InputSystem;
/// <summary>
/// 控制转场黑块
/// </summary>
public class Blcak : MonoBehaviour
{
public enum State{, , , }
/// <summary>
/// 黑块的目前运行状态
/// </summary>
[Header("状态")][ReadOnly]
public State state;
public enum Type{, }
[Header("类型")]
public Type tyepe;
private RectTransform rectTransform;
void Start(){
Init();
}
private void Init(){
rectTransform = GetComponent<RectTransform>();
state = State.;
if(FindObjectsOfType<Blcak>().Length > 2) Destroy(rectTransform.parent.gameObject);
DontDestroyOnLoad(rectTransform.parent.gameObject);
}
public void OnCall(Type type){
StartCoroutine(Perform(type));
}
private IEnumerator Perform(Type type){
//修改状态
state = State.;
//执行“入”的Tween动画
if(type == Type.){
Tweener tweener = rectTransform.DOLocalMoveX(
0,
1f
).OnStepComplete(
() => {
state = State.;
}
);
}
if(type == Type.){
Tweener tweener = rectTransform.DOLocalMoveY(
0,
1f
).OnStepComplete(
() => {
state = State.;
}
);
}
yield return new WaitForSeconds(2f);
//执行“出”的Tween动画
state = State.;
if(type == Type.){
Tweener tweener = rectTransform.DOLocalMoveX(
-3358,
1f
).OnStepComplete(
() =>{
//恢复黑块位置
rectTransform.localPosition = new Vector3(
1421,-6,0
);
//寻找游戏物体“开幕演出”得到其Stage组件并开始运行
GameObject.Find("开幕演出").GetComponent<Stage>().OnCall();
//恢复黑块状态
state = State.;
}
);
}
if(type == Type.){
Tweener tweener = rectTransform.DOLocalMoveY(
2723,
1f
).OnStepComplete(
() =>{
//恢复黑块位置
rectTransform.localPosition = new Vector3(
0,-2722,0
);
//寻找游戏物体“开幕演出”得到其Stage组件并开始运行
GameObject.Find("开幕演出").GetComponent<Stage>().OnCall();
//恢复黑块状态
state = State.;
}
);
}
}
}