This commit is contained in:
2024-09-09 20:30:24 +08:00
commit f1e9f43ba4
165 changed files with 103426 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8a43ae24583a4a8cb476617435772627
timeCreated: 1725859800

View File

@@ -0,0 +1,26 @@
using Event;
using Event.EventArgs;
using Keyboard;
using UnityEngine;
namespace Items.Abstract
{
public abstract class ItemBase : MonoBehaviour
{
private void Start()
{
EventManager.Instance.CameraInterAct += ReceiveEvent;
}
protected virtual void ReceiveEvent(CameraInterActArgs item)
{
if (item.Item != gameObject) return;
}
protected void ActivateItem()
{
Debug.Log("Item is activated");
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ed31ae56e9e5426a869778bbc9fa3c37
timeCreated: 1725859814

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 78101257a45b4759ad2cede2ac74b17f
timeCreated: 1725859783

View File

@@ -0,0 +1,6 @@
namespace Items.Interface
{
public interface IItem
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1a8d2b3ec8724e45b00cbf6eac467b4d
timeCreated: 1725859735

View File

@@ -0,0 +1,17 @@
using Event.EventArgs;
using Items.Abstract;
using Items.Interface;
using Keyboard;
using UnityEngine;
namespace Items
{
public class TestItem : ItemBase , IItem
{
protected override void ReceiveEvent(CameraInterActArgs item)
{
if(Input.GetKeyDown(KeySettingManager.Instance.GetKey("InterAct")))
ActivateItem();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: be562f2cd7af4802854932ea7550ed73
timeCreated: 1725860034