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));
    }
Esempio n. 2
0
    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;
 }
Esempio n. 4
0
 private void Start()
 {
     Instance = this;
     t        = Time.time;
     obj_player.gameObject.SetActive(true);
 }
 public void Init(MonoGameManager manager)
 {
 }
Esempio n. 6
0
 public void Init(MonoGameManager manager)
 {
     Instance = this;
     _AddStage(StageName.Exterior, exteriorStage);
     _AddStage(StageName.VirtualGame, virtualGameStage);
 }