using System.Collections; using System.Collections.Generic; using System.Reflection; using log4net; using Unity.VisualScripting; using UnityEngine; namespace Managers { /// /// Manages events which influence the overall statistics which accumulate, /// when the game is played and progress is achieved. /// public class StatisticsManager : MonoBehaviour { private static ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private int FreeFlightScore = 0; /// /// Globally accessible member to use manager with. /// public static StatisticsManager G { get; private set; } void Awake() { G = this; Log.Info("Awake"); } public void AddFreeFlightScore(int score) { FreeFlightScore += score; UIManager.G.HUD.UpdateScore(FreeFlightScore); } public void ResetScore() { FreeFlightScore = 0; UIManager.G.HUD.UpdateScore(FreeFlightScore); } } }