Guest User

Untitled

a guest
Feb 16th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. using System.Collections;
  2. using UnityEngine;
  3.  
  4. public class Item // Unnecessary to specify any inheritance i.e. MonoBehaviour
  5. // Start and Update functions are also not needed for this.
  6. {
  7. public int itemID = 0; // Default values when none are given with constructor below
  8. public string itemName = "Unnamed";
  9. public string itemDescription = "No Description";
  10.  
  11. public Item(int id, string name, string description) // Constructor function
  12. {
  13. this.itemID = id;
  14. this.itemName = name;
  15. this.itemDescription = description;
  16. }
  17. }
Add Comment
Please, Sign In to add comment