コード例 #1
0
    void RemoveRooms()
    {
        var entityManager = masterSystem.TryGetManager <EntitySceneManager>(SceneManagerType.Entity);

        entityManager.Reset();

        for (int i = roomsParent.childCount - 1; i >= 0; i--)
        {
            Destroy(roomsParent.GetChild(i).gameObject);
        }

        ResetState();
    }
コード例 #2
0
    public override void Init(MasterSystem masterSystem, SceneManagerData data)
    {
        base.Init(masterSystem, data);

        projectileManager = masterSystem.TryGetManager <ProjectileManager>(SceneManagerType.Projectile);
        if (projectileManager == null)
        {
            Debug.LogError("[ItemSceneSystem]: tried to get projectileManager but it wasn't initialized");
            return;
        }

        CollectSceneItems();
        foreach (var item in items)
        {
            item.Initialize(data.player, data.playerController, projectileManager);
        }

        ChangeInitializationState(ManagerInitializationState.COMPLETED);
    }