fixed item system
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
13
Assets/Scripts/Item/HeavyItemReceiver.cs
Normal file
13
Assets/Scripts/Item/HeavyItemReceiver.cs
Normal 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;
|
||||
|
||||
|
||||
}
|
11
Assets/Scripts/Item/HeavyItemReceiver.cs.meta
Normal file
11
Assets/Scripts/Item/HeavyItemReceiver.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aef7fff75652a9a499e312b65c8f91b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user