This repository was archived by the owner on Aug 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
UIUpgradeSlot.cs
Erik edited this page Apr 24, 2019
·
1 revision
Script: UIUpgradeSlot.cs
- PlayerUpgrade
- UIEquippedUpgradeSlot
- ClearSlot() - Resets the slot to show "no upgrade".
- CreateSlot(PlayerUpgrade upgrade) - Assigns the ugprade to the slot and displays the image representing that upgrade.
- None
- image - UI Element to display the Upgrade's image
- draggableObjectParent - When an object is dragged from the upgrade slot, this transform is immediately set as its parent. Since UI elements rely on the GameObject hierarchy for sorting, this allows us to render the draggable object in front of all other UI elements. This transform should be at the bottom of your canvas hierarchy.
When an item is click-and-dragged, it follows the mouse until the drag is released. If the drag is released over a UIEquippedUpgradeSlot element it is equipped. Otherwise, it is returned to its original position.
Script Documentation
General Scripts
Generic Character Scripts
Enemy Scripts
Player Scripts
Erik's ongoing laundry list of TODOs that he doesn't want to create issues for