Esempio n. 1
0
 private void Awake()
 {
     if (tileItem != null)
     {
         GameObject initialItem     = Instantiate(tileItem.gameObject, transform.position, transform.rotation, transform);
         TileItem   initialTileItem = initialItem.GetComponent <TileItem>();
         tileItem = initialTileItem;
         tileItem.SetTileSlot(this);
     }
     else
     {
         throw new System.Exception("Item slot is missing item on Awake.");
     }
 }
Esempio n. 2
0
 private void SetNewItem(TileItem newItem)
 {
     tileItem = newItem;
     tileItem.SetTileSlot(this);
 }