scoremanager - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Minigames.Archery.GameLogic
Inherits from UnityEngine.MonoBehaviour
Implements the basic logic of an arrow game, starting the timer, registering the score managers and starting the spawners.
The score can be increase or decreased using the respective functions. To further handle how values are processed, you can choose how a score increase should be handled.
This makes it possible to visualize hitting a target in multiple different ways simultaneously, i.e. count its points and count the hits.
public class ScoreManager : MonoBehaviour| Name | Description |
|---|---|
| ScoreDeltaHandling | Describes how a score delta is handled. |
| If the processed value is added/subtracted depends on the function called (increase vs decrease). |
| Name | Description |
|---|---|
| GlobalScoreManagers | Unique set of ScoreManagers accessible from a global scope. |
| To add a score manager, set '_registerAsGlobal' of the respective component to true. |
| Name | Description |
|---|---|
| AlterScore(bool) | Increases or decreases the score by the default step size. |
| AlterScore(int,bool) | Increases or decreases the score by the provided step size. |
| DecreaseScore() | Decrease the score by the default amount. |
| DecreaseScore(int) | Decrease the score by the provided amount. |
| HandleScoreDelta(int,ScoreDeltaHandling) | Processes a raw value according to the rules of the provided ScoreDeltaHandling. |
| IncreaseScore() | Increase the score by the default amount. |
| IncreaseScore(int) | Increase the score by the provided amount. |
| MergeWithGlobalManagers(ScoreManager) | Combines a singe ScoreManager with the GlobalScoreManagers, returning a list without duplicates. |
| MergeWithGlobalManagers(IEnumerable) | Combines ScoreManagers with the GlobalScoreManagers, returning a list without duplicates. |
| RegisterScoreMangerGlobally(ScoreManager) | Registers a ScoreManager to be globally accessible. |
| ResetScore() | Resets the score back to zero. |
| UnregisterScoreMangerGlobally(ScoreManager) | Unregisters a ScoreManager from being globally accessible. |
| Name | Description |
|---|---|
| Score | Current score displayed. |