IEnumerator Start() { yield return(null); Instance = this; foreach (var singleton in GetComponentsInChildren <ISingleton>()) { singleton.Init(this); AddSingleton(singleton); } EventBus.Post(new GameInitEvent(this)); EventBus.Post(new PostGameInitEvent(this)); }
public void Init(MonoGameManager manager) { _gameManager = manager; Instance = this; _finalSound = gameObject.AddComponent <StudioEventEmitter>(); _finalSound.Event = "event:/vr_boot"; itemRegistry = new ItemRegistry(); foreach (var item in allItemConfig.items) { itemRegistry.Add(item); } AllItems.Init(itemRegistry); }
public PostGameInitEvent(MonoGameManager gameManager) { this.gameManager = gameManager; }
private void Start() { Instance = this; t = Time.time; obj_player.gameObject.SetActive(true); }
public void Init(MonoGameManager manager) { }
public void Init(MonoGameManager manager) { Instance = this; _AddStage(StageName.Exterior, exteriorStage); _AddStage(StageName.VirtualGame, virtualGameStage); }