55 lines
2.3 KiB
Plaintext
55 lines
2.3 KiB
Plaintext
Class Definitions:
|
|
Overview: Basically the classes are built out to uniquely abstract certain types of objects.
|
|
Basically there are currently only Interactable Items that are used. Some are heavy (ie Power Cores)
|
|
used to power things like doors. The classes defined here offer functionality over serveral abstraction layers
|
|
to keep implementation of new items at a minimum with higher layers automatically performing tasks.
|
|
|
|
|
|
CarryableItem
|
|
- Type: Abstract Class
|
|
- Extends: MonoBehaviour
|
|
- Description: The highest level representation of an item.
|
|
- Features: Forces an item to have a size and name.
|
|
|
|
InteractableItem
|
|
- Type: Abstract Class
|
|
- Extends: CarryableItem
|
|
- Description: Any 3D in world item that can be picked up in the game.
|
|
- Features:
|
|
- Must have a In World Canvas and Text that appears whenever the player gets close.
|
|
|
|
Generic Interactable:
|
|
- Type: Class
|
|
- Extends: InteractableItem
|
|
- Description: Object has no functionality other than enforcing InteractableItem's features.
|
|
This was done since Abstract Classes cannot be instantiated in a scene.
|
|
|
|
Heavy Interactable:
|
|
- Type: Class
|
|
- Extends: InteractableItem
|
|
- Description: A large item that the astronaut has to carry in their arms.
|
|
- Features:
|
|
- Offers functionality to Enable and Disable the collision systems of a Heavy
|
|
item for pickup. Additionally defines functions for classes that extend it to
|
|
define how it gets interacted with.
|
|
|
|
Heavy Item Receiver:
|
|
- Type: Abstract Class
|
|
- Extends: InteractableItem
|
|
- Description: Represents items that stores Heavy Interactable Items within.
|
|
- Features:
|
|
- Defines space for the Heavy Item that is stored within it.
|
|
- Defines a keyword the receiver looks for when a heavy item is inserted.
|
|
|
|
Door Interactable Item:
|
|
- Type: Class
|
|
- Extends: Heavy Item Receiver
|
|
- Description: Represents power slots for doors. Taking in a Heavy Interactable Item with
|
|
the name "Power Core" in it.
|
|
- Features:
|
|
- Defines the Interact() function for when a player clicks the interaction button.
|
|
- Checks if a player has a heavy item in its hands and moves it into the slot both
|
|
on back-end and visually.
|
|
- Then modifies the door's animator to animate it opening/closing.
|
|
|