Пример #1
0
    public void Preload(LoadingQueue loadQueue)
    {
        uint regionId = MonoBehaviourSingleton <FieldManager> .I.currentMapData.regionId;

        loadedExploreMap_ = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "ExploreMap_" + regionId.ToString("D3"), false);
        loadedMarker_     = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "ExplorePlayerMarkerMini", false);
    }
    protected override IEnumerator DoInitialize()
    {
        string  resourceName = ResourceName.GetEventBG(eventData.bannerId);
        Hash128 hash         = default(Hash128);

        if (MonoBehaviourSingleton <ResourceManager> .I.manifest != null)
        {
            hash = MonoBehaviourSingleton <ResourceManager> .I.manifest.GetAssetBundleHash(RESOURCE_CATEGORY.EVENT_BG.ToAssetBundleName(resourceName));
        }
        if (MonoBehaviourSingleton <ResourceManager> .I.manifest == null || hash.get_isValid())
        {
            LoadingQueue load_queue = new LoadingQueue(this);
            LoadObject   lo_bg      = load_queue.Load(RESOURCE_CATEGORY.EVENT_BG, resourceName, false);
            LoadObject   lo_item    = null;
            if (ShouldShowEventMapButton())
            {
                lo_item = load_queue.Load(RESOURCE_CATEGORY.QUEST_ITEM, "QEM_10000000", false);
            }
            if (load_queue.IsLoading())
            {
                yield return((object)load_queue.Wait());
            }
            SetTexture(texture: lo_bg.loadedObject as Texture2D, texture_enum: UI.TEX_EVENT_BG);
            if (lo_item != null && null != lo_item.loadedObject)
            {
                GameObject mapItemObj = lo_item.loadedObject as GameObject;
                mapItem = mapItemObj.get_transform();
            }
        }
        GetDeliveryList();
        EndInitialize();
    }
 private IEnumerator SetPointShopGetPointUI()
 {
     if (pointShopGetPointData != null && pointShopGetPointData.Count > 0)
     {
         LoadingQueue queue = new LoadingQueue(this);
         queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[0].pointShopId), false);
         if (queue.IsLoading())
         {
             yield return((object)queue.Wait());
         }
         SetActive((Enum)UI.OBJ_NORMAL_ROOT, true);
         SetLabelText((Enum)UI.LBL_POINT_NORMAL, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[0].basePoint));
         UITexture normalTex = GetCtrl(UI.TEX_NORMAL_ICON).GetComponent <UITexture>();
         ResourceLoad.LoadPointIconImageTexture(normalTex, pointShopGetPointData[0].pointShopId);
         if (pointShopGetPointData.Count >= 2)
         {
             queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[1].pointShopId), false);
             if (queue.IsLoading())
             {
                 yield return((object)queue.Wait());
             }
             SetActive((Enum)UI.OBJ_EVENT_ROOT, true);
             SetLabelText((Enum)UI.LBL_POINT_EVENT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[1].basePoint));
             UITexture eventTex = GetCtrl(UI.TEX_EVENT_ICON).GetComponent <UITexture>();
             ResourceLoad.LoadPointIconImageTexture(eventTex, pointShopGetPointData[1].pointShopId);
         }
     }
 }
Пример #4
0
    private IEnumerator DoInitialize()
    {
        LoadingQueue loadingQueue = new LoadingQueue(this);

        loadingQueue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName(data.pointShopId), false);
        loadingQueue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointSHopBGImageName(data.pointShopId), false);
        if (loadingQueue.IsLoading())
        {
            yield return((object)loadingQueue.Wait());
        }
        base.Initialize();
    }
Пример #5
0
    private IEnumerator DoInitialize()
    {
        LoadingQueue load_queue             = new LoadingQueue(this);
        LoadObject   lo_quest_chatitem      = load_queue.Load(RESOURCE_CATEGORY.UI, "ChatItem", false);
        LoadObject   lo_chat_stamp_listitem = load_queue.Load(RESOURCE_CATEGORY.UI, "ChatStampListItem", false);

        talkerName = GetTalkerName(MonoBehaviourSingleton <FriendManager> .I.talkUser.userId);
        SetLabelText((Enum)UI.Title_U, talkerName);
        SetLabelText((Enum)UI.Title_D, talkerName);
        nowPage      = 0;
        loadedPage   = -1;
        itemListData = new MessageItemListData(GetCtrl(UI.OBJ_ROOM_ITEM_LIST_ROOT).get_gameObject());
        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        chatItemPrefab      = (lo_quest_chatitem.loadedObject as GameObject);
        chatStampListPrefab = (lo_chat_stamp_listitem.loadedObject as GameObject);
        SetSliderLimit();
        DummyDragScroll.width = 410;
        ResetStampIdList();
        Reset();
        postMessageList.Clear();
        UIScrollView scrollView = ScrollView;

        scrollView.onDragFinished = (UIScrollView.OnDragNotification)Delegate.Combine(scrollView.onDragFinished, new UIScrollView.OnDragNotification(OnDragFinished));
        ChatInputFrame inputFrame = InputFrame;

        inputFrame.onChange = (Action)Delegate.Combine(inputFrame.onChange, (Action) delegate
        {
            ((_003CDoInitialize_003Ec__Iterator3D) /*Error near IL_01ea: stateMachine*/)._003C_003Ef__this.OnInput();
        });
        ChatInputFrame inputFrame2 = InputFrame;

        inputFrame2.onSubmit = (Action)Delegate.Combine(inputFrame2.onSubmit, (Action) delegate
        {
            ((_003CDoInitialize_003Ec__Iterator3D) /*Error near IL_0216: stateMachine*/)._003C_003Ef__this.OnTouchPost();
        });
        if (MonoBehaviourSingleton <FriendManager> .I.talkUser.userId == 0)
        {
            GetCtrl(UI.SCR_STAMP_LIST).get_gameObject().SetActive(false);
            GetCtrl(UI.OBJ_POST_FRAME).get_gameObject().SetActive(false);
        }
        else
        {
            updateStampList = true;
            AppMain i = MonoBehaviourSingleton <AppMain> .I;
            i.onDelayCall = (Action)Delegate.Combine(i.onDelayCall, new Action(InitStampList));
        }
        base.Initialize();
    }
    private IEnumerator Start()
    {
        LoadingQueue load_queue        = new LoadingQueue(this);
        LoadObject   lo_common_prefabs = load_queue.Load(RESOURCE_CATEGORY.SYSTEM, "SystemCommon", new string[2]
        {
            "MainCamera",
            "InputManager"
        }, false);
        LoadObject lo_field_map_table = load_queue.Load(RESOURCE_CATEGORY.TABLE, "FieldMapTable", false);
        LoadObject lo_portal_table    = load_queue.Load(RESOURCE_CATEGORY.TABLE, "FieldMapPortalTable", false);
        LoadObject lo_enemy_pop_table = load_queue.Load(RESOURCE_CATEGORY.TABLE, "FieldMapEnemyPopTable", false);

        while (load_queue.IsLoading())
        {
            yield return((object)null);
        }
        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <FieldManager>();

        Singleton <FieldMapTable> .Create();

        string csv3 = DataTableManager.Decrypt((lo_field_map_table.loadedObject as TextAsset).get_text());

        Singleton <FieldMapTable> .I.CreateFieldMapTable(csv3);

        csv3 = DataTableManager.Decrypt((lo_portal_table.loadedObject as TextAsset).get_text());
        Singleton <FieldMapTable> .I.CreatePortalTable(csv3);

        csv3 = DataTableManager.Decrypt((lo_enemy_pop_table.loadedObject as TextAsset).get_text());
        Singleton <FieldMapTable> .I.CreateEnemyPopTable(csv3);

        if (Camera.get_main() != null)
        {
            Object.DestroyImmediate(Camera.get_main().get_gameObject());
        }
        ResourceUtility.Realizes(lo_common_prefabs.loadedObjects[0].obj, MonoBehaviourSingleton <AppMain> .I._transform, -1);
        ResourceUtility.Realizes(lo_common_prefabs.loadedObjects[1].obj, MonoBehaviourSingleton <AppMain> .I._transform, -1);
        MonoBehaviourSingleton <AppMain> .I.SetMainCamera(Camera.get_main());

        MonoBehaviourSingleton <AudioListenerManager> .I.SetFlag(AudioListenerManager.STATUS_FLAGS.CAMERA_MAIN_ACTIVE, true);

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <WorldMapManager>();

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <FilterManager>();

        MonoBehaviourSingleton <UIManager> .I.SetDisable(UIManager.DISABLE_FACTOR.INITIALIZE, false);

        MonoBehaviourSingleton <AppMain> .I.startScene = string.Empty;
        MonoBehaviourSingleton <GameSceneManager> .I.ChangeScene("Title", "Opening", UITransition.TYPE.CLOSE, UITransition.TYPE.OPEN, false);
    }
Пример #7
0
    private IEnumerator LoadPeopleWayPoint()
    {
        LoadingQueue load_queue    = new LoadingQueue(this);
        string       wayPointName  = "PeopleWayPoints";
        LoadObject   lo_way_points = load_queue.Load(RESOURCE_CATEGORY.SYSTEM, "SystemOutGame", new string[1]
        {
            wayPointName
        }, false);

        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        Transform wayPoints = ResourceUtility.Realizes(lo_way_points.loadedObject, this.get_transform(), -1);

        Utility.ForEach(wayPoints, delegate(Transform o)
        {
            if (o.get_name().StartsWith("LEAF"))
            {
                ((_003CLoadPeopleWayPoint_003Ec__IteratorA3) /*Error near IL_00ba: stateMachine*/)._003C_003Ef__this.leafPoints.Add(o.GetComponent <WayPoint>());
            }
            else if (o.get_name() == "CENTER")
            {
                ((_003CLoadPeopleWayPoint_003Ec__IteratorA3) /*Error near IL_00ba: stateMachine*/)._003C_003Ef__this.centerPoint = o.GetComponent <WayPoint>();
            }
            return(false);
        });
    }
    private IEnumerator InitPortalStatusImpl(Action onComplete)
    {
        LoadingQueue loadQueue = new LoadingQueue(this);
        UIntKeyTable <LoadObject> loadTextures = new UIntKeyTable <LoadObject>();

        for (int k = 0; k < locations.Length; k++)
        {
            FieldMapTable.FieldMapTableData tableData = locations[k].tableData;
            if (tableData != null && tableData.hasChildRegion && loadTextures.Get(tableData.iconId) == null)
            {
                loadTextures.Add(tableData.iconId, loadQueue.Load(RESOURCE_CATEGORY.DUNGEON_ICON, ResourceName.GetDungeonIcon(tableData.iconId), false));
            }
        }
        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        for (int j = 0; j < locations.Length; j++)
        {
            FieldMapTable.FieldMapTableData tableData2 = locations[j].tableData;
            if (tableData2 != null && tableData2.hasChildRegion)
            {
                locations[j].icon = (loadTextures.Get(tableData2.iconId).loadedObject as Texture2D);
            }
        }
        for (int i = 0; i < portals.Length; i++)
        {
            RegionMapPortal portal = portals[i];
            if (portal.IsVisited())
            {
                portal.Open();
            }
        }
        onComplete?.Invoke();
    }
    private IEnumerator DoInitialize()
    {
        if (MonoBehaviourSingleton <InGameRecorder> .IsValid() && MonoBehaviourSingleton <InGameRecorder> .I.players.Count > 0)
        {
            LoadingQueue load_queue = new LoadingQueue(this);
            LoadObject   lo         = load_queue.Load(RESOURCE_CATEGORY.UI, "QuestResultDirector", false);
            List <InGameRecorder.PlayerRecord> playerRecords = MonoBehaviourSingleton <InGameRecorder> .I.players;
            int m = 0;
            while (m < playerRecords.Count)
            {
                InGameRecorder.PlayerRecord p = playerRecords[m];
                if (p == null || p.playerLoadInfo == null)
                {
                    playerRecords.RemoveAt(m);
                }
                else
                {
                    m++;
                }
            }
            players = MonoBehaviourSingleton <InGameRecorder> .I.CreatePlayerModels();

            winnder_voice_id = 0;
            if (players != null)
            {
                winnder_voice_id = players[0].GetVoiceId(ACTION_VOICE_ID.HAPPY_01);
                load_queue.CacheActionVoice(winnder_voice_id, null);
            }
            if (load_queue.IsLoading())
            {
                yield return((object)load_queue.Wait());
            }
            while (true)
            {
                bool wait = false;
                int  l    = 0;
                for (int k = players.Length; l < k; l++)
                {
                    if (players[l].isLoading)
                    {
                        wait = true;
                        break;
                    }
                }
                if (!wait)
                {
                    break;
                }
                yield return((object)null);
            }
            int j = 0;
            for (int i = players.Length; j < i; j++)
            {
                players[j].animator.set_applyRootMotion(false);
            }
            director         = ResourceUtility.Realizes(lo.loadedObject, MonoBehaviourSingleton <StageManager> .I._transform, -1).GetComponent <QuestResultDirector>();
            director.players = players;
        }
        base.Initialize();
    }
Пример #10
0
    public IEnumerator DoInitialize()
    {
        currentType = VIEW_TYPE.NORMAL;
        currentPage = 1;
        bool         hasList      = false;
        LoadingQueue loadingQueue = new LoadingQueue(this);

        loadingQueue.Load(RESOURCE_CATEGORY.UI, "PointShopListItem", false);
        MonoBehaviourSingleton <UserInfoManager> .I.PointShopManager.SendGetPointShops(delegate(bool isSuccess, List <PointShop> resultList)
        {
            if (isSuccess)
            {
                ((_003CDoInitialize_003Ec__Iterator91) /*Error near IL_0073: stateMachine*/)._003C_003Ef__this.pointShop = resultList;
                foreach (PointShop item in ((_003CDoInitialize_003Ec__Iterator91) /*Error near IL_0073: stateMachine*/)._003C_003Ef__this.pointShop)
                {
                    ((_003CDoInitialize_003Ec__Iterator91) /*Error near IL_0073: stateMachine*/)._003CloadingQueue_003E__1.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName(item.pointShopId), false);
                }
                ((_003CDoInitialize_003Ec__Iterator91) /*Error near IL_0073: stateMachine*/)._003ChasList_003E__0 = true;
            }
        });

        while (!hasList)
        {
            yield return((object)null);
        }
        if (loadingQueue.IsLoading())
        {
            yield return((object)loadingQueue.Wait());
        }
        base.Initialize();
    }
Пример #11
0
    private IEnumerator DoLoad(int npc_model_id, int layer, bool need_shadow, bool enable_light_probes, SHADER_TYPE shader_type, Action callback)
    {
        loadingQueue = new LoadingQueue(this);
        string     model_name = ResourceName.GetNPCModel(npc_model_id);
        LoadObject lo_model   = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.NPC_MODEL, model_name);
        string     anim_name  = ResourceName.GetNPCAnim(npc_model_id);
        LoadObject lo_anim    = loadingQueue.Load(RESOURCE_CATEGORY.NPC_ANIM, anim_name, new string[1]
        {
            anim_name + "Ctrl"
        }, false);

        if (loadingQueue.IsLoading())
        {
            yield return((object)loadingQueue.Wait());
        }
        model = lo_model.Realizes(this.get_transform(), layer);
        if (model != null)
        {
            head   = Utility.Find(model, "Head");
            facial = model.GetComponentInChildren <NPCFacial>();
            if (facial != null)
            {
                facial.animNode = Utility.Find(model, "Face");
            }
            animator = model.GetComponentInChildren <Animator>();
            if (lo_anim != null && animator != null)
            {
                animator.set_runtimeAnimatorController(lo_anim.loadedObjects[0].obj as RuntimeAnimatorController);
            }
        }
        PlayerLoader.SetLightProbes(model, enable_light_probes);
        renderers = model.GetComponentsInChildren <Renderer>();
        int j = 0;

        for (int i = renderers.Length; j < i; j++)
        {
            if (renderers[j] is SkinnedMeshRenderer)
            {
                (renderers[j] as SkinnedMeshRenderer).set_localBounds(BOUNDS);
            }
        }
        switch (shader_type)
        {
        case SHADER_TYPE.LIGHTWEIGHT:
            ShaderGlobal.ChangeWantLightweightShader(renderers);
            break;

        case SHADER_TYPE.UI:
            ShaderGlobal.ChangeWantUIShader(renderers);
            break;
        }
        if (need_shadow)
        {
            shadow = PlayerLoader.CreateShadow(this.get_transform(), true, -1, shader_type == SHADER_TYPE.LIGHTWEIGHT);
        }
        coroutine = null;
        callback?.Invoke();
    }
Пример #12
0
    private IEnumerator DoInitialize()
    {
        if (isFirstBoot && CheckTitleSkip())
        {
            bool wait = true;
            MonoBehaviourSingleton <LoungeMatchingManager> .I.SendInfo(delegate
            {
                ((_003CDoInitialize_003Ec__Iterator14A) /*Error near IL_004b: stateMachine*/)._003Cwait_003E__0 = false;
            }, false);

            while (wait)
            {
                yield return((object)null);
            }
            SetActiveUI(false);
            base.Initialize();
        }
        else
        {
            LoadingQueue load_queue = new LoadingQueue(this);
            load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_title_01");
            LoadObject lo_director = load_queue.Load(RESOURCE_CATEGORY.CUTSCENE, "InGameTutorialDirector", false);
            LoadObject lo_tap      = load_queue.Load(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_title_04", false);
            while (load_queue.IsLoading())
            {
                yield return((object)null);
            }
            Transform director_t = ResourceUtility.Realizes(lo_director.loadedObject, -1);
            if (director_t != null)
            {
                director = director_t.GetComponent <TutorialBossDirector>();
                director.StartLogoAnimation(false, null, delegate
                {
                    ((_003CDoInitialize_003Ec__Iterator14A) /*Error near IL_0163: stateMachine*/)._003C_003Ef__this.SetActiveUI(true);
                });
                MonoBehaviourSingleton <AppMain> .I.mainCamera.GetComponent <RenderTargetCacher>().set_enabled(false);
            }
            else
            {
                SetActiveUI(true);
            }
            tapPrefab = (lo_tap.loadedObject as GameObject);
            base.Initialize();
        }
    }
Пример #13
0
        public IEnumerator LoadIconPrefabs(MonoBehaviour mono)
        {
            LoadingQueue loadQueue                       = new LoadingQueue(mono);
            LoadObject   itemIconLoadObject              = loadQueue.Load(RESOURCE_CATEGORY.UI, itemIconPackageName, true);
            LoadObject   itemIconDetailLoadObject        = loadQueue.Load(RESOURCE_CATEGORY.UI, itemIconDetailPackageName, true);
            LoadObject   itemIconDetailSmallLoadObject   = loadQueue.Load(RESOURCE_CATEGORY.UI, itemIconDetailSmallPackageName, true);
            LoadObject   itemIconMaterialLoadObject      = loadQueue.Load(RESOURCE_CATEGORY.UI, itemIconMaterialPackageName, true);
            LoadObject   itemIconEquipMaterialLoadObject = loadQueue.Load(RESOURCE_CATEGORY.UI, itemIconEquipMaterialPackageName, true);

            if (loadQueue.IsLoading())
            {
                yield return((object)loadQueue.Wait());
            }
            itemIconPrefab              = (itemIconLoadObject.loadedObject as GameObject);
            itemIconDetailPrefab        = (itemIconDetailLoadObject.loadedObject as GameObject);
            itemIconDetailSmallPrefab   = (itemIconDetailSmallLoadObject.loadedObject as GameObject);
            itemIconMaterialPrefab      = (itemIconMaterialLoadObject.loadedObject as GameObject);
            itemIconEquipMaterialPrefab = (itemIconEquipMaterialLoadObject.loadedObject as GameObject);
        }
    private IEnumerator DoInitialize()
    {
        LoadingQueue loadQueue            = new LoadingQueue(this);
        LoadObject   distanceCircleObject = loadQueue.Load(RESOURCE_CATEGORY.UI, "DistanceCircle", false);
        LoadObject   distanceBarObject    = loadQueue.Load(RESOURCE_CATEGORY.UI, "DistanceBar", false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        circlePrefab = (distanceCircleObject.loadedObject as GameObject);
        barPrefab    = (distanceBarObject.loadedObject as GameObject);
        startPoint   = GetCtrl(UI.GRAPH_START);
        object[] datas = GameSection.GetEventData() as object[];
        int      id    = (int)datas[0];

        CreateGraph((uint)id);
        base.Initialize();
    }
	private IEnumerator DoInitialize()
	{
		bool is_recv_delivery = false;
		MonoBehaviourSingleton<QuestManager>.I.SendGetEventList(delegate
		{
			((_003CDoInitialize_003Ec__IteratorBB)/*Error near IL_0035: stateMachine*/)._003Cis_recv_delivery_003E__0 = true;
		});
		while (!is_recv_delivery)
		{
			yield return (object)null;
		}
		if (isInGame)
		{
			eventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList.Count);
			List<Network.EventData> allEventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList);
			for (int j = 0; j < allEventList.Count; j++)
			{
				if (allEventList[j].eventType != 4 && allEventList[j].eventType != 12 && allEventList[j].eventType != 15)
				{
					eventList.Add(allEventList[j]);
				}
			}
		}
		else
		{
			eventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList);
		}
		RemoveEndedEvents();
		LoadingQueue loadingQueue = new LoadingQueue(this);
		bannerTable = new Dictionary<int, LoadObject>(eventList.Count);
		exploreClearedMap = new Dictionary<int, bool>();
		for (int i = 0; i < eventList.Count; i++)
		{
			Network.EventData e = eventList[i];
			if (!bannerTable.ContainsKey(e.bannerId))
			{
				string bannerImg = ResourceName.GetEventBanner(e.bannerId);
				LoadObject obj = loadingQueue.Load(RESOURCE_CATEGORY.EVENT_ICON, bannerImg, false);
				bannerTable.Add(e.bannerId, obj);
				if (e.eventType == 15 && (int)MonoBehaviourSingleton<UserInfoManager>.I.userStatus.level < 50)
				{
					LoadDisableArenaBanner(loadingQueue);
				}
				if (e.eventType == 4)
				{
					yield return (object)this.StartCoroutine(GetExplorePoint(e.eventId));
				}
			}
		}
		if (loadingQueue.IsLoading())
		{
			yield return (object)loadingQueue.Wait();
		}
		base.Initialize();
	}
    private IEnumerator DoInitialize()
    {
        LoadingQueue loadingQueue = new LoadingQueue(this);
        LoadObject   lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "SmithEquipDirection", false);
        int          wait2        = 0;

        wait2++;
        NPCTable.NPCData npcData4 = Singleton <NPCTable> .I.GetNPCData(4);

        GameObject npcRoot4 = new GameObject("NPC");

        npcData4.LoadModel(npcRoot4, false, true, delegate
        {
            ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_0093: stateMachine*/)._003Cwait_003E__2--;
        }, false);
        GameObject npcRoot3 = null;

        if (this is SmithAbilityChangePerformance || this is SmithAbilityItemPerformance)
        {
            wait2++;
            NPCTable.NPCData npcData3 = Singleton <NPCTable> .I.GetNPCData(3);

            npcRoot3 = new GameObject("NPC003");
            npcData3.LoadModel(npcRoot3, false, true, delegate
            {
                ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_011c: stateMachine*/)._003Cwait_003E__2--;
            }, false);
        }
        int[] seIds2 = (int[])Enum.GetValues(typeof(SmithEquipDirector.AUDIO));
        int[] array  = seIds2;
        foreach (int seId in array)
        {
            loadingQueue.CacheSE(seId, null);
        }
        seIds2 = (int[])Enum.GetValues(typeof(EquipResultBase.AUDIO));
        int[] array2 = seIds2;
        foreach (int seId2 in array2)
        {
            loadingQueue.CacheSE(seId2, null);
        }
        yield return((object)loadingQueue.Wait());

        while (wait2 > 0)
        {
            yield return((object)null);
        }
        Object    directionObject    = lo_direction.loadedObject;
        Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1);

        director = directionTransform.GetComponent <SmithEquipDirector>();
        director.SetNPC004(npcRoot4);
        director.SetNPC003(npcRoot3);
        base.Initialize();
    }
 public void LoadPreloadResources(LoadingQueue load_queue)
 {
     if (preloadResourceList != null)
     {
         int i = 0;
         for (int count = preloadResourceList.Count; i < count; i++)
         {
             load_queue.Load(RESOURCE_CATEGORY.UI, preloadResourceList[i], false);
         }
     }
 }
    private IEnumerator DoSetupTutorialAfterGacha2()
    {
        if (m_home_top == null)
        {
            m_home_top = this.GetComponent <HomeTop>();
        }
        LoadingQueue lo_queue            = new LoadingQueue(this);
        LoadObject   obj_target_area     = lo_queue.Load(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_tutorial_area_01", false);
        LoadObject   obj_tutorial_dialog = lo_queue.Load(RESOURCE_CATEGORY.UI, "UI_TutorialHomeDialog", false);

        if (lo_queue.IsLoading())
        {
            yield return((object)lo_queue.Wait());
        }
        prefab_target_area = obj_target_area.loadedObject;
        prefab_dialog      = obj_tutorial_dialog.loadedObject;
        HidePassengers();
        SetDialog(DialogType.AFTER_GACHA2);
        is_loading = false;
    }
    protected IEnumerator StartPredownload()
    {
        List <ResourceInfo> list = new List <ResourceInfo>();
        uint mapId = questData.mapId;

        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(mapId);

        if (fieldMapData != null)
        {
            string stageName = fieldMapData.stageName;
            if (string.IsNullOrEmpty(stageName))
            {
                stageName = "ST011D_01";
            }
            StageTable.StageData stageData = Singleton <StageTable> .I.GetData(stageName);

            if (stageData != null)
            {
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SCENE, stageData.scene));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SKY, stageData.sky));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffect));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffectY0));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.rootEffect));
                for (int i = 0; i < 8; i++)
                {
                    list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.useEffects[i]));
                }
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.enemyID[0]);

                int    bodyId   = enemyData.modelId;
                string bodyName = ResourceName.GetEnemyBody(bodyId);
                string mateName = ResourceName.GetEnemyMaterial(bodyId);
                string animName = ResourceName.GetEnemyAnim(enemyData.animId);
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MODEL, bodyName));
                if (!string.IsNullOrEmpty(mateName))
                {
                    list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MATERIAL, bodyName));
                }
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_ANIM, animName));
                LoadingQueue load_queue = new LoadingQueue(this);
                foreach (ResourceInfo item in list)
                {
                    if (!string.IsNullOrEmpty(item.packageName))
                    {
                        ResourceManager.downloadOnly = true;
                        load_queue.Load(item.category, item.packageName, null, false);
                        ResourceManager.downloadOnly = false;
                        yield return((object)load_queue.Wait());
                    }
                }
            }
        }
    }
Пример #20
0
    protected IEnumerator LoadGachaGuaranteeCounter(Action <LoadObject> callback)
    {
        LoadingQueue loadQueue  = new LoadingQueue(this);
        string       imgName    = nextGuachaGuarantee.GetTitleImageName();
        LoadObject   loadObject = loadQueue.Load(RESOURCE_CATEGORY.GACHA_GUARANTEE_COUNTER, imgName, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        callback(loadObject);
    }
Пример #21
0
    private IEnumerator LoadImg(Transform t, EventBanner banner, int index, int centerIndex)
    {
        LoadingQueue load = new LoadingQueue(this);
        LoadObject   lo;

        if (MonoBehaviourSingleton <ResourceManager> .I.manifest != null)
        {
            Hash128 assetBundleHash = MonoBehaviourSingleton <ResourceManager> .I.manifest.GetAssetBundleHash(RESOURCE_CATEGORY.HOME_BANNER_IMAGE.ToAssetBundleName(ResourceName.GetHomeBannerImage(banner.bannerId)));

            if (assetBundleHash.get_isValid())
            {
                lo = load.Load(RESOURCE_CATEGORY.HOME_BANNER_IMAGE, ResourceName.GetHomeBannerImage(banner.bannerId), false);
                goto IL_00e5;
            }
        }
        lo = load.Load(RESOURCE_CATEGORY.HOME_BANNER_IMAGE, "HBI_Default", false);
        Log.Error("Missing HBI image: " + ResourceName.GetHomeBannerImage(banner.bannerId));
        goto IL_00e5;
IL_00e5:
        yield return((object)load.Wait());

        Transform bannerTrans = FindCtrl(t, UI.NORMAL_CLOTH);
        Texture2D tex         = lo.loadedObject as Texture2D;

        bannerTrans.get_gameObject().SetActive(true);
        bannerTrans.GetComponent <Cloth>().set_enabled(true);
        Renderer r   = bannerTrans.GetComponent <Renderer>();
        Material mat = r.get_material();

        mat.set_mainTexture(tex);
        r.set_material(mat);
        yield return((object)null);

        if (index == centerIndex)
        {
            mat.set_color(Color.get_white());
            t.get_gameObject().SetActive(true);
        }
        loadingRoutines.Remove(t);
    }
Пример #22
0
    protected override IEnumerator DoInitialize()
    {
        int regionId = (int)GameSection.GetEventData();

        regionData = Singleton <RegionTable> .I.GetData((uint)regionId);

        bool needSummary = regionId != 0;

        SetActive((Enum)UI.BTN_SUMMARY, needSummary);
        LoadingQueue loadQueue  = new LoadingQueue(this);
        string       bannerName = ResourceName.GetAreaBG(regionId);
        LoadObject   bannerObj  = loadQueue.Load(RESOURCE_CATEGORY.AREA_BACKGROUND, bannerName, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        Texture2D bannerTex = bannerObj.loadedObject as Texture2D;

        if (bannerTex != null)
        {
            SetTexture((Enum)UI.TEX_AREA_BG, bannerTex);
        }
        if (ShouldShowEventMapButton())
        {
            LoadObject item = loadQueue.Load(RESOURCE_CATEGORY.QUEST_ITEM, "QEM_10000001", false);
            if (loadQueue.IsLoading())
            {
                yield return((object)loadQueue.Wait());
            }
            SetTexture(texture: item.loadedObject as Texture2D, texture_enum: UI.TEX_EVENT_BG);
            if (item != null && null != item.loadedObject)
            {
                GameObject mapItemObj = item.loadedObject as GameObject;
                mapItem = mapItemObj.get_transform();
            }
        }
        SetAreaName();
        EndInitialize();
    }
    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);
    }
Пример #24
0
    private IEnumerator _Load(int variation, int bannerId)
    {
        LoadingQueue lo        = new LoadingQueue(this);
        LoadObject   lo_model  = null;
        LoadObject   lo_tex    = null;
        bool         loadModel = currentVariation != variation;
        bool         loadTex   = currentBannerId != bannerId;

        if (loadModel)
        {
            lo_model = lo.Load(RESOURCE_CATEGORY.NPC_MODEL, string.Format(MODEL_FORMAT, variation), false);
        }
        if (loadTex)
        {
            lo_tex = lo.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetHomePointSHopBannerImageName(bannerId), false);
        }
        if (lo.IsLoading())
        {
            yield return((object)lo.Wait());
        }
        if (loadModel)
        {
            GameObject model = Object.Instantiate(lo_model.loadedObject) as GameObject;
            modelTransform = model.get_transform();
            bannerMaterial = FindBannerMaterial(model);
            Reposition();
            SetTouchEvent(model);
            currentVariation = variation;
        }
        if (loadTex)
        {
            if (Object.op_Implicit(bannerMaterial))
            {
                bannerMaterial.set_mainTexture(lo_tex.loadedObject as Texture2D);
            }
            currentBannerId = bannerId;
        }
        isLoading = false;
    }
Пример #25
0
    private IEnumerator DoInitialize()
    {
        bool is_recv_delivery = false;

        MonoBehaviourSingleton <QuestManager> .I.SendGetExploreList(delegate
        {
            ((_003CDoInitialize_003Ec__IteratorFC) /*Error near IL_0031: stateMachine*/)._003Cis_recv_delivery_003E__0 = true;
        });

        while (!is_recv_delivery)
        {
            yield return((object)null);
        }
        List <Network.EventData> allEventList = new List <Network.EventData>(MonoBehaviourSingleton <QuestManager> .I.eventList);

        eventList = new List <Network.EventData>();
        for (int k = 0; k < allEventList.Count; k++)
        {
            if (allEventList[k].eventType == 4)
            {
                eventList.Add(allEventList[k]);
            }
        }
        for (int j = 0; j < allEventList.Count; j++)
        {
            if (allEventList[j].eventType == 12)
            {
                eventList.Add(allEventList[j]);
            }
        }
        RemoveEndedEvents();
        LoadingQueue loadingQueue = new LoadingQueue(this);

        bannerTable = new Dictionary <int, LoadObject>(eventList.Count);
        for (int i = 0; i < eventList.Count; i++)
        {
            Network.EventData e = eventList[i];
            if (!bannerTable.ContainsKey(e.bannerId))
            {
                string     bannerImg = ResourceName.GetEventBanner(e.bannerId);
                LoadObject obj       = loadingQueue.Load(RESOURCE_CATEGORY.EVENT_ICON, bannerImg, false);
                bannerTable.Add(e.bannerId, obj);
            }
        }
        if (loadingQueue.IsLoading())
        {
            yield return((object)loadingQueue.Wait());
        }
        base.Initialize();
    }
Пример #26
0
    private IEnumerator LoadAndSetTips()
    {
        STRING_CATEGORY category   = (!IsRush()) ? STRING_CATEGORY.TIPS : STRING_CATEGORY.RUSH_TIPS;
        int             tips_count = StringTable.GetAllInCategory(category).Length;
        int             tips_index;
        string          tips;

        do
        {
            tips_index = Random.Range(1, tips_count + 1);
            if (MonoBehaviourSingleton <UserInfoManager> .IsValid() && MonoBehaviourSingleton <UserInfoManager> .I.userInfo.name == "/colopl_rob")
            {
                tips_index = 1;
            }
            Debug.Log((object)("Tip Counts: " + tips_count));
            Debug.Log((object)("Tip_Index: " + tips_index));
            tips = StringTable.Get(category, (uint)tips_index);
        }while ((string.IsNullOrEmpty(tips) || tips.Length <= 1) && tips_index != 1);
        LoadObject lo_image = null;

        if (!ResourceManager.internalMode)
        {
            LoadingQueue load_queue = new LoadingQueue(this);
            ResourceManager.enableCache = false;
            lo_image = ((!IsRush()) ? load_queue.Load(RESOURCE_CATEGORY.TIPS_IMAGE, ResourceName.GetTipsImage(tips_index), false) : load_queue.Load(RESOURCE_CATEGORY.RUSH_TIPS_IMAGE, ResourceName.GetRushTipsImage(tips_index), false));
            ResourceManager.enableCache = true;
            if (load_queue.IsLoading())
            {
                yield return((object)load_queue.Wait());
            }
        }
        if (lo_image != null && lo_image.loadedObject != null)
        {
            RemoveTexImage();
            SetTexture((Enum)UI.TEX_IMAGE, lo_image.loadedObject as Texture);
        }
        string tips_title = string.Empty;
        string tips_desc  = string.Empty;
        int    br         = tips.IndexOf('\n');

        if (br >= 0)
        {
            tips_title = tips.Substring(0, br);
            tips_desc  = tips.Substring(br + 1);
        }
        SetLabelText((Enum)UI.LBL_TIPS_TITLE, tips_title);
        SetLabelText((Enum)UI.LBL_TIPS_TITLE_REFLECT, tips_title);
        SetLabelText((Enum)UI.LBL_TIPS, tips_desc);
    }
Пример #27
0
    private IEnumerator _LoadTutorialMessage(Action callback)
    {
        LoadingQueue load_queue  = new LoadingQueue(this);
        LoadObject   lo_tutorial = (!(tutorialMessage == null)) ? null : load_queue.Load(RESOURCE_CATEGORY.UI, "TutorialMessage", false);

        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        if (lo_tutorial != null)
        {
            tutorialMessage = (CreatePrefabUI(lo_tutorial.loadedObject, null, null, false, base._transform, 6500, null) as TutorialMessage);
        }
        callback();
    }
Пример #28
0
    private IEnumerator DoLoadBackgoundImage(int image_id)
    {
        isLoadingBackgoundImage = true;
        UnloadStage();
        LoadingQueue load_queue = new LoadingQueue(this);

        ResourceManager.enableCache = false;
        LoadObject lo_bg  = load_queue.Load(RESOURCE_CATEGORY.STAGE_IMAGE, "BackgroundImage", false);
        LoadObject lo_tex = load_queue.Load(RESOURCE_CATEGORY.STAGE_IMAGE, ResourceName.GetBackgroundImage(image_id), false);

        ResourceManager.enableCache = true;
        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        Transform bg = ResourceUtility.Realizes(lo_bg.loadedObject, base._transform, 0);

        bg.get_gameObject().GetComponent <MeshRenderer>().get_material()
        .set_mainTexture(lo_tex.loadedObject as Texture);
        bg.get_gameObject().AddComponent <FixedViewQuad>();
        backgroundImageID       = image_id;
        backgroundImage         = bg;
        isLoadingBackgoundImage = false;
    }
    private IEnumerator DoInitialize()
    {
        LoadingQueue loadQueue = new LoadingQueue(this);
        LoadObject   loTex     = loadQueue.Load(RESOURCE_CATEGORY.GACHA_POP_UP_ADVERTISEMENT, textureName, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        if (loTex.loadedObject != null)
        {
            SetTexture((Enum)UI.TEX_MAIN, loTex.loadedObject as Texture);
        }
        PlayTween((Enum)UI.OBJ_FRAME, true, (EventDelegate.Callback)null, false, 0);
        base.Initialize();
    }
Пример #30
0
 private IEnumerator _SetFrame(string frameName)
 {
     if (!(mFrameName == frameName))
     {
         LoadingQueue load         = new LoadingQueue(this);
         LoadObject   frameTexture = load.Load(RESOURCE_CATEGORY.DEGREE_FRAME, frameName, false);
         mFrame.set_enabled(false);
         if (load.IsLoading())
         {
             yield return((object)load.Wait());
         }
         mFrame.mainTexture = (frameTexture.loadedObject as Texture);
         mFrameName         = frameName;
         mFrame.set_enabled(true);
     }
 }