Item Interface Devleoped
Interface for item developed. May change
This commit is contained in:
parent
7aecaf3801
commit
25e519839e
@ -3,19 +3,41 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obscurum.Items{
|
namespace Obscurum.Items{
|
||||||
public class GameItem : MonoBehaviour
|
public interface GameItem
|
||||||
{
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
{
|
||||||
|
//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.
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Item name.
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Item description.
|
||||||
|
/// </summary>
|
||||||
|
public string Description { get; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies if an item can be held in the player inventory, must be carried with the carry animation, or executes some effect immediately.
|
||||||
|
/// <list type="bullet">
|
||||||
|
/// <item>UTILITY: Can be carried in inventory.</item>
|
||||||
|
/// <item>WEAPON: Must be carried with the carry animation.</item>
|
||||||
|
/// <item>CONSUMABLE: Executes some effect on interact.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </summary>
|
||||||
|
public enum ItemType {UTILITY, WEAPON, CONSUMABLE};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the collection type for this game item.
|
||||||
|
/// </summary>
|
||||||
|
public ItemType Type { get; }
|
||||||
|
|
||||||
|
//When player interacts with this item apply effect.
|
||||||
|
// public bool Interact();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user