SebastianLawe

Untitled

Jun 9th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using UnityEngine;
  6.  
  7. namespace Assets.Scripts {
  8.     public abstract class InventoryItem : MonoBehaviour {
  9.         public Texture2D InventoryImage;
  10.         public string InventoryName;
  11.         public bool CanBeAddedToInventory;
  12.         public bool CanBeRemovedFromInventory;
  13.         public CategoryType Type;
  14.         public enum CategoryType {
  15.             None = 0,
  16.             Equipment = 1,
  17.             Paper = 2,
  18.             Item = 3
  19.         }
  20.  
  21.         /// <summary>
  22.         /// Called when added to players inventory
  23.         /// </summary>
  24.         public abstract void AddToInventory(List<InventoryItem> inventory);
  25.  
  26.         /// <summary>
  27.         /// Called when removed from player inventory
  28.         /// </summary>
  29.         public abstract void RemoveFromInventory(List<InventoryItem> inventory);
  30.  
  31.         /// <summary>
  32.         /// Called when used from player inventory
  33.         /// </summary>
  34.         public abstract void Use();
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment