Exemplo n.º 1
0
 private void Awake()
 {
     sequencerDict = new Dictionary <int, State>();
     sequencerList = new List <State>();
     SceneRefs.SetActionSequencer(this);
     ActionSequencer[] array = UnityEngine.Object.FindObjectsOfType <ActionSequencer>();
     if (array.Length > 1)
     {
         Log.LogError(this, "There are " + array.Length + " instances of ActionSequencer. Only 1 instance should exist at any given time.");
     }
 }
Exemplo n.º 2
0
 private void Awake()
 {
     localPlayerCreated = false;
     SceneRefs.SetZoneLocalPlayerManager(this);
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
     eventDispatcher      = Service.Get <EventDispatcher>();
     if (LocalPlayerGameObject == null)
     {
         throw new MissingReferenceException("LocalPlayerGameObject is null");
     }
     setupLocalPlayer();
     eventDispatcher.AddListener <PlayerSpawnedEvents.LocalPlayerReadyToSpawn>(onLocalPlayerReadyToSpawn);
 }
 public void Awake()
 {
     dataEntityCollection   = Service.Get <CPDataEntityCollection>();
     eventDispatcher        = Service.Get <EventDispatcher>();
     playerRemovedListeners = new HashSet <RemotePlayerData>();
     SceneRefs.SetZoneRemotePlayerManager(this);
     opaqueCPUShader      = Shader.Find("CpRemix/Combined Avatar");
     transparentCPUShader = Shader.Find("CpRemix/Combined Avatar Alpha");
     opaqueGPUShader      = Shader.Find("CpRemix/GPU Combined Avatar");
     transparentGPUShader = Shader.Find("CpRemix/GPU Combined Avatar Alpha");
     if (RemotePlayerContainer == null)
     {
         throw new MissingReferenceException("RemotePlayerContainer is null");
     }
 }
 private IEnumerator cleanupPreviousScene()
 {
     unpinCurrentAudioPrefab();
     SceneRefs.ClearAll();
     ClubPenguin.Core.SceneRefs.ClearAll();
     if (sceneAssetKeys != null)
     {
         for (int i = 0; i < sceneAssetKeys.Count; i++)
         {
             Content.TryUnpinBundle(sceneAssetKeys[i]);
         }
     }
     Content.BundleManager.UnmountUnusedBundles();
     yield return(null);
 }
Exemplo n.º 5
0
 private void Awake()
 {
     SceneRefs.SetCelebrationRunner(this);
     dataEntityCollection = Service.Get <CPDataEntityCollection>();
 }