コード例 #1
0
 /// <summary>
 /// Call this function whenever a new item is spawned on the map
 /// </summary>
 public void AssignObjectType(Item_Type_Base p_itemType)
 {
     m_itemType = p_itemType;
     if (m_sRend == null)
     {
         m_sRend = GetComponent <SpriteRenderer>();
     }
     m_sRend.sprite = p_itemType.m_objectSprite;
 }
コード例 #2
0
 public ItemStruct(Item_Type_Base p_itemType, float p_rarity)
 {
     m_itemRarity = p_rarity;
     m_itemType   = p_itemType;
 }