28 lines
883 B
C#
28 lines
883 B
C#
using System.Collections.Generic;
|
|
|
|
public static class GameState
|
|
{
|
|
public static WeaponModel WeaponModel { get; private set; }
|
|
public static ScoreModel ScoreModel { get; private set; }
|
|
public static PlayerStateModel PlayerStateModel { get; private set; }
|
|
public static DangersModel DangersModel { get; private set; }
|
|
|
|
|
|
public static void Initialize(Player player, Health playerHealth, List<EnemyShip> enemyPrefabsToSpawn)
|
|
{
|
|
WeaponModel = new WeaponModel(player.ActiveWeapon, player.weaponsContainer);
|
|
ScoreModel = new ScoreModel(enemyPrefabsToSpawn);
|
|
PlayerStateModel = new PlayerStateModel(player, playerHealth);
|
|
DangersModel = new DangersModel();
|
|
}
|
|
|
|
public static void Clear()
|
|
{
|
|
WeaponModel = null;
|
|
ScoreModel = null;
|
|
PlayerStateModel = null;
|
|
DangersModel = null;
|
|
}
|
|
|
|
}
|