daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top