A downloadable asset pack

Buy Now$9.99 USD or more

This is a basic item-scoring system, using coins and traps. It includes two of my previous assets: BasicMovement and BasicScoringSystem, as well as new scripts and prefabs that add new features.

With this asset, you'll be able to create an entire 2D game with a fully functional scoring system with ease. Everything you need is included, from game objects to UI.


How to use:


To see how to set up the movement and scoring system, you can see the BasicMovement and BasicScoringSystem documentation in their folders.

For the coins and traps, you can drag and drop the already created prefabs into your scene and then scale them and change their sprites if you want.

If you want to customize your entities, you can use the scripts directly, by attaching them to your game objects. Then set their colliders to Trigger!

One important detail is that your player should have the "Player" tag because that is how the entities recognize it.


Now you can implement this important functionality into any game you create quickly and easily.


BasicScoringSystem documentation:


To use the asset, simply drag the ScoreController prefab into your scene. It contains functions to add and subtract points and reset the score to zero.

It also contains a function to get the current score.

To display your score you can use the ScoreDisplay prefab, which contains a TMP_Text component. It contains a script that will automatically update the text to display the current score. You can also specify the prefix and suffix of the score, for example, "Score: " and " points".

The ScoreController prefab also contains a script that will automatically save the score to PlayerPrefs when the game is closed, and load the score from PlayerPrefs when the game is opened. This means that the score will be saved between sessions.

If you don't want to save the score between sessions, you can uncheck the SaveScore checkbox in the ScoreController prefab.

To increase and decrease the score you can use the IncreaseButton and DecreaseButton prefabs. They contain a script that will automatically increase or decrease the score when the button is pressed. You can also specify the amount to increase or decrease the score by.

You can also use the IncreaseScore and DecreaseScore functions in your scripts to increase or decrease the score.

To get the current score you can use the GetScore function in your scripts.

To reset the score to zero you can use the ResetScore function in your scripts.

If you want to load different scenes when you pass the maxScore or minScore, specified in the ScoreControllerPrefab, you can add the SceneController prefab and specify the win and lose scene names. Remember that they have to be added to the build settings.



The demo scene demonstrates the use of the asset. For it to work, you have to import TMP_Essentials and add the three scenes in the build settings.


BasicMovement documentation:


To use the scripts you just have to attach them to your GameObject.

Your GameObject has to contain Rigidbody(or Rigidbody2D for the 2D movements).

You can adjust the speed and jump force in the Inspector.

To use the platform script every ground object, that your player steps on, has to contain the word "platform" in its name.

If you don't do that the player won't be able to jump.


ALL THE ART USED WAS FREE OF COPYRIGHT. CREDITS TO:

http://blog-buch.rhcloud.com

http://dycha.net

Purchase

Buy Now$9.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $9.99 USD. You will get access to the following files:

2DItemScoreSystem.unitypackage 65 kB

Leave a comment

Log in with itch.io to leave a comment.