-
Notifications
You must be signed in to change notification settings - Fork 2k
Inventory System Base (from official thread) #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inventory System Base (from official thread) #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a very genetic base.
I'm wondering what does Order = 51 is in the inventory.
I would consider adding a custom editor script for the inventory - because dictionary item cannot be edited in the inspector and it might be nice to be able to see your inventory and make live changed during gameplay using the inspector or look at things which is easier than a debugger.
I also find the abstarction for the Item => _item a bit redundant in ItemInstance
It sets the order of the menu button that creates the Inventory ScriptableObject.
I agree this would be nice for debugging, even nicer for setting static inventories like loot chests. But the brief doesn't call for these things and I like the idea of a small first iteration.
So this is kind of a by-product of Unity not serializing properties, yet properties being the proper way to access members of the class. If we didn't need an inspector representation, an auto-property would suffice. If we didn't need public access, a serialized private field would suffice. If you need both, the solution is that you serialize a private backing field and provide a public property to access it. NOTE: There is a way to make Unity serialize the hidden backing field of an auto-property, but I think it breaks as soon as you have custom getter/setter...and the label in the inspector is ugly. |
@davejrodriguez @SoundGuy Good point on the CustomEditor, I went ahead and added a very basic one. Also, we got some new requirements. I am working today so I won't be able to mess around with it until probably 6 pm EST (although I might during lunch.) If either of you would like to add to the PR, be my guest! |
Re the order parameter in editor. Shouldn’t they be two different numbers and not both 51? |
I don't think it matters, they're nested under the same Inventory section. |
is there a way to include my commits from #101 into this PR or is the methodology is to use separate PR's ? |
@SoundGuy This is also something what i am wondering. I think this PR is a very good start for the inventory system and i'd like to add some of Chema's feedback to it as well. |
@circa94 |
You can submit a PR against my branch and I'll pull it in. Creating a new PR is just adding to the noise (now we have two PRs that represent very similar bodies of work.) |
OK, i did that. you can pull |
added Items according to @chema descrription.
When I get some time I'm going to do a pass to get the new code to meet the Coding Standards (if anyone wants to do that, go ahead - we need the new fields to be private and have underscore prefixes.) |
Have the coding standards been decided? I just got up to date on the official thread for this feature so I can make that change if they have been. |
let me handle this, i want to try to get started here :) |
Here is the coding standard guide: https://docs.google.com/document/d/1-eUWZ0lWREFu5iH-ggofwnixDDQqalOoT4Yc0NpWR3k/edit It was mentioned here: https://forum.unity.com/threads/vote-for-coding-standards.980337/page-2#post-6392942 (so you know I'm not trying to trick you) EDIT: Make sure we're only editing files in Scripts/Inventory (we don't want an expansive changeset.) |
It looks like @circa94 saw this at the same time. Are you already working on this? |
If you're bothered with redundancy in the editor - you can make change the lableing on the inspector with either an attribute or a custom editor script. |
Shouldn't the fields used in the Item scriptable object be public? |
No, going by the coding standards, we want private fields and public accessor properties if needed. |
Items that are selected should show a particular kind of action. I'm trying to think through this now, because it's kind of an odd situation. It's more like we need an "Item Selection System." |
simplified member field namings
I guess a different case is mentioned in the code standards document. It's ment like you have a class refering for example two color fields. Then you name the fields _itemColor and _buttonColor so it is obvious for which component the color stands for. Otherwise we need to name all fields in every class starting with the class name as prefix which would not make any sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start!
It would be nice if you could also eliminate the .meta
files of all the empty folders, no need to add them if there's nothing in them yet.
[Tooltip("A preview Image for the Item")] | ||
[SerializeField] private Sprite _image; | ||
[Tooltip("A prefab reference for the model of the item.")] | ||
[SerializeField] private MeshRenderer _model; // use this as reference prefab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful here, since if an item is made of multiple renderers with a common empty GameObject, this might lead to errors or having to double check if the referenced MeshRenderer
is on the base of the Prefab.
Can't it just simply be a GameObject
reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using UnityEngine; | ||
|
||
[CreateAssetMenu(fileName = "CharacterCustomization", menuName = "Inventory/Character Customization", order = 51)] | ||
public class CharacterCustomization : Item | ||
{ | ||
// TODO: Add ingredient-specific fields and properties | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if these scripts for SOs could be grouped in one folder under Inventory, to separate them from the MonoBehaviours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same goes for the other SO scripts (Utensils, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Moved Scriptable Objects to its own subfolder .
@trevorjmcdonald please Pull trevorjmcdonald@abf170d
pr #8 in your forks.
@ciro-unity can you supply us with an example item from each category to include in the placeholder folders? Ie one utensil, one ingredient, one dish etc... |
…jects to it's own folder , and changed mesh renderer to gameobject
I added a few placeholder items for example in the placeholder folders until we have some list of what items need to be there. |
made changed according to request by @Ciro_unity
Removed sample items Cleaned up code for consistency
I removed the different item types using inheritance. The requirements didn't seem to specify different behaviors depending on item type except for the inventory actions, which will probably be better handled in some other fashion. |
@trevorjmcdonald there's some conflict in this PR with UOP1_Project/Assets/Scripts/Editor.meta . you might need to pull from the main branch |
Thanks. Editor.meta didn't need to be in our PR anyways. |
I'm wathcing the current feed and it looks like there will be different behaviors for items, - for example when combining . I believe we will have to reinstate some different functionality for different items items, (like you can combine ingredients but i don't think you can combine customization items with ingredients) so this will have to be somehow represented in the item class, so i don't get why not use an inheritance method (remember we had an enum at first but we changed it to the inheritance design pattern) |
Super collaboration, guys! I'll gladly merge this, and then we can iterate it as we get more needs. If any of you is on Discord and you want to get the Open Project Contributor role, put your Discord usernames in a comment below. |
Thanks! My Discord name is Dr Jackstraw#2452 |
Thanks for merging @ciro-unity ! I guess this is a good start! |
Woohoo!! I'm SoundGuy#2962 |
I gave you all the role :) |
* Adding scenesLoader scene * Adding main menu and level 1 scenes for test * Adding loading system * Adding scenes data (still WIP) * SOs for menus and levels and adding scenes * Adding events and listeners for scene loading * Main menu and loading bar scripts * pushing ScenesLoader scene * Main menu scene, added menu disable on start * Added check to avoid loading scene multiple times * Changed to L key instead of space bar for load (space used to jump) * Clean * Added clear lists option and tweaks on MM and ScenesLoader scenes * Adjustments on scene loading * Added level 2 and level end trigger in level 1 * Added new obstacle material for lvl2 and tagged Player * Added custom inspector for GameScene ScriptableObjects It improves workflow and minimizes user error by allowing a designer to pick scenes from a list instead of typing their name manually * Updated GameSceneEditor class * Added new obstacle material for lvl2 and tagged Player * DrawSceneEditor now has a single, non-branching undo check This was done to balance out undo calls when no scene is selected from scene picker * Updated warning message * Audio System Add the Audio System script on any empty game object and add all the Theme and SFX. * Added bases for sound manager - Created SoundEmitter with basic functionality of playing sounds for further extension - Created singleton SoundManager with following functionality: - Change, save and load volume of a selected audio mixer - Managing a pool of SoundEmitter objects with dynamic extension - Playing 2D and Spatial sounds through SoundEmitter * Changed mixer group functions as static * Fixes proposed by Deragaun - Removed some old testing code - Renamed variable thisAudioSource to follow with more formal code guidelines - Removed usage of Vector3.zero as a marker for spartialBlend and used the current functionality provided by AudioSource via parameter * Renamed variable audioSource to follow convention * Streamlined Play2DSound so spatialBlend is not needed as a parameter - Fixed a typo in SoundEmitter * Removed old comment * Initial commit * [Bot] Automated dotnet-format update * Added debug toggle * [Bot] Automated dotnet-format update * Update StateMachines.unity * Removed serializable actions/conditions. Added current state name in state machine component. Added more spheres to test scene. * minor * Update UOP1_Project/Assets/Scripts/Sound/SoundManager.cs Removed unnecessary GetComponent<> Co-authored-by: Deiv <david.lischinsky@outlook.com> * Update UOP1_Project/Assets/Scripts/Sound/SoundManager.cs Removed setting/getting mixer volumes in player settings - Added getter for group volume Co-authored-by: Dave Rodriguez <drod7425@gmail.com> * Minor changes to the pooler - Replaced while iteration through the list with a LINQ query - Added maximum instances that can be created, maximum is determined by AudioSettings.numVirtualVoices * Merge Sound Manager * Emitter pool now destroys extra instances past the initial pool that have not been used recently - Recently is determined by _extraTimeBeforeTrim variable * Added end timestamp infinity for loop sounds - StopSound() now applied current time as last time this emitter was in use - The variable _lastUseTimestamp is now private with a getter only function - Updated SoundManager to use the timestamp getter * Updated public and private variable names to follow the convention * Renaming from 'Scriptable' prefix to 'SO' suffix. Co-Authored-By: Ciro Continisio <20049224+ciro-unity@users.noreply.github.com> * Adjusted test scene. Renamed StateAction.Perform() to OnUpdate(). Added a couple of Tooltips and comments. The test scene was adjusted to display how to override the behaviour of the Spheres by attatching a different `ChaseDataSO` to the `StateMachine`, specifying a different target. Tooltips and comments were added to try to explain the workflow of overriding Action and Condition data. * [Bot] Automated dotnet-format update * Added Conventions Link to README (#97) * Added Conventions document link to README * Small tweaks to the readme wording * Added beach and forest scenes for scenes loading tests * Changed Level to Location * Remove old files * Added Void, Int and Load Events SO and Listeners * Methods to trigger events * Changes on Main Menu and Scenes Loader after updates * Location loader script * Renamed Levels folder to Locations * Removed what we don't need * Better comments * Removed ScriptableObjects array from StateMachine. Adjusted test scene. Single line methods now use brackets, properties still use lambda when possible. Removed the 'override' feature that was implemented as it was adding unnecessary complexity. Adjusted test scene to reflect the changes: - Added `ChaseComponent.cs`. It takes `Transform _target`, `float _speed` and has a `public void Chase()` function that moves the gameObject towards the target. - `ChaseAction` now simply calls `ChaseComponent.Chase()` in its `OnUpdate()`. - `ChaseComponent` also contains a public getter `Target => _target`. - `CloseToTargetCondition` gets `transform` from the `StateMachine` and the transform of the target from `ChaseComponent`, the `Statement()` remains the same. Another way to implement it would be to have a public getter `bool IsCloseToTarget` or `float DistanceToTarget` in `ChaseComponent` and evaluate that in the `Statement`. - Removed `ChaseData.cs`. - How much each sphear eats is now controlled directly in the `HungerComponent`, and `Eat(float amount)` is now `Eat()`. - `TimerCondition` remains the same. Generic conditions like this one can be used in multiple scenerios by creating more instances of the same SO. eg: `EatDuration.asset` and `AttackDuration.asset`. * [Bot] Automated dotnet-format update * Added root-level gitignore file * Removed personal namespace * Character state machine * Tweaks and comments Removed StateMachines scene, fixed a small bug on Sliding when spawning in the air and trying to move * Yet another State Machine (#94) * Initial commit * [Bot] Automated dotnet-format update * Added debug toggle * [Bot] Automated dotnet-format update * Update StateMachines.unity * Removed serializable actions/conditions. Added current state name in state machine component. Added more spheres to test scene. * minor * Renaming from 'Scriptable' prefix to 'SO' suffix. Co-Authored-By: Ciro Continisio <20049224+ciro-unity@users.noreply.github.com> * Adjusted test scene. Renamed StateAction.Perform() to OnUpdate(). Added a couple of Tooltips and comments. The test scene was adjusted to display how to override the behaviour of the Spheres by attatching a different `ChaseDataSO` to the `StateMachine`, specifying a different target. Tooltips and comments were added to try to explain the workflow of overriding Action and Condition data. * [Bot] Automated dotnet-format update * Removed ScriptableObjects array from StateMachine. Adjusted test scene. Single line methods now use brackets, properties still use lambda when possible. Removed the 'override' feature that was implemented as it was adding unnecessary complexity. Adjusted test scene to reflect the changes: - Added `ChaseComponent.cs`. It takes `Transform _target`, `float _speed` and has a `public void Chase()` function that moves the gameObject towards the target. - `ChaseAction` now simply calls `ChaseComponent.Chase()` in its `OnUpdate()`. - `ChaseComponent` also contains a public getter `Target => _target`. - `CloseToTargetCondition` gets `transform` from the `StateMachine` and the transform of the target from `ChaseComponent`, the `Statement()` remains the same. Another way to implement it would be to have a public getter `bool IsCloseToTarget` or `float DistanceToTarget` in `ChaseComponent` and evaluate that in the `Statement`. - Removed `ChaseData.cs`. - How much each sphear eats is now controlled directly in the `HungerComponent`, and `Eat(float amount)` is now `Eat()`. - `TimerCondition` remains the same. Generic conditions like this one can be used in multiple scenerios by creating more instances of the same SO. eg: `EatDuration.asset` and `AttackDuration.asset`. * [Bot] Automated dotnet-format update Co-authored-by: Ciro Continisio <20049224+ciro-unity@users.noreply.github.com> * Fixed Assembly issue * Fixed Assembly issue * Updated raise method name * Updated beach scene * Updated to Unity version 2019.4.11 * Small feedback tweaks * Fixing events not being events (#109) Without event keyword anyone can call such delegates * [Bot] Automated dotnet-format update * Location loader now sets the active scene * [Bot] Automated dotnet-format update * Fixed transition grouping error (#112) changed the variable idx value from i to the last index of resultGroupsList * Fixed the BeginJumpDescent conditions (#116) Now the transition checks if the player is in the air to activate the state. * Applied the tag EditorOnly to logical section GameObjects (#113) * Inventory System Base (from official thread) (#100) * Added the basic inventory system * Removed prefixes, added CreateAssetMenu to ingredient * Added CreateAssetMenu to Inventory * Updated to use tabs and prefixes * Added prefix to inventory item * Added a means to iterate over items in Inventory * Moved accessor * Spaces to tabs (again) * Added default assignment to prevent warning * Added a CustomEditor for Inventory * added Items according to @chema descrription. * Marked out item type * follow code convention * Added character Customization script. Added folder structure for scripable objects * removed marked out lines * Changed Inventory to contain a list of ItemStacks instead of a dictrionary of Items. * added item background color * Reimplemented all the methods in Inventory.cs to work better with List. * simplified member field namings * made changed according to request by @Ciro_unity - moved scirpable objects to it's own folder , and changed mesh renderer to gameobject * Added some items so that the scriptable folders placeholders won't be empty. * Recommit SO assets - Unity engine didn't save the changes unti i closed it. * Removed inheritance model from Item Removed sample items Cleaned up code for consistency * Removed editor.meta Co-authored-by: Oded Sharon <github@odedsharon.com> Co-authored-by: Hannes Klose <hannes.klose@adeccogroup.com> Co-authored-by: Hannes Klose <hannesklose@hotmail.de> Co-authored-by: Wills-M <wmm38@drexel.edu> * [Bot] Automated dotnet-format update * Applied the tag EditorOnly to logical section GameObjects (#125) * Applied the tag EditorOnly to logical section GameObjects (#126) * Added scene management folder in scripts * Now possible to start the game from any scene * Added SO to the name of scriptable objects scripts * Changed Scene loader scene name to Initialization * Added Scenes folder in SO folder * SO name updated in other scripts * Referenced initialization game scene SO in the initializer prefab * [Bot] Automated dotnet-format update * feat(gitignore): Add `.idea/` cache directory (#132) * Change Awake() to Start() in Spawning System (#120) (#136) Issue #120 When the scenes are additively loaded, GameObject instantiation should be put in Start(), because Awake() is exectuted before the new scene becomes active. Reference thread: https://forum.unity.com/threads/additive-scene-loading-and-awake.660379/ * Allow switching from the Idle state to Sliding or JumpDescending (#124) This bug was allowing the character to climb the mountain without sliding. The change also improves responsiveness for dynamic objects in the environment. * Audio Manager * Cleanup, Reorganisation of folders and Scenes * [Bot] Automated dotnet-format update * Generic (Scriptable) Object Pool (#117) * Generic Object Pool Added Generic Object Pool Added Generic Object Factory Added Example Scene * Added missing documentation * Update Pool.cs Removed stray virtual keyword for time being * Removed old testing assets * Implemented Requested Changes - Removed _unavailable collection from Pool - Added batch Request/Return methods - Added IPool interface to enforce common methods - Modified example scene to showcase batch methods - Pared down ComponentFactory to its base function * Added Experimental ScriptableObjects Added FactorySOs Added PoolSOs * Implemented Pool/Factory as ScriptableObject * Initialize on Return * Added Runtime Creation Example & Various fixes and cleanup Added runtime creation example renamed Pool.Add to Pool.Create made Pool.Create protected instead of public Streamlined Request method Initialized List with known size in batch Request method Only DestroyImmediate pool root object when in the editor * Removing .gitignore * Revert version change * Revert InputManager and QualitySettings changes * Real Revert of Input Manager and Project Version * Back from whence you came? * Refactoring and Trimming Refactored IPoolable.Initialize to IPoolable.OnRequest Refactored IPoolable.Reset to IPoolable.OnReturn Removed batch methods from IPool * Cleanup * Cleanup Fixed namespace name, syntax, removed spaces from filenames Co-authored-by: Ciro Continisio <ciro@unity3d.com> * [Bot] Automated dotnet-format update * changed input phase check to match best practices (#141) * Updated Gitignore Ignoring the ProBuilder setting file * Spawn location editor (#138) * place spawn location with mouse * commenting tooltip out * Cleanup Removed unused code, various renames, fixed usage of the event.Use() function, added AddComponentMenu attribut Co-authored-by: Ciro Continisio <ciro@unity3d.com> * [Bot] Automated dotnet-format update * Simple mouse based camera controls (#146) * changed input phase check to match best practices * simple solution * simple camera mouse movement - implemented system where right button hold enables mouse to control camera - added a 'speed' setting to the camera manager to modify rotation speed - updated .inputactions asset - to contain a mouse binding for "RotateCamera" action - added "EnableMouseCameraRotation" action - added scale vector 2 processors for different rotation devices to get a similar speed out of each of them - updated input reader to handle new bindings + action - updated CameraManager to handle new method of camera manipulation - found bug with old rotate camera binding (did not work on my gamepad) deleted old binding, remade it. now works on my setup * added speed preset to camera system prefab. some code housekeeping / syntax changes * renamed for clarity * Better naming for variables Co-authored-by: Unknown <amel.negra@unity3d.com> * [Bot] Automated dotnet-format update * Pool Cleanup (#147) Removed space from asset filename Move LocalPoolTester from Assets to the Example folder Renamed ComponentPool to ComponentPoolSO to match naming convention * [Bot] Automated dotnet-format update * Working dialogue and cutscene system. (#135) * Add Dialogue Track base implementation * Custom timeline track and clip for dialog - Can at any time call for a line of dialogue. - Each clip binds line of dialogue to be later displayed on screen. - Depending on the options of this clip, the Timeline might pause. * Made adjustments based on HyagoOliveiran's suggestions Tried to add more variables to increase legibility. Added UpdateSlide function. Deleted some empty lines. * Update Character.cs * Update Character.cs * Update Character.cs * Update Character.cs * Update Character.cs * Update Character.cs * Update UOP1_Project/Assets/Scripts/Characters/Character.cs I deleted unnecessary spacing by following atb-brown suggestion. Co-authored-by: Austin Brown <atb.austin@gmail.com> * Deleted unnecessary spacing * Fixed bouncing issue when player hit under floating platform * My take on a simple Player Spawn System * Renamed SetRequestSpawnIndex to SetSpawnIndex * Spawn system in place * InputReader made into ScriptableObject asset * SpawnSystem active in the scene Removed the player prefab from the scene * Replace magic numbers with variables - issue: 40 * Change var name to more acurately show purpose * Remove accidentaly added blank lines * Changed the new variable into a constant * Create pull_request_template.md * Implemented automatic linter * Removed bot account from auto commit * [Bot] Automated dotnet-format update * Reorganising and renaming * [Bot] Automated dotnet-format update * Create new scene for testing * Create dialogue data type (SO) * Add ReorderableList source code from: https://github.com/cfoulston/Unity-Reorderable-List/blob/standalone/List/Editor/ReorderableList.cs * Move Dialogue-related script to its own folder * Create custom editor for DialogueData.cs * Push uncommited changes (.meta files) * Create CutsceneData.cs to hold information about the dialogue that wants to be played and the on end event * Edit input reader tobe able to advance dialogue * Create CutsceneManager.cs to manage user input, dialogue box, playable director, and more * Create CutsceneTrigger.cs to trigger CutsceneData * Create DialogueData for demo purpose and adjust scene. * Create timeline track, clip, behaviour, mixer to be able to play CutsceneData (dialogue) * Make timeline asset and dialogue data for demonstraion purpose * Adjust scene * Adjust scene and fix minor bug (Timeline still playing but paused when last id is shown) * Move DialogueDatas SO to its own folder * Create Actor Data SO * Cleanup cutscene manager and add more comment * Use Actor Data in demo scene * Preparing more demo cutscene * Rename playable asset * Final demo * Push uncimmited changes * Clean up * More clean up * Halfway through mega-refactor * More cleanup, ready to rewrite * More refactoring, DialogueManager created * Cutscene system in place Clips can stop the Timeline, input resumes it Co-authored-by: Dan <d.szabo87@gmail.com> Co-authored-by: Caius Eugene <caius.eugene@gmail.com> * [Bot] Automated dotnet-format update * Updated SoundManager to use the new pooler system - Deleted all current pool functionality - Created Factory and Pool SOs for the new Pool functionality - Deleted unused variables in SoundManager (mixerGroups) - Cleaned up singleton SoundManager singleton declaration (suggestions by davejrodriguez & DeivSky) * Initial commit with fix (#149) * Pre-refactoring * Test audio files * Data structures and ScriptableObjects * Finished refactoring, implemented simple AudioCue player component Co-authored-by: Unknown <amel.negra@unity3d.com> Co-authored-by: Carlos Eduardo Pérez <carlospe097@outlook.com> Co-authored-by: Ciro Continisio <ciro@unity3d.com> Co-authored-by: Rahul Kumar Sharma <47045074+RKS13D@users.noreply.github.com> Co-authored-by: Rahul Kumar Sharma <rks13d@gmail.com> Co-authored-by: DeivSky <davidlis95@gmail.com> Co-authored-by: Deiv <david.lischinsky@outlook.com> Co-authored-by: Dave Rodriguez <drod7425@gmail.com> Co-authored-by: Ciro Continisio <20049224+ciro-unity@users.noreply.github.com> Co-authored-by: RunninglVlan <RedCapShortCut@gmail.com> Co-authored-by: Wagner GFX <greyfox_esb@hotmail.com> Co-authored-by: Gordon Arber <Gordon.arber@gmail.com> Co-authored-by: Trevor J McDonald <trevor.j.mcdonald.personal@gmail.com> Co-authored-by: Oded Sharon <github@odedsharon.com> Co-authored-by: Hannes Klose <hannes.klose@adeccogroup.com> Co-authored-by: Hannes Klose <hannesklose@hotmail.de> Co-authored-by: Wills-M <wmm38@drexel.edu> Co-authored-by: yopparai <55656303+yopparai@users.noreply.github.com> Co-authored-by: treivize <42570903+treivize@users.noreply.github.com> Co-authored-by: fqureshi <fqureshi93@gmail.com> Co-authored-by: kgc00 <kirbygc00@gmail.com> Co-authored-by: Jonathan Mercer <jonathanmercer2012@yahoo.com> Co-authored-by: Rainaldi Satria <57592497+rainaldisatria@users.noreply.github.com> Co-authored-by: Dan <d.szabo87@gmail.com> Co-authored-by: Caius Eugene <caius.eugene@gmail.com>
Inventory System Base
Ticket
Forum Thread
Acceptance Criteria
Updated Acceptance Criteria & Wireframe
The Inventory will contain 3 different types of items :
Ingredients, Utensils and Customisation items are picked up from the world environment.
Ingredients and Utensils are used to create Dishes.
Ingredients disappear from the inventory, while Utensils are kept.
Dishes appear in the inventory after the Ingredients and Utensils are selected then used
Customisation Items are purely cosmetic. They’re mainly elements that can either be added to the character 3D model (bracelet, hat ... ) or texture changes (new apron color …).
A Customisation Item can be equipped
An item is characterised by:
Summary
We opted for a very basic implementation that did not exceed the scope of the acceptance criteria. We have ScriptableObjects for storing data and differentiating items. We have Monobehaviours for interactions. For differentiating item items, we are using inheritance. It is possible that this methodology does not suit the game design over time. For example, if an item should be an ingredient and also a healing item. For now, using inheritance is simple enough to differentiate item types.
ScriptableObjects
Monobehaviours