浏览代码

Fix Interaction System doesn't follow the FSM

/devlogs-3-input
alex 4 年前
当前提交
eeb88b72
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs

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


[Header("Listening to")]
//Check if the interaction ended
[SerializeField] private VoidEventChannelSO _onInteractionEnded = default;
[SerializeField] private VoidEventChannelSO _oninteractResponsed = default;
[SerializeField] private VoidEventChannelSO _oninteractionResponsed = default;
_oninteractResponsed.OnEventRaised += OninteractionResponseActivated;
_oninteractionResponsed.OnEventRaised += OnInteractionResponseActivated;
_onInteractionEnded.OnEventRaised += OnInteractionEnd;
}

_inputReader.interactEvent -= OnInteractionButtonPress;
_oninteractResponsed.OnEventRaised -= OninteractionResponseActivated;
_oninteractionResponsed.OnEventRaised -= OnInteractionResponseActivated;
_onInteractionEnded.OnEventRaised -= OnInteractionEnd;
}

}
// interaction button press event handler activated by the StateMachine
void OninteractionResponseActivated()
void OnInteractionResponseActivated()
{
//remove interaction after press
Interaction onGoingInteraction = _ongoingInteractions.Count > 0 ?

正在加载...
取消
保存