fixed item system

This commit is contained in:
2023-04-03 23:00:18 -04:00
parent 711778d91c
commit 729751b57f
7 changed files with 1115 additions and 254 deletions

View File

@ -2,7 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorInteractable : InteractableItem
public class DoorInteractable : HeavyItemReceiver
{
[SerializeField]
private Transform powerCoreCenter;
@ -91,6 +91,8 @@ public class DoorInteractable : InteractableItem
else if(insertedCore!=null&&heavyInvent==null)
{
heavyInvent = insertedCore;
print("Picked up:" + heavyInvent.name);
insertedCore = null;
//get ref of player perhaps
return true;
}

View File

@ -0,0 +1,13 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class HeavyItemReceiver : InteractableItem
{
protected HeavyInteractableItem item;
[SerializeField]
[Tooltip("Specify the keyword search in the name of the item!")]
protected string searchString;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: aef7fff75652a9a499e312b65c8f91b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: