浏览代码

Fix interaction Manager

/main
uChema 4 年前
当前提交
88cf490e
共有 3 个文件被更改,包括 30 次插入24 次删除
  1. 4
      UOP1_Project/Assets/Inventory/ScriptableObjects/PlayerInventory.asset
  2. 34
      UOP1_Project/Assets/Scenes/TestingGround.unity
  3. 16
      UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs

4
UOP1_Project/Assets/Inventory/ScriptableObjects/PlayerInventory.asset


m_Script: {fileID: 11500000, guid: b39a296438081ff4c99abec393d12d54, type: 3}
m_Name: PlayerInventory
m_EditorClassIdentifier:
_items: []
_items:
- _item: {fileID: 11400000, guid: 0a7c779a15b2c4143ae2068725b8ece9, type: 2}
Amount: 1

34
UOP1_Project/Assets/Scenes/TestingGround.unity
文件差异内容过多而无法显示
查看文件

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


{
if (_onObjectPickUp != null)
{
Item currentItem = default;
Item currentItem = _currentInteractableObject.GetComponent<CollectibleItem>().GetItem();
_onObjectPickUp.RaiseEvent(currentItem);
Debug.Log("PickUp event raised");
if (_currentInteractableObject.GetComponent<CollectibleItem>())
{
currentItem = _currentInteractableObject.GetComponent<CollectibleItem>().GetItem();
_onObjectPickUp.RaiseEvent(currentItem);
Debug.Log("PickUp event raised");
}
//set current interaction for state machine
currentInteraction = InteractionType.PickUp;
}

{
_potentialInteraction = InteractionType.PickUp;
DisplayInteractionUI();
_currentInteractableObject = other.gameObject;
_currentInteractableObject = other.gameObject;
_currentInteractableObject = other.gameObject;
_currentInteractableObject = other.gameObject;
}
private void DisplayInteractionUI()

private void OnTriggerExit(Collider other)
{
ResetInteraction();
}

正在加载...
取消
保存