浏览代码

E interaction disabled during cutscenes

/main
Amel 3 年前
当前提交
cb4d2d6e
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 3
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  2. 8
      UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs

3
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab


_droppableRewardSO: {fileID: 11400000, guid: f155590e3f62ce94ea050caa8fd5403e, type: 2}
_setHealthBar: {fileID: 11400000, guid: 22e3f27f002de44b4948988138dd9377, type: 2}
_updateHealthEvent: {fileID: 11400000, guid: 2447a760b3f9f134f8730aa53c8d2ece, type: 2}
_restoreHealth: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef, type: 2}
_restoreHealth: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef, type: 2}
--- !u!114 &3326384532942868502
MonoBehaviour:
m_ObjectHideFlags: 0

type: 2}
_onInteractionEnded: {fileID: 11400000, guid: c499d87f35465124f8fb2751b150430d,
type: 2}
_onCutsceneStart: {fileID: 11400000, guid: 9397b637ea93a3a4fb144834511eb199, type: 2}
--- !u!114 &9165201357015476168
MonoBehaviour:
m_ObjectHideFlags: 0

8
UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs


using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
public enum InteractionType { None = 0, PickUp, Cook, Talk };

[Header("Listening to")]
[SerializeField] private VoidEventChannelSO _onInteractionEnded = default;
[SerializeField] private PlayableDirectorChannelSO _onCutsceneStart = default;
_onCutsceneStart.OnEventRaised += ResetPotentialInteractions;
}
private void OnDisable()

ResetPotentialInteractions();
_onCutsceneStart.OnEventRaised -= ResetPotentialInteractions;
}
// Called mid-way through the AnimationClip of collecting

_inputReader.EnableGameplayInput();
}
private void ResetPotentialInteractions()
private void ResetPotentialInteractions(PlayableDirector _playableDirector)
{
_potentialInteractions.Clear();
RequestUpdateUI(_potentialInteractions.Count > 0);
正在加载...
取消
保存