[내일 배움 캠프 Unity 4기] W8D5 06.07 TIL

김용준·2024년 6월 7일
0

내일배움캠프

목록 보기
30/47

Goals

  • Define items with ScriptableObject
  • Equip slots Inventory

Item scripts

Applying Scriptable Object in Unity, I have implemented various type of items on project. The item spieces were distinguished with the concept of our project.

  • Resource
  • Use
  • Tool
  • Equip (Weapon / Subweapon / Armor)

Each item was connected with the script which inheritted the scriptable object. The feature of Resource and Use is the stack. Getting the same items on the inventory, these item would set in the same slot if the slot is not fully occupied.

Expanding the item slots on inventory, we have designed equip slots on the top.
the layout can be seen with following figure.

Before the equip / unequip interaction, we have to set the buttons on item selection. Facilitating the inventory, the pop-up 'ItemInfo' was developed.

The consumables, apple, can be seen the information popup with the use button. But the 'use' doesn't match for the resources, tools and equips.
a
To dividing the action with the item type, the information popup could be modified
b

profile
꿈이큰개발자지망생

0개의 댓글