This script will check inside a coroutine at a specified interval of time based on the performance of the game if LevelData.Instance.grass is empty or has a length of 0. If this is true it will advance the tutorial to the next phase by the use of an event.
Public Variables:
->event GameData.VOID_FUNCTION meadowEmpty; //the event that will be triggered when the meadow is detected to be empty
-> public float minRefreshTime;
Public functions:
->void StartCheck() -> this function will start the coroutine that checks if the meadow has any grass
->void StopCheck() -> this function will stop the coroutine
Notes:
-> the Coroutine should trigger the event if the meadow is empty and stop executing.
-> there should be a check if the event has any listeners (if the event is different from null) before triggering it
-> the coroutine should refresh until it triggers the event or until it is stopped at a rate based on the performance of the game but not at a higher frequency then the one defined in the parameters (minRefreshTime)
This script will check inside a coroutine at a specified interval of time based on the performance of the game if LevelData.Instance.grass is empty or has a length of 0. If this is true it will advance the tutorial to the next phase by the use of an event. Public Variables:
->event GameData.VOID_FUNCTION meadowEmpty; //the event that will be triggered when the meadow is detected to be empty -> public float minRefreshTime;
Public functions: ->void StartCheck() -> this function will start the coroutine that checks if the meadow has any grass ->void StopCheck() -> this function will stop the coroutine
Notes: -> the Coroutine should trigger the event if the meadow is empty and stop executing. -> there should be a check if the event has any listeners (if the event is different from null) before triggering it -> the coroutine should refresh until it triggers the event or until it is stopped at a rate based on the performance of the game but not at a higher frequency then the one defined in the parameters (minRefreshTime)