private static void DoInstantiate(ref InstantiateData data)
 {
     //IL_005d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0062: Expected O, but got Unknown
     //IL_0064: Unknown result type (might be due to invalid IL or missing references)
     if (data.master != null && data.callback != null)
     {
         if (data.isInactivateInstantiatedObject)
         {
             GameObject val = data.originalObject as GameObject;
             data.instantiatedObject = ResourceUtility.Instantiate <Object>(data.originalObject);
             if (val != null)
             {
                 GameObject val2 = data.instantiatedObject;
                 val2.get_transform().set_parent(MonoBehaviourSingleton <InstantiateManager> .I.inactiveRoot);
             }
         }
         else
         {
             data.instantiatedObject = ResourceUtility.Instantiate <Object>(data.originalObject);
         }
         data.callback(data);
     }
     data.Clear();
     rymTPool <InstantiateData> .Release(ref data);
 }
Example #2
0
    private IEnumerator _StartTubulanceFilter(float power, Vector2 center, Action callback)
    {
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0023: Unknown result type (might be due to invalid IL or missing references)
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        if (tubulanceCamera == null)
        {
            GameObject prefab = Resources.Load <GameObject>("Filter/TurbulanceFilterCamera");
            tubulanceCamera = ResourceUtility.Instantiate <GameObject>(prefab);
        }
        BlurAndTurbulanceFilter filter = tubulanceCamera.GetComponent <BlurAndTurbulanceFilter>();
        float time = 0f;

        while (time < 2f)
        {
            time += Time.get_deltaTime();
            float blurT = Mathf.Clamp01(time / 0.6f);
            filter.SetBlurPram(Mathf.Lerp(0f, power, blurT), center);
            float turbulanceT = Mathf.Clamp01((time - 0.2f) / 1f);
            filter.SetTurbulanceParam(Mathf.Lerp(0f, 0.15f, turbulanceT), Mathf.Lerp(1f, 1.4f, turbulanceT), Mathf.Lerp(0f, 1f, turbulanceT));
            yield return((object)null);
        }
        callback?.Invoke();
    }
    private Transform CreateBall(Transform parent, int rarityType, Vector3 pos, bool is_main)
    {
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0014: Expected O, but got Unknown
        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        GameObject val  = ResourceUtility.Instantiate <GameObject>(balls[rarityType]);
        Transform  val2 = val.get_transform();

        val2.set_parent(parent);
        val2.set_localPosition(pos);
        val2.set_localScale(Vector3.get_one());
        if (is_main)
        {
            Object.Destroy(val.GetComponent <Rigidbody>());
            Object.Destroy(val.GetComponent <Collider>());
        }
        else
        {
            MagiBall magiBall = val.AddComponent <MagiBall>();
            if (magiBall != null)
            {
                magiBall.FlashType = (FLASH_TYPE)rarityType;
            }
            ballObjects.Add(val);
        }
        val.SetActive(true);
        return(val2);
    }
 public void Announce(DropAnnounceInfo info)
 {
     //IL_0001: Unknown result type (might be due to invalid IL or missing references)
     //IL_0055: Unknown result type (might be due to invalid IL or missing references)
     //IL_009a: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
     //IL_0106: Unknown result type (might be due to invalid IL or missing references)
     //IL_012a: Unknown result type (might be due to invalid IL or missing references)
     //IL_012f: Unknown result type (might be due to invalid IL or missing references)
     //IL_014d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0152: Unknown result type (might be due to invalid IL or missing references)
     if (this.get_gameObject().get_activeInHierarchy())
     {
         if (announceDispItems.Count == announceMax)
         {
             announceQueue.Add(info);
         }
         else
         {
             UIDropAnnounceItem uIDropAnnounceItem = null;
             int i = 0;
             for (int count = announceItems.Count; i < count; i++)
             {
                 if (!announceItems[i].get_gameObject().get_activeSelf())
                 {
                     uIDropAnnounceItem = announceItems[i];
                     break;
                 }
             }
             if (uIDropAnnounceItem == null)
             {
                 GameObject val = ResourceUtility.Instantiate <GameObject>(announceItem);
                 val.get_transform().set_parent(this.get_gameObject().get_transform());
                 val.get_transform().set_localScale(Vector3.get_one());
                 uIDropAnnounceItem = val.GetComponent <UIDropAnnounceItem>();
                 announceItems.Add(uIDropAnnounceItem);
             }
             if (panelChange != null)
             {
                 panelChange.UnLock();
             }
             uIDropAnnounceItem.StartAnnounce(info.text, announceColor[(int)info.color], announceDispItems.Count > 0, OnEnd);
             Vector3 zero = Vector3.get_zero();
             zero.y = (0f - announceItemSize) * (float)announceDispItems.Count;
             uIDropAnnounceItem.get_transform().set_localPosition(zero);
             announceDispItems.Add(uIDropAnnounceItem);
         }
     }
 }
    private IEnumerator Start()
    {
        while (!AppMain.isInitialized)
        {
            yield return((object)null);
        }
        LoadingQueue load_queue = new LoadingQueue(this);
        LoadObject   lo         = load_queue.Load(RESOURCE_CATEGORY.UI, "QuestRequestItem", false);

        yield return((object)load_queue.Wait());

        ResourceUtility.Instantiate <Object>(lo.loadedObject);
    }
    public AtlasEntry ReplaceAtlas(UISprite sprite, string shader)
    {
        //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
        //IL_0100: Expected O, but got Unknown
        if (null == sprite || null == sprite.atlas)
        {
            return(null);
        }
        AtlasEntry atlasEntry = atlases.Find(delegate(AtlasEntry o)
        {
            if (sprite.atlas.Equals((object)o.orgAtlas))
            {
                return(true);
            }
            return(false);
        });

        if (atlasEntry != null && (null == atlasEntry.copyAtlas || null == atlasEntry.orgAtlas))
        {
            atlases.Remove(atlasEntry);
            atlasEntry = null;
        }
        UIAtlas uIAtlas;

        if (atlasEntry == null)
        {
            uIAtlas = ((!(sprite.atlas.replacement != null)) ? ResourceUtility.Instantiate <UIAtlas>(sprite.atlas) : ResourceUtility.Instantiate <UIAtlas>(sprite.atlas.replacement));
            if (!(uIAtlas == null) && !(uIAtlas.spriteMaterial == null))
            {
                goto IL_00f4;
            }
            goto IL_00f4;
        }
        goto IL_0154;
IL_0154:
        atlasEntry.orgSpriteList.Add(sprite);
        sprite.atlas = atlasEntry.copyAtlas;
        return(atlasEntry);

IL_00f4:
        uIAtlas.spriteMaterial = new Material(uIAtlas.spriteMaterial);
        uIAtlas.spriteMaterial.set_shader(ResourceUtility.FindShader(shader));
        atlasEntry = new AtlasEntry(sprite.atlas, uIAtlas);
        atlases.Add(atlasEntry);
        uIAtlas.set_name("_" + sprite.atlas.get_name());
        goto IL_0154;
    }
Example #7
0
    private IEnumerator DoOpenNewDungeon()
    {
        yield return((object)null);

        RegionMapPortal portal;
        bool            reverse = IsPortalReverseAndGetPortalData((int)portalData.portalID, out portal);

        if (portal == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            regionMapRoot.animator.Play(portal.get_gameObject().get_name());
            SetCameraToMiddlePoint(portal);
            SetPlayerMakerToStartPosition(portal, reverse);
            SoundManager.PlayOneShotUISE(40000032);
            GameObject effect = ResourceUtility.Instantiate <Object>(topEffectPrefab) as GameObject;
            rymFX      rym    = effect.GetComponent <rymFX>();
            rym.Cameras = (Camera[])new Camera[1]
            {
                _camera
            };
            rym.ViewShift = 0f;
            portal.Open(effect.get_transform(), regionMapRoot.animator, false, 1f, delegate
            {
                //IL_0037: Unknown result type (might be due to invalid IL or missing references)
                //IL_004b: Unknown result type (might be due to invalid IL or missing references)
                //IL_005b: Unknown result type (might be due to invalid IL or missing references)
                //IL_008f: Unknown result type (might be due to invalid IL or missing references)
                if (!((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.calledExit)
                {
                    GameObject val = ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.CreateLocationSpot(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Cportal_003E__0.toLocation, SpotManager.ICON_TYPE.CHILD_REGION, true);
                    if (val != null)
                    {
                        val.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                        TweenScale.Begin(val, 0.3f, Vector3.get_one());
                    }
                    ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.StartCoroutine(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.DoExitEvent(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Cportal_003E__0, ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Crym_003E__3, 0f, ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Creverse_003E__1, true));
                }
            });
        }
    }
Example #8
0
 public void Replace(string shaderName)
 {
     //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
     //IL_00c6: Expected O, but got Unknown
     //IL_010e: Unknown result type (might be due to invalid IL or missing references)
     if (!Object.op_Implicit(sprite))
     {
         Awake();
         if (!Object.op_Implicit(sprite))
         {
             return;
         }
     }
     if (entry != null)
     {
         entry.refCount--;
         entry = null;
     }
     if (atlases.TryGetValue(sprite.atlas, out entry) && !Object.op_Implicit(entry.atlas))
     {
         atlases.Remove(sprite.atlas);
         entry = null;
     }
     if (entry == null)
     {
         UIAtlas uIAtlas = ResourceUtility.Instantiate <UIAtlas>(sprite.atlas);
         uIAtlas.spriteMaterial = new Material(uIAtlas.spriteMaterial);
         uIAtlas.spriteMaterial.set_shader(ResourceUtility.FindShader(shaderName));
         entry = new AtlasEntry(uIAtlas);
         atlases.Add(sprite.atlas, entry);
         if (MonoBehaviourSingleton <AppMain> .IsValid())
         {
             uIAtlas.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I._transform);
         }
     }
     entry.refCount++;
     sprite.atlas = entry.atlas;
 }
    public static Transform Realizes(Object obj, int layer = -1)
    {
        //IL_0043: Unknown result type (might be due to invalid IL or missing references)
        //IL_0048: Expected O, but got Unknown
        GameObject val = obj as GameObject;

        if (val == null)
        {
            return(null);
        }
        GameObject val2 = ResourceUtility.Instantiate <GameObject>(val);
        string     name = val2.get_name();

        name = ResourceName.Normalize(name);
        name = name.Replace("(Clone)", string.Empty);
        val2.set_name(name);
        Transform val3 = val2.get_transform();

        if (layer != -1)
        {
            Utility.SetLayerWithChildren(val3, layer);
        }
        return(val3);
    }
Example #10
0
    public void OpenNewLocation()
    {
        //IL_004e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0122: Unknown result type (might be due to invalid IL or missing references)
        //IL_0145: Expected O, but got Unknown
        RegionMapPortal portal;
        bool            reverse = IsPortalReverseAndGetPortalData((int)portalData.portalID, out portal);

        if (portal == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            string text = portal.get_gameObject().get_name();
            if (reverse)
            {
                text += "_R";
            }
            regionMapRoot.animator.Play(text);
            SetCameraToMiddlePoint(portal);
            SetPlayerMakerToStartPosition(portal, reverse);
            GameObject effect = ResourceUtility.Instantiate <Object>(topEffectPrefab) as GameObject;
            rymFX      rym    = effect.GetComponent <rymFX>();
            rym.Cameras = (Camera[])new Camera[1]
            {
                _camera
            };
            rym.ViewShift = 0f;
            float endTime = 1f;
            if (eventData.IsEncounterBossEvent())
            {
                endTime = 0.4f;
            }
            SoundManager.PlayOneShotUISE(40000032);
            portal.Open(effect.get_transform(), regionMapRoot.animator, reverse, endTime, delegate
            {
                //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
                //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
                //IL_0109: Unknown result type (might be due to invalid IL or missing references)
                //IL_0119: Unknown result type (might be due to invalid IL or missing references)
                //IL_0157: Unknown result type (might be due to invalid IL or missing references)
                if (!calledExit)
                {
                    RegionMapLocation location = portal.toLocation;
                    if (eventData.IsEncounterBossEvent())
                    {
                        if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                        {
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Play(eventData.enemyType, 0, false);
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.FadeOut(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.encounterBossCutInTime + 2f, 0.3f, delegate
                            {
                                if (fieldQuestWarningRoot != null)
                                {
                                    Object.Destroy(fieldQuestWarningRoot);
                                }
                            });
                        }
                        if (effect != null)
                        {
                            EffectManager.ReleaseEffect(effect, true, false);
                        }
                        this.StartCoroutine(DoExitEncounterBossEvent());
                    }
                    else
                    {
                        if (reverse)
                        {
                            location = portal.fromLocation;
                        }
                        GameObject val = CreateLocationSpot(location, SpotManager.ICON_TYPE.NEW, true);
                        if (val != null)
                        {
                            val.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                            TweenScale.Begin(val, 0.3f, Vector3.get_one());
                            SoundManager.PlayOneShotUISE(40000033);
                        }
                        this.StartCoroutine(DoExitEvent(portal, rym, 0f, reverse, false));
                    }
                }
            });
        }
    }
Example #11
0
    private IEnumerator DoInitialize()
    {
        eventData = (SectionEventData)GameSection.GetEventData();
        if (MonoBehaviourSingleton <InGameManager> .IsValid())
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <InGameManager> .I.beforePortalID);
        }
        if (MonoBehaviourSingleton <OutGameSettingsManager> .IsValid() && portalData == null)
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData((uint)MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.linkFieldPortalID);
        }
        if (eventData.IsQuestToField())
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <FieldManager> .I.currentPortalID);
        }
        if (portalData == null)
        {
            base.Initialize();
        }
        else
        {
            FieldMapTable.FieldMapTableData currentMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.srcMapID);

            newMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.dstMapID);

            regionId = newMapData.regionId;
            if (NeedDirectionOpenRegion())
            {
                toRegionRelease = true;
                base.Initialize();
            }
            else
            {
                if (currentMapData != null && newMapData != null && newMapData.regionId != currentMapData.regionId)
                {
                    regionId = currentMapData.regionId;
                }
                if (newMapData == null || !IsValidRegion(newMapData))
                {
                    newMapData = null;
                    base.Initialize();
                }
                else
                {
                    LoadingQueue loadQueue          = new LoadingQueue(this);
                    LoadObject   loadedEventUIRoot  = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "NewFieldOpenEventUIRoot", false);
                    LoadObject   loadedLocationSpot = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "LocationSpot", false);
                    LoadObject   loadedEventCamera  = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "NewFieldEventCamera", false);
                    LoadObject   loadedFilterCamera = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "ZoomBlurFilterCamera", false);
                    LoadObject   loadedPlayerMarker = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "PlayerMarker", false);
                    LoadObject   loadedRegion       = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "RegionMap_" + regionId.ToString("D3"), false);
                    LoadObject   loadedEffect       = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_map_fire_01", false);
                    LoadObject   loadedWindEffect   = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_bg_questmap_01", false);
                    LoadObject   loadedDungeonEff   = null;
                    if (eventData.IsFindNewDungeon() && newMapData != null)
                    {
                        uint mapID = newMapData.mapID;
                        loadedDungeonEff = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_DUNGEON, "DEF_" + mapID.ToString("D8"), false);
                    }
                    LoadObject loadedEncounterBossCutIn = null;
                    if (eventData.IsEncounterBossEvent())
                    {
                        loadedEncounterBossCutIn = loadQueue.Load(RESOURCE_CATEGORY.UI, "InGameFieldQuestWarning", false);
                    }
                    CacheAudio(loadQueue);
                    if (loadQueue.IsLoading())
                    {
                        yield return((object)loadQueue.Wait());
                    }
                    if (loadedEncounterBossCutIn != null)
                    {
                        fieldQuestWarningRoot = ResourceUtility.Realizes(loadedEncounterBossCutIn.loadedObject, -1).get_gameObject();
                        UIPanel panel = fieldQuestWarningRoot.GetComponentInChildren <UIPanel>();
                        if (panel != null)
                        {
                            panel.depth = 8000;
                        }
                        if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                        {
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Load(loadQueue);
                        }
                    }
                    if (loadQueue.IsLoading())
                    {
                        yield return((object)loadQueue.Wait());
                    }
                    topEffectPrefab = loadedEffect.loadedObject;
                    Transform t = ResourceUtility.Realizes(loadedEventUIRoot.loadedObject, base._transform, -1);
                    regionMapRoot = ResourceUtility.Realizes(loadedRegion.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).get_gameObject().GetComponent <RegionMapRoot>();
                    if (regionMapRoot != null)
                    {
                        bool wait = true;
                        regionMapRoot.InitPortalStatus(delegate
                        {
                            ((_003CDoInitialize_003Ec__Iterator164) /*Error near IL_0526: stateMachine*/)._003Cwait_003E__15 = false;
                        });
                        while (wait)
                        {
                            yield return((object)null);
                        }
                    }
                    blurFilter = (ResourceUtility.Instantiate <Object>(loadedFilterCamera.loadedObject) as GameObject).GetComponent <ZoomBlurFilter>();
                    blurFilter.get_transform().set_parent(base._transform);
                    _camera          = ResourceUtility.Realizes(loadedEventCamera.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).GetComponent <Camera>();
                    uiFrontMapSprite = t.FindChild("FrontMap").get_gameObject().GetComponent <UITexture>();
                    if (uiFrontMapSprite != null)
                    {
                        uiFrontMapSprite.alpha = 0f;
                    }
                    uiMapSprite = t.FindChild("Map").get_gameObject().GetComponent <UITexture>();
                    InitMapSprite(MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait);
                    if (eventData.IsEncounterBossEvent())
                    {
                        t.FindChild("TaptoSkip").get_gameObject().SetActive(false);
                    }
                    bgEventListener = UIEventListener.Get(t.Find("BG").get_gameObject());
                    tutorialTrigger = t.FindChild("TUTORIAL_TRIGGER");
                    if (tutorialTrigger != null)
                    {
                        if (!TutorialStep.HasAllTutorialCompleted())
                        {
                            tutorialTrigger.get_gameObject().SetActive(true);
                            UITweenCtrl.Play(tutorialTrigger, true, null, false, 0);
                        }
                        else
                        {
                            tutorialTrigger.get_gameObject().SetActive(false);
                        }
                    }
                    spots = new SpotManager(null, loadedLocationSpot.loadedObject as GameObject, _camera);
                    spots.spotRootTransform = t;
                    playerMarker            = ResourceUtility.Realizes(loadedPlayerMarker.loadedObject, -1);
                    PlayerMarker playerMarkerCom = playerMarker.GetComponent <PlayerMarker>();
                    if (null != playerMarkerCom)
                    {
                        playerMarkerCom.SetCamera(_camera.get_transform());
                    }
                    windEffect         = ResourceUtility.Realizes(loadedWindEffect.loadedObject, _camera.get_transform(), -1).get_gameObject().GetComponent <rymFX>();
                    windEffect.Cameras = (Camera[])new Camera[1]
                    {
                        _camera
                    };
                    windEffect.get_gameObject().set_layer(LayerMask.NameToLayer("WorldMap"));
                    if (loadedDungeonEff != null)
                    {
                        dungeonOpenEffect = ResourceUtility.Realizes(loadedDungeonEff.loadedObject, base._transform, -1);
                        dungeonOpenEffect.get_gameObject().SetActive(false);
                    }
                    CreateVisitedLocationSpot();
                    if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "InGameScene")
                    {
                        MonoBehaviourSingleton <ScreenOrientationManager> .I.OnScreenRotate += InitMapSprite;
                    }
                    base.Initialize();
                }
            }
        }
    }
Example #12
0
    private int SetGridItem(Transform item_prefab)
    {
        //IL_0072: Unknown result type (might be due to invalid IL or missing references)
        //IL_0077: Expected O, but got Unknown
        //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a5: Expected O, but got Unknown
        //IL_010a: Unknown result type (might be due to invalid IL or missing references)
        //IL_010f: Unknown result type (might be due to invalid IL or missing references)
        //IL_011d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0122: Unknown result type (might be due to invalid IL or missing references)
        //IL_0176: Unknown result type (might be due to invalid IL or missing references)
        //IL_0186: Unknown result type (might be due to invalid IL or missing references)
        //IL_018b: Expected O, but got Unknown
        //IL_01a1: Unknown result type (might be due to invalid IL or missing references)
        //IL_01a6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
        //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
        //IL_01da: Unknown result type (might be due to invalid IL or missing references)
        //IL_01df: Expected O, but got Unknown
        //IL_01e6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_01f7: Unknown result type (might be due to invalid IL or missing references)
        //IL_01fc: Unknown result type (might be due to invalid IL or missing references)
        //IL_0208: Unknown result type (might be due to invalid IL or missing references)
        //IL_020d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0238: Unknown result type (might be due to invalid IL or missing references)
        //IL_025a: Unknown result type (might be due to invalid IL or missing references)
        int num = minPopFrameWidth;

        if (textItem != null && textItem.Length > 0)
        {
            DeleteGridChildren();
            UIWidget[] array = new UIWidget[textItem.Length];
            int        i     = 0;
            for (int num2 = textItem.Length; i < num2; i++)
            {
                GameObject val = null;
                if (item_prefab == null || firstItemIsTextOnly)
                {
                    firstItemIsTextOnly = false;
                    val = new GameObject();
                    val.set_layer(5);
                    val.set_name(i.ToString());
                    num = CreateItem(val, i, num);
                }
                else
                {
                    val = ResourceUtility.Instantiate <GameObject>(item_prefab.get_gameObject());
                    val.set_layer(5);
                    val.set_name(i.ToString());
                    num = CreatePrefabItem(val, i, num);
                }
                UIWidget uIWidget = array[i] = val.GetComponent <UIWidget>();
                val.AddComponent <BoxCollider>();
                val.AddComponent <UIDragScrollView>();
                val.AddComponent <UIGameSceneEventSender>();
                UIButton btn = val.AddComponent <UIButton>();
                btn.hover   = uIWidget.color;
                btn.pressed = uIWidget.color;
                btn.onClick.Add(new EventDelegate(delegate
                {
                    //IL_0043: Unknown result type (might be due to invalid IL or missing references)
                    //IL_0048: Expected O, but got Unknown
                    int result = -1;
                    if (int.TryParse(btn.get_name(), out result))
                    {
                        selectIndex = result;
                        if (result >= 0)
                        {
                            ClickItem(selectIndex, btn.get_transform());
                            CloseCallback();
                        }
                    }
                }));
                btn.set_enabled(buttonEnable[i]);
                UIButtonScale component = val.GetComponent <UIButtonScale>();
                if (component == null)
                {
                    component             = val.get_gameObject().AddComponent <UIButtonScale>();
                    component.tweenTarget = val.get_transform();
                    component.hover       = new Vector3(1f, 1f, 1f);
                    component.pressed     = new Vector3(1.3f, 1.3f, 1.3f);
                    component.duration    = 0.05f;
                }
                grid.AddChild(val.get_transform());
                val.get_transform().set_localPosition(Vector3.get_zero());
                val.get_transform().set_localEulerAngles(Vector3.get_zero());
                val.get_transform().set_localScale(Vector3.get_one());
            }
            int j = 0;
            for (int num3 = textItem.Length; j < num3; j++)
            {
                BoxCollider component2 = array[j].get_transform().GetComponent <BoxCollider>();
                UIWidget    uIWidget2  = array[j];
                component2.set_size(new Vector3((float)num, (float)itemHeight, 1f));
                uIWidget2.width  = num;
                uIWidget2.height = itemHeight;
                uIWidget2.autoResizeBoxCollider = true;
                uIWidget2.ResizeCollider();
            }
            grid.Reposition();
        }
        return(num);
    }
Example #13
0
 public void Attach(MonoBehaviour root_object)
 {
     //IL_000d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0012: Expected O, but got Unknown
     if (!(root_object is Self))
     {
         Transform val = root_object.get_transform();
         int       i   = 0;
         for (int count = icons.Count; i < count; i++)
         {
             if (icons[i].target == val)
             {
                 return;
             }
         }
         string      text        = string.Empty;
         int         num         = -1;
         MiniMapIcon miniMapIcon = null;
         if (root_object is PortalObject)
         {
             num = 0;
         }
         else if (root_object is Player)
         {
             Player player = root_object as Player;
             if (!player.isInitialized)
             {
                 return;
             }
             num = 1;
             if (playerIconStock.Count > 0)
             {
                 miniMapIcon = playerIconStock[0];
                 playerIconStock.Remove(miniMapIcon);
             }
         }
         else if (root_object is Enemy)
         {
             if (!GameSaveData.instance.enableMinimapEnemy && !QuestManager.IsValidInGameWaveMatch())
             {
                 return;
             }
             Enemy enemy = root_object as Enemy;
             if (!enemy.isInitialized)
             {
                 return;
             }
             num = 2;
             if (enemyIconStock.Count > 0)
             {
                 miniMapIcon = enemyIconStock[0];
                 enemyIconStock.Remove(miniMapIcon);
             }
         }
         else if (root_object is FieldWaveTargetObject)
         {
             FieldWaveTargetObject fieldWaveTargetObject = root_object as FieldWaveTargetObject;
             if (!fieldWaveTargetObject.isInitialized)
             {
                 return;
             }
             num = 3;
             if (waveTargetIconStock.Count > 0)
             {
                 miniMapIcon = waveTargetIconStock[0];
                 waveTargetIconStock.Remove(miniMapIcon);
             }
             text = "dp_radar_" + fieldWaveTargetObject.info.iconName;
         }
         if (miniMapIcon == null && num >= 0 && num < iconPrefabs.Length)
         {
             GameObject val2 = ResourceUtility.Instantiate <GameObject>(iconPrefabs[num]);
             if (val2 != null)
             {
                 miniMapIcon = val2.GetComponent <MiniMapIcon>();
             }
         }
         if (miniMapIcon != null)
         {
             miniMapIcon.Initialize(root_object);
             if (!text.IsNullOrWhiteSpace())
             {
                 miniMapIcon.SetIconSprite(text);
             }
             miniMapIcon.target = val;
             Utility.Attach(iconRoot, miniMapIcon._trasform);
             icons.Add(miniMapIcon);
             updateCount = 0;
         }
     }
 }
    public bool Initialize(Vector3 pos, int damage, DAMAGE_COLOR color, int groupOffset)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0002: Unknown result type (might be due to invalid IL or missing references)
        //IL_008d: Unknown result type (might be due to invalid IL or missing references)
        //IL_011c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0121: Expected O, but got Unknown
        //IL_0136: Unknown result type (might be due to invalid IL or missing references)
        //IL_013b: Expected O, but got Unknown
        //IL_0143: Unknown result type (might be due to invalid IL or missing references)
        //IL_0148: Unknown result type (might be due to invalid IL or missing references)
        //IL_014f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0154: Expected O, but got Unknown
        //IL_0154: Expected O, but got Unknown
        //IL_01f7: Unknown result type (might be due to invalid IL or missing references)
        worldPos    = pos;
        worldPos.y += offsetY;
        float num  = (float)Screen.get_height() / (float)MonoBehaviourSingleton <UIManager> .I.uiRoot.manualHeight;
        float num2 = (float)Screen.get_width() / (float)MonoBehaviourSingleton <UIManager> .I.uiRoot.manualWidth;

        higthOffset_f = (float)(damadeNum.height * groupOffset) * heightOffsetRatio * num;
        widthOffset   = (float)damadeNum.width * 0.2f * (float)groupOffset * num2;
        if (!SetPosFromWorld(worldPos))
        {
            return(false);
        }
        enable = true;
        int    count = damageNumList.Count;
        string text  = damage.ToString();

        damageLength = text.Length;
        int i = 0;

        for (int num3 = damageLength; i < num3; i++)
        {
            UILabel uILabel = null;
            if (count > i)
            {
                uILabel = damageNumList[i].GetComponent <UILabel>();
                damageNumList[i].SetActive(true);
            }
            else
            {
                GameObject val = null;
                if (i == 0)
                {
                    val     = damadeNum.get_gameObject();
                    uILabel = damadeNum;
                }
                else
                {
                    val = ResourceUtility.Instantiate <GameObject>(damadeNum.get_gameObject());
                    Utility.Attach(this.get_gameObject().get_transform(), val.get_transform());
                    uILabel = val.GetComponent <UILabel>();
                }
                damageNumList.Add(val);
            }
            uILabel.text  = text[i].ToString();
            uILabel.alpha = 1f;
            ChangeColor(color, uILabel);
        }
        if (count > damageLength)
        {
            for (int j = text.Length; j < count; j++)
            {
                damageNumList[j].SetActive(false);
            }
        }
        grid.Reposition();
        this.StartCoroutine(DirectionNumber());
        return(true);
    }
Example #15
0
    private IEnumerator DoInitialzie()
    {
        LoadingQueue loadQueue         = new LoadingQueue(this);
        LoadObject   loadedCutSceneObj = loadQueue.Load(RESOURCE_CATEGORY.CUTSCENE, "Opening", false);
        LoadObject   loadedTitleObj    = loadQueue.Load(RESOURCE_CATEGORY.CUTSCENE, "Title", false);

        int[] se_ids = (int[])Enum.GetValues(typeof(AUDIO));
        int[] array  = se_ids;
        foreach (int id in array)
        {
            loadQueue.CacheSE(id, null);
        }
        int[] voices = (int[])Enum.GetValues(typeof(VOICE));
        int[] array2 = voices;
        foreach (int id2 in array2)
        {
            loadQueue.CacheVoice(id2, null);
        }
        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        if (MonoBehaviourSingleton <AppMain> .I.mainCamera != null)
        {
            MonoBehaviourSingleton <AppMain> .I.mainCamera.set_enabled(false);
        }
        cutSceneObjectRoot = (ResourceUtility.Instantiate <Object>(loadedCutSceneObj.loadedObject) as GameObject);
        cutSceneObjectRoot.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I.get_transform());
        titleObjectRoot = (ResourceUtility.Instantiate <Object>(loadedTitleObj.loadedObject) as GameObject);
        titleObjectRoot.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I.get_transform());
        Transform eventObj = cutSceneObjectRoot.get_transform().FindChild("CUT_op");

        if (eventObj != null)
        {
            cutOP             = eventObj.get_gameObject();
            cutSceneAnimation = cutOP.GetComponent <Animation>();
            cutOP.SetActive(false);
        }
        Transform fade = cutSceneObjectRoot.get_transform().FindChild("Main Camera/Plane");

        if (fade != null)
        {
            MeshRenderer renderer = fade.GetComponent <MeshRenderer>();
            whiteFadeMaterial = renderer.get_material();
        }
        titleAnimation = titleObjectRoot.GetComponent <Animation>();
        cutSceneAnimation.Stop();
        MonoBehaviourSingleton <FieldManager> .I.SetCurrentFieldMapPortalID(10000100u);

        MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_start_screen, "Tutorial");

        MonoBehaviourSingleton <UIManager> .I.loading.HideAllPermissionMsg();

        base.Initialize();
        PredownloadManager.openingMode = true;
        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <PredownloadManager>();

        MonoBehaviourSingleton <UIManager> .I.loading.downloadGaugeVisible = false;
        PredownloadManager.Stop(PredownloadManager.STOP_FLAG.INGAME_TUTORIAL, true);
        DataTableManager dataTableManager = MonoBehaviourSingleton <DataTableManager> .I;

        Protocol.Send <CheckRegisterModel>(CheckRegisterModel.URL, delegate
        {
            ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_0399: stateMachine*/)._003CupdatedTableIndex_003E__15 = true;
        }, string.Empty);
        yield return((object)new WaitUntil((Func <bool>)(() => ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03b0: stateMachine*/)._003CupdatedTableIndex_003E__15)));

        isDownloading = true;
        dataTableManager.InitializeForDownload();
        dataTableManager.UpdateManifest(delegate
        {
            ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003CdataTableManager_003E__14.LoadInitialTable(delegate
            {
                List <DataLoadRequest> loadings = ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003CdataTableManager_003E__14.LoadAllTable(delegate
                {
                    PredownloadManager.Stop(PredownloadManager.STOP_FLAG.INGAME_TUTORIAL, false);
                    ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003C_003Ef__this.isDownloading = false;
                }, true);
                MonoBehaviourSingleton <UIManager> .I.loading.SetProgress(new FirstOpeningProgress(loadings));
            }, true);
        });
        TitleTop.isFirstBoot = false;
    }
    public BulletData GetRateBulletData(BulletData rate_info, float rate)
    {
        if (rate_info == null)
        {
            return(this);
        }
        BulletData bulletData = ResourceUtility.Instantiate <BulletData>(this);

        bulletData.type = ((!(rate < 1f)) ? rate_info.type : type);
        bulletData.data = data.GetRateBullet(rate_info.data, rate);
        switch (bulletData.type)
        {
        case BULLET_TYPE.FALL:
            bulletData.dataFall = dataFall.GetRateBullet(rate_info.dataFall, rate);
            break;

        case BULLET_TYPE.HOMING:
            bulletData.dataHoming = dataHoming.GetRateBullet(rate_info.dataHoming, rate);
            break;

        case BULLET_TYPE.CURVE:
            bulletData.dataCurve = dataCurve.GetRateBullet(rate_info.dataCurve, rate);
            break;

        case BULLET_TYPE.LASER:
            bulletData.dataLaser = dataLaser.GetRateBullet(rate_info.dataLaser, rate);
            break;

        case BULLET_TYPE.FUNNEL:
            bulletData.dataFunnel = dataFunnel.GetRateBullet(rate_info.dataFunnel, rate);
            break;

        case BULLET_TYPE.MINE:
            bulletData.dataMine = dataMine.GetRateBullet(rate_info.dataMine, rate);
            break;

        case BULLET_TYPE.TRACKING:
            bulletData.dataTracking = dataTracking.GetRateBullet(rate_info.dataTracking, rate);
            break;

        case BULLET_TYPE.UNDEAD:
            bulletData.dataUndead = dataUndead.GetRateBullet(rate_info.dataUndead, rate);
            break;

        case BULLET_TYPE.ICE_FLOOR:
            bulletData.dataIceFloor          = new BulletIceFloor();
            bulletData.dataIceFloor.duration = dataIceFloor.duration;
            break;

        case BULLET_TYPE.HIGH_EXPLOSIVE:
            bulletData.dataHighExplosive = new BulletHighExplosive();
            bulletData.dataHighExplosive.targetingType = dataHighExplosive.targetingType;
            break;

        case BULLET_TYPE.DIG:
            bulletData.dataDig = dataDig.GetRateBullet(rate_info.dataDig, rate);
            break;

        case BULLET_TYPE.ACTION_MINE:
            bulletData.dataActionMine = dataActionMine.GetRateBullet(rate_info.dataActionMine, rate);
            break;

        case BULLET_TYPE.PRESENT:
            bulletData.dataPresent = dataPresent;
            break;

        case BULLET_TYPE.CANNONBALL:
            bulletData.dataCannonball = new BulletCannonball();
            break;

        case BULLET_TYPE.OBSTACLE:
            bulletData.dataObstacle = new BulletObstacle();
            break;

        case BULLET_TYPE.ZONE:
            bulletData.dataZone = new BulletZone();
            break;

        case BULLET_TYPE.DECOY:
            bulletData.dataDecoy = new BulletDecoy();
            break;

        case BULLET_TYPE.BREAKABLE:
            bulletData.dataBreakable = new BulletBreakable();
            break;

        case BULLET_TYPE.OBSTACLE_CYLINDER:
            bulletData.dataObstacleCylinder = new BulletObstacleCylinder();
            break;

        case BULLET_TYPE.SNATCH:
            bulletData.dataSnatch = new BulletSnatch();
            break;

        case BULLET_TYPE.PAIR_SWORDS_SOUL:
            bulletData.dataPairSwordsSoul = new BulletPairSwordsSoul();
            break;

        case BULLET_TYPE.HEALING_HOMING:
            bulletData.dataHealingHomingBullet = dataHealingHomingBullet.CreateParamMergedInstance(rate_info.dataHealingHomingBullet, rate);
            break;

        case BULLET_TYPE.ARROW_SOUL:
            bulletData.dataArrowSoul = new BulletArrowSoul();
            break;
        }
        return(bulletData);
    }