コード例 #1
0
 // Token: 0x06000683 RID: 1667 RVA: 0x0006BCEC File Offset: 0x00069EEC
 private void SpawnEels()
 {
     if (BTDebugCamInputManager.GetConfigHolder().hackConfig != null && BTDebugCamInputManager.GetConfigHolder().hackConfig.eelRoast_spawnAllEels)
     {
         foreach (EelRoastMarkerInfo markerInfo in this._EelRoastInfos)
         {
             string randomEelPath = this.GetRandomEelPath(markerInfo);
             if (!string.IsNullOrEmpty(randomEelPath))
             {
                 string[] array = randomEelPath.Split(new char[]
                 {
                     '/'
                 });
                 RsResourceManager.LoadAssetFromBundle(array[0] + "/" + array[1], array[2], new RsResourceEventHandler(this.ResourceEventHandler), typeof(GameObject), false, markerInfo);
             }
             else
             {
                 UtDebug.Log("Eel Asset path is empty ");
             }
         }
     }
     else
     {
         if (this._EelRoastInfos == null || this._EelRoastInfos.Length < 1 || this._NoOfEelsToSpawn.Min < 1f || this._NoOfEelsToSpawn.Min > this._NoOfEelsToSpawn.Max)
         {
             return;
         }
         List <EelRoastMarkerInfo> list = new List <EelRoastMarkerInfo>(this._EelRoastInfos);
         int num = Mathf.Clamp(this._NoOfEelsToSpawn.GetRandomInt(), 1, this._EelRoastInfos.Length);
         for (int i = 0; i < num; i++)
         {
             int    index         = UnityEngine.Random.Range(0, list.Count);
             string randomEelPath = this.GetRandomEelPath(list[index]);
             if (!string.IsNullOrEmpty(randomEelPath))
             {
                 string[] array = randomEelPath.Split(new char[]
                 {
                     '/'
                 });
                 RsResourceManager.LoadAssetFromBundle(array[0] + "/" + array[1], array[2], new RsResourceEventHandler(this.ResourceEventHandler), typeof(GameObject), false, list[index]);
             }
             else
             {
                 UtDebug.Log("Eel Asset path is empty ");
             }
             list.RemoveAt(index);
         }
     }
 }
コード例 #2
0
    // Token: 0x06000686 RID: 1670 RVA: 0x0006BEF0 File Offset: 0x0006A0F0
    private void SetUpEel(GameObject eelObject, string inURL, Transform spawnNode)
    {
        if (eelObject == null || spawnNode == null)
        {
            UtDebug.Log("Eel object or SpawnNode is null");
            return;
        }
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(eelObject, spawnNode.position, spawnNode.rotation);

        string[] array = inURL.Split(new char[]
        {
            '/'
        });
        gameObject.name = array[2];
    }