コード例 #1
0
ファイル: InvInstance.cs プロジェクト: marafrass/Prototype-2
 /**
  * <summary>A Constructor based on the linked InvItem's ID</summary>
  * <param name="_itemID">The ID number of the associated InvItem</param>
  * <param name="_count">The amount of that item to reference</param>
  */
 public InvInstance(int _itemID, int _count = 1)
 {
     itemID  = _itemID;
     invItem = (KickStarter.inventoryManager) ? KickStarter.inventoryManager.GetItem(itemID) : null;
     if (invItem != null)
     {
         invItem.Upgrade();
     }
     Count      = _count;
     invVars    = new List <InvVar>();
     cursorIcon = (invItem != null) ? new CursorIcon(invItem.cursorIcon) : null;
     matchingInvInteractionData = null;
     lastInteractionIndex       = 0;
     GenerateDefaultProperties();
 }
コード例 #2
0
ファイル: InvInstance.cs プロジェクト: marafrass/Prototype-2
 /**
  * <summary>A Constructor based on the linked InvItem</summary>
  * <param name="_itemID">The associated InvItem</param>
  * <param name="_count">The amount of that item to reference</param>
  */
 public InvInstance(InvItem _invItem, int _count = 1)
 {
     invItem = _invItem;
     if (invItem != null)
     {
         invItem.Upgrade();
     }
     itemID     = (invItem != null) ? invItem.id : -1;
     Count      = _count;
     invVars    = new List <InvVar>();
     cursorIcon = (invItem != null) ? new CursorIcon(invItem.cursorIcon) : null;
     matchingInvInteractionData = null;
     lastInteractionIndex       = 0;
     GenerateDefaultProperties();
 }
コード例 #3
0
ファイル: InvInstance.cs プロジェクト: Keraunic-Tonic/GJ2021
 /**
  * <summary>A Constructor based on a Container item</summary>
  * <param name="containerItem">The Container item to create an instance from</param>
  */
 public InvInstance(ContainerItem containerItem)
 {
     itemID  = containerItem.ItemID;
     invItem = (KickStarter.inventoryManager) ? KickStarter.inventoryManager.GetItem(itemID) : null;
     if (invItem != null)
     {
         invItem.Upgrade();
     }
     Count      = containerItem.Count;
     invVars    = new List <InvVar> ();
     cursorIcon = (invItem != null) ? new CursorIcon(invItem.cursorIcon) : null;
     matchingInvInteractionData = null;
     lastInteractionIndex       = 0;
     GenerateDefaultProperties();
     canBeAnimated = DetermineCanBeAnimated();
 }
コード例 #4
0
ファイル: InvInstance.cs プロジェクト: Keraunic-Tonic/GJ2021
 /**
  * <summary>A Constructor based on the linked InvItem's name</summary>
  * <param name="_itemName">The name number of the associated InvItem</param>
  * <param name="_count">The amount of that item to reference</param>
  */
 public InvInstance(string _itemName, int _count = 1)
 {
     invItem = (KickStarter.inventoryManager) ? KickStarter.inventoryManager.GetItem(_itemName) : null;
     if (invItem != null)
     {
         invItem.Upgrade();
     }
     Count      = _count;
     itemID     = (invItem != null) ? invItem.id : -1;
     invVars    = new List <InvVar> ();
     cursorIcon = (invItem != null) ? new CursorIcon(invItem.cursorIcon) : null;
     matchingInvInteractionData = null;
     lastInteractionIndex       = 0;
     GenerateDefaultProperties();
     canBeAnimated = DetermineCanBeAnimated();
 }