public void Reset() { //清除自身高亮 Destroy(GetComponent <Highlighter>()); //恢复初始状态 Status = _statusToReset; }
/// <summary> /// 步骤配置 /// </summary> /// <param name="targetUniqueId">操作目标Id</param> /// <param name="targetStatus">目标状态</param> /// <param name="autoCameraAnim">是否要有过场动画</param> public Step(int targetUniqueId, Enum_GameObjectStatus targetStatus, bool autoCameraAnim = true) : base() { ConfigSubtitle(""); TargetUniqueId = targetUniqueId; _targetStatus = targetStatus; _autoCameraAnim = autoCameraAnim; LinkGameInfo(targetUniqueId); }
/// <summary> /// 步骤配置(带有音频) /// </summary> /// <param name="targetUniqueId">操作目标Id</param> /// <param name="targetStatus">目标状态</param> /// <param name="audioName">音频文件</param> /// <param name="autoCameraAnim">是否要有过场动画</param> /// <param name="playMode">播放模式</param> public Step(int targetUniqueId, Enum_GameObjectStatus targetStatus, string audioName, bool autoCameraAnim = true, PlayMode playMode = PlayMode.Start) : this(targetUniqueId, targetStatus, autoCameraAnim) { ConfigSubtitle(""); PlayMode = playMode; AudioName = audioName; //if (playAudio) // StepStartAutoAction += () => { AudioManager.Instance.PlayAudio(audioName); }; }
public void Start() { //如果是顶级物体,就挪放到物体管理的下面 if (IsParent) { transform.SetParent(GameObjectInfoManager.Instance.transform); GameObjectInfoManager.Instance.AddGameObjectInfoDictionary(this); } _statusToReset = Status; StudyManager.Instance.OnStartStudy += Reset; }
/// <summary> /// 带有字幕的步骤 /// </summary> /// <param name="subtitle"></param> /// <param name="targetUniqueId"></param> /// <param name="targetStatus"></param> /// <param name="audioName"></param> /// <param name="autoCameraAnim"></param> public Step(string subtitle, int targetUniqueId, Enum_GameObjectStatus targetStatus, string audioName, PlayMode playMode = PlayMode.Start, bool autoCameraAnim = true) : this(targetUniqueId, targetStatus, audioName, autoCameraAnim, playMode) { ConfigSubtitle(subtitle); }
public override void Awake() { base.Awake(); _originalTexture = targetMesh.material.mainTexture; _originalStatus = GameObjectInfo.Status; }