Serious Game - Electrónica VR 1.0.0
Loading...
Searching...
No Matches
ObjectiveSystem Class Reference

Gestiona los objetivos específicos de cada reto y el puntaje final. Se suscribe a eventos de GameManager para actualizar el estado automáticamente. More...

Inheritance diagram for ObjectiveSystem:
Inheritance graph
Collaboration diagram for ObjectiveSystem:
Collaboration graph

Public Member Functions

void CompleteObjective (int index, float timeBonus=1f)
 Marca el objetivo en el índice como completado y suma puntos.
List< ObjectiveGetObjectives ()
int GetTotalScore ()
int GetMaxScore ()
float GetScorePercent ()

Public Attributes

GameManager gameManager
PerformanceTracker performance

Events

static Action< ObjectiveOnObjectiveCompleted
static Action< int, int > OnScoreUpdated
static Action< SessionResultOnSessionEnded

Private Member Functions

void Start ()
void OnDestroy ()
void BuildObjectivesForLevel (LevelType level)
void AddObjective (string description, int points)
void HandleLevelCompleted (LevelType level, bool success)
void HandleGameCompleted ()

Private Attributes

List< Objective_objectives = new List<Objective>()
int _totalScore = 0
int _maxScore = 0

Detailed Description

Gestiona los objetivos específicos de cada reto y el puntaje final. Se suscribe a eventos de GameManager para actualizar el estado automáticamente.

Member Function Documentation

◆ AddObjective()

void ObjectiveSystem.AddObjective ( string description,
int points )
private

◆ BuildObjectivesForLevel()

void ObjectiveSystem.BuildObjectivesForLevel ( LevelType level)
private

◆ CompleteObjective()

void ObjectiveSystem.CompleteObjective ( int index,
float timeBonus = 1f )

Marca el objetivo en el índice como completado y suma puntos.

◆ GetMaxScore()

int ObjectiveSystem.GetMaxScore ( )

◆ GetObjectives()

List< Objective > ObjectiveSystem.GetObjectives ( )

◆ GetScorePercent()

float ObjectiveSystem.GetScorePercent ( )

◆ GetTotalScore()

int ObjectiveSystem.GetTotalScore ( )

◆ HandleGameCompleted()

void ObjectiveSystem.HandleGameCompleted ( )
private

◆ HandleLevelCompleted()

void ObjectiveSystem.HandleLevelCompleted ( LevelType level,
bool success )
private

◆ OnDestroy()

void ObjectiveSystem.OnDestroy ( )
private

◆ Start()

void ObjectiveSystem.Start ( )
private

Member Data Documentation

◆ _maxScore

int ObjectiveSystem._maxScore = 0
private

◆ _objectives

List<Objective> ObjectiveSystem._objectives = new List<Objective>()
private

◆ _totalScore

int ObjectiveSystem._totalScore = 0
private

◆ gameManager

GameManager ObjectiveSystem.gameManager

◆ performance

PerformanceTracker ObjectiveSystem.performance

Event Documentation

◆ OnObjectiveCompleted

Action<Objective> ObjectiveSystem.OnObjectiveCompleted
static

◆ OnScoreUpdated

Action<int, int> ObjectiveSystem.OnScoreUpdated
static

◆ OnSessionEnded

Action<SessionResult> ObjectiveSystem.OnSessionEnded
static

The documentation for this class was generated from the following file: