Exemple #1
0
 public override void OnActivate(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     if (MyCriManager.IsInitialized())
     {
         if (!this.ForceReInit && MyCriManager.UsingEmb == this.UseEmb)
         {
             DebugUtility.LogWarning("[MyCriManager] NoNeed to Setup:" + (object)this.UseEmb);
             this.ActivateOutputLinks(1);
         }
         else
         {
             ((Behaviour)this).set_enabled(true);
             this.StartCoroutine(this.Restart());
         }
     }
     else
     {
         this.Init();
         this.ActivateOutputLinks(1);
     }
 }
 protected virtual void Awake()
 {
     ((UIBehaviour)this).Awake();
     GameUtility.SetNeverSleep();
     if (!Application.get_isPlaying())
     {
         return;
     }
     MyCriManager.Setup(false);
     this.mMovieController = (CriManaMovieControllerForUI)((Component)this).GetComponent <CriManaMovieControllerForUI>();
     if (!Object.op_Inequality((Object)this.mMovieController, (Object)null))
     {
         return;
     }
     ((CriManaMovieMaterial)this.mMovieController).set_moviePath(MyCriManager.GetLoadFileName(((CriManaMovieMaterial)this.mMovieController).get_moviePath(), false));
 }
 protected virtual void Awake()
 {
     ((UIBehaviour)this).Awake();
     GameUtility.SetNeverSleep();
     if (!Application.get_isPlaying())
     {
         return;
     }
     MyCriManager.Setup(false);
     this.mMoviePlayer = (CriManaPlayer)((Component)this).GetComponent <CriManaPlayer>();
     if (!Object.op_Inequality((Object)this.mMoviePlayer, (Object)null))
     {
         return;
     }
     if (!GameUtility.Config_UseAssetBundles.Value)
     {
         this.mMoviePlayer.set_moviePath(AssetManager.GetLocalizedObjectName("StreamingAssets/" + MyCriManager.GetLoadFileName(this.mMoviePlayer.get_moviePath()), false).Replace("StreamingAssets/", string.Empty));
     }
     else
     {
         this.mMoviePlayer.set_moviePath(MyCriManager.GetLoadFileName(AssetManager.GetLocalizedObjectName("StreamingAssets/" + this.mMoviePlayer.get_moviePath(), false).Replace("StreamingAssets/", string.Empty)));
     }
 }
Exemple #4
0
    public static void ReSetup(bool useEmb)
    {
        if (!MyCriManager.sInit)
        {
            MyCriManager.Setup(useEmb);
        }
        else
        {
            MyCriManager.AcfFileName = !useEmb ? (!GameUtility.Config_UseAssetBundles.Value ? Path.Combine(CriWare.get_streamingAssetsPath(), MyCriManager.AcfFileNameAB) : MyCriManager.GetLoadFileName(MyCriManager.AcfFileNameAB)) : Path.Combine(CriWare.get_streamingAssetsPath(), MyCriManager.AcfFileNameEmb);
            CriWareInitializer criWareInitializer = !Object.op_Equality((Object)MyCriManager.sCriWareInitializer, (Object)null) ? (CriWareInitializer)MyCriManager.sCriWareInitializer.GetComponent <CriWareInitializer>() : (CriWareInitializer)null;
            if (Object.op_Inequality((Object)criWareInitializer, (Object)null) && criWareInitializer.decrypterConfig != null)
            {
                ulong  num   = ((string)((CriWareDecrypterConfig)criWareInitializer.decrypterConfig).key).Length != 0 ? Convert.ToUInt64((string)((CriWareDecrypterConfig)criWareInitializer.decrypterConfig).key) : 0UL;
                string path2 = !useEmb?MyCriManager.GetLoadFileName(MyCriManager.DatFileNameAB) : MyCriManager.DatFileNameEmb;

                if (CriWare.IsStreamingAssetsPath(path2))
                {
                    path2 = Path.Combine(CriWare.get_streamingAssetsPath(), path2);
                }
                CriWare.criWareUnity_SetDecryptionKey(num, path2, (bool)((CriWareDecrypterConfig)criWareInitializer.decrypterConfig).enableAtomDecryption, (bool)((CriWareDecrypterConfig)criWareInitializer.decrypterConfig).enableManaDecryption);
            }
            MyCriManager.UsingEmb = useEmb;
        }
    }
Exemple #5
0
 private void Init()
 {
     MyCriManager.Setup(this.UseEmb);
     DebugUtility.LogWarning("[MyCriManager] Setup:" + (object)this.UseEmb);
 }