
*:修复若干Bug
场景:【序章-家中】
1.让CG拥有结束事件
2.编写暂用CG的结束事件,即重新载入场景【序章-家中】并让其呈现开门演出的多态。
3.创建多态【开门演出】。
4.完成多态【开门演出】。
5.创建并填充对话【谈论父亲离开后的水缸】
下班。明天做开门进CG,然后就是第一关了。🙏加油吧。
20 lines
732 B
C#
20 lines
732 B
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
|
||
//写一个类,代表一个CG,里面保存CG需要的内容
|
||
public class ACG : MonoBehaviour
|
||
{
|
||
[Tooltip("名字,同时也是唯一调用标识,别吐槽我用中文,这里是中国")]
|
||
public string CGName;
|
||
[Tooltip("这个CG要显示的东西,据说视频也可以?")]
|
||
public Texture texture;
|
||
[Tooltip("这个CG要显示多长时间")]
|
||
public float time;
|
||
[Tooltip("CG播放结束时要触发什么事件?")]
|
||
public Event onEnded;
|
||
|
||
public void OnEnded(){onEnded.OnCall();}//触发结束事件,不同CG事件不一样,所以用public自己拖
|
||
}
|
||
|