From 25e519839e78807b79ed1d23604dd8a1b5ed0664 Mon Sep 17 00:00:00 2001 From: MarcoHampel Date: Mon, 11 Sep 2023 20:27:23 -0400 Subject: [PATCH] Item Interface Devleoped Interface for item developed. May change --- Assets/Scripts/NewDesign/Items/GameItem.cs | 44 ++++++++++++++++------ 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/NewDesign/Items/GameItem.cs b/Assets/Scripts/NewDesign/Items/GameItem.cs index 7770e8a..42ecf5b 100644 --- a/Assets/Scripts/NewDesign/Items/GameItem.cs +++ b/Assets/Scripts/NewDesign/Items/GameItem.cs @@ -3,19 +3,41 @@ using System.Collections.Generic; using UnityEngine; namespace Obscurum.Items{ -public class GameItem : MonoBehaviour -{ - // Start is called before the first frame update - void Start() + public interface GameItem { + //TODO: May want to rename ItemType enumations based on practical application: 1. InventoryItem, 2. CarryableItem, 3. InteractiveItem. This would ensure + //inventory items on interact would enter inventory, carryable items on interact go to carry, and interactive items call an event function at once. + + /// + /// Item name. + /// + public string Name { get; } + + /// + /// Item description. + /// + public string Description { get; } + + + /// + /// Specifies if an item can be held in the player inventory, must be carried with the carry animation, or executes some effect immediately. + /// + /// UTILITY: Can be carried in inventory. + /// WEAPON: Must be carried with the carry animation. + /// CONSUMABLE: Executes some effect on interact. + /// + /// + public enum ItemType {UTILITY, WEAPON, CONSUMABLE}; + + /// + /// Gets the collection type for this game item. + /// + public ItemType Type { get; } + + //When player interacts with this item apply effect. + // public bool Interact(); + } - // Update is called once per frame - void Update() - { - - } -} - }