- Home /
2D Platformer - Picking Up Items & Storing Them C#
Hello, I would like some help with an issue which I have been having. I have created a 2D Platformer, and what I am trying to archive is that when the player has collided with something, the item is stored and can be used. I have absolutely no idea on how to do this so any help will be very much appreciated. If this was confusing to understand, here is clearly what I need help with:
*When player is on, near or close to an object, when a button gets pressed for example 'KeyCode.E', then the item is destroyed, but gets stored in an inventory/or place where the player is able to access this.
For example: The player walks up to an apple (REMEMBER This is a 2D Platformer), and the KeyCode 'E', is pressed. The apple is to be destroyed from the scene, but becomes stored in an inventory system which keeps count of how many apple/s there are available, and when the player pressed the KeyCode 'P', the Players apple in the inventory count system is deleted!
Hope this explains things well enough for anyone to give me a hand. Thank you so much to anyone who try's to help me. Much Thanks Appreciated,
Regards, Trent!
Your answer
Follow this Question
Related Questions
Auto-Scrolling Level - crushing player results in death 0 Answers
Player detecting collision when crouching 1 Answer
Trigger help! 0 Answers
Trigger is not detecting Player. (2D) 1 Answer
Restart sound when re-entering trigger? 2 Answers