Advertisement
evelynshilosky

Item - Part 1

Jan 21st, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class Item : MonoBehaviour
  4. {
  5.     public string itemName;
  6.     public bool isTwoHanded;
  7.     public bool isStorageItem;
  8.     public int storageCapacity;
  9.     public Sprite icon;
  10.  
  11.     // Separate offsets for left and right hands
  12.     public Vector3 leftPositionOffset = Vector3.zero;
  13.     public Vector3 leftRotationOffset = Vector3.zero;
  14.     public Vector3 rightPositionOffset = Vector3.zero;
  15.     public Vector3 rightRotationOffset = Vector3.zero;
  16.  
  17.     // Edible item properties
  18.     public bool isEdible = false;
  19.     public float healthEffect = 0f;
  20.     public float hydrationEffect = 0f;
  21.     public float calorieEffect = 0f;
  22.  
  23.     public virtual void Use()
  24.     {
  25.         Debug.Log($"Using {itemName}");
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement