Example #1
0
 private void Start()
 {
     profileListener     = dataEntityCollection.When <ProfileData>(dataEntityCollection.LocalPlayerHandle, onProfileData);
     membershipListener  = dataEntityCollection.When <MembershipData>(dataEntityCollection.LocalPlayerHandle, onMembershipData);
     sceneStateListener  = dataEntityCollection.When <SceneStateData>(Service.Get <SceneLayoutDataManager>().GetActiveHandle(), onSceneStateData);
     savedIgloosListener = dataEntityCollection.When <SavedIgloosMetaData>(dataEntityCollection.LocalPlayerHandle, onSavedIgloosMetaData);
     Service.Get <MembershipService>().OnPurchaseSuccess += onMembershipPurchased;
     eventDispatcher.DispatchEvent(new UIDisablerEvents.DisableUIElement("Joystick"));
 }
Example #2
0
 private void loadProfileData(DataEntityHandle handle)
 {
     isInOwnIgloo  = IglooButtonUtils.SetButtonState(handle, LocalIglooButton);
     isLocalPlayer = handle == dataEntityCollection.LocalPlayerHandle;
     if (isLocalPlayer)
     {
         savedIglooListener = dataEntityCollection.When <SavedIgloosMetaData>(handle, onSavedIgloosAdded);
     }
     profileDataListener = dataEntityCollection.When <ProfileData>(handle, onProfileDataAdded);
 }
    private void Start()
    {
        isSetup = false;
        skipUnloadUnusedResources = false;
        CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

        sceneStateDataListener = cPDataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneDataAdded);
    }
    private IEnumerator Start()
    {
        yield return(null);

        CPDataEntityCollection dataEntityCollection = Service.Get <CPDataEntityCollection>();

        sceneStateDataListener = dataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneDataAdded);
    }
 protected virtual void Awake()
 {
     eventDispatcher         = Service.Get <EventDispatcher>();
     dataEntityCollection    = Service.Get <CPDataEntityCollection>();
     sceneDataHandle         = dataEntityCollection.FindEntityByName("ActiveSceneData");
     sceneStateDataListener  = dataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneDataAdded);
     sceneLayoutDataListener = dataEntityCollection.Whenever <SceneLayoutData>("ActiveSceneData", onSceneLayoutDataAdded, onSceneLayoutDataRemoved);
 }
 protected virtual void Awake()
 {
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     layoutManager        = Service.Get <SceneLayoutDataManager>();
     eventDispatcher      = Service.Get <EventDispatcher>();
     contextListener      = GetComponent <StateMachineContextListener>();
     stateDataListener    = dataEntityCollection.When <SceneStateData>(layoutManager.GetActiveHandle(), onSceneStateData);
     eventChannel         = new EventChannel(eventDispatcher);
 }
Example #7
0
    private void Start()
    {
        musicDefinitions = Service.Get <IGameData>().Get <Dictionary <int, MusicTrackDefinition> >();
        musicGenres      = Service.Get <IGameData>().Get <Dictionary <int, MusicGenreDefinition> >();
        setupListeners();
        CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

        sceneLayoutListener = cPDataEntityCollection.When <SceneLayoutData>("ActiveSceneData", onLayoutAdded);
    }
Example #8
0
    public void Start()
    {
        Assert.IsNotNull(depthMapCreator);
        CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

        dataEventListener = cPDataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneStateDataAdded);
        eventChannel      = new EventChannel(Service.Get <EventDispatcher>());
        eventChannel.AddListener <SceneTransitionEvents.LayoutGameObjectsLoaded>(onLayoutGameObjectsLoaded);
        eventChannel.AddListener <IglooLightingEvents.RenderIglooDynamicLightmap>(onRenderIglooDynamicLightmap);
    }
 private void Awake()
 {
     Assert.IsNotNull(EditCameraTarget, "EditCameraTarget required.");
     eventDispatcher = Service.Get <EventDispatcher>();
     eventDispatcher.AddListener <InputEvents.ZoomEvent>(onInputZoom);
     boundsForCameraTarget         = BoundsForCameraTarget.bounds;
     BoundsForCameraTarget.enabled = false;
     dataEntityCollection          = Service.Get <CPDataEntityCollection>();
     iglooCameraLotStateListener   = dataEntityCollection.Whenever <IglooCameraOverrideStateData>("ActiveSceneData", onOverrideStateDataAdded, onOverrideStateDataRemoved);
     sceneStateDataListener        = dataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneDataAdded);
     wasCameraTargetReset          = false;
 }
Example #10
0
 private bool onLocalPlayerDataReady(NetworkControllerEvents.LocalPlayerDataReadyEvent evt)
 {
     if (offlineDatabase.Read <CustomEquipmentCollection>().Equipment.Count == 0)
     {
         INetworkServicesManager network = Service.Get <INetworkServicesManager>();
         network.InventoryService.GetEquipmentInventory();
         network.IglooService.GetDecorations();
         dataEntityCollection.When(dataEntityCollection.LocalPlayerHandle, delegate(SavedIgloosMetaData savedIgloosMetaData)
         {
             CoroutineRunner.StartPersistent(loadIglooEntity(network, savedIgloosMetaData), this, "loadIglooEntity");
         });
     }
     return(false);
 }
Example #11
0
    protected void Start()
    {
        CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

        dataEventListener = cPDataEntityCollection.When <MembershipData>(cPDataEntityCollection.LocalPlayerHandle, onMembershipDataAdded);
    }
Example #12
0
 public virtual void SetPlayer(DataEntityHandle handle)
 {
     this.handle          = handle;
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     profileDataListener  = dataEntityCollection.When <ProfileData>(handle, onProfileDataAdded);
 }
 private void loadPlayerSpinData()
 {
     dataEntityCollection.When <DailySpinEntityData>(dataEntityCollection.LocalPlayerHandle, onSpinDataAdded);
 }
Example #14
0
 protected virtual void Awake()
 {
     eventDispatcher   = Service.Get <EventDispatcher>();
     eventChannel      = new EventChannel(eventDispatcher);
     stateDataListener = dataEntityCollection.When <SceneStateData>(Service.Get <SceneLayoutDataManager>().GetActiveHandle(), onSceneStateData);
 }
 private void Awake()
 {
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     savedIglooListener   = dataEntityCollection.When <SavedIgloosMetaData>(dataEntityCollection.LocalPlayerHandle, onSavedIgloosAdded);
 }
 public void Awake()
 {
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     sceneStateListener   = dataEntityCollection.When <SceneStateData>("ActiveSceneData", onSceneStateData);
 }