コード例 #1
0
    private IEnumerator DoInitialize()
    {
        bool         is_recv_quest = false;
        LoadingQueue load_queue    = new LoadingQueue(this);

        load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_new");
        load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_complete");
        InitSearchParam();
        QuestAcceptChallengeRoomCondition.ChallengeSearchRequestParam sendParam = new QuestAcceptChallengeRoomCondition.ChallengeSearchRequestParam();
        int userLevel = sendParam.enemyLevel = GetEnemyLevelFromUserLevel();

        MonoBehaviourSingleton <QuestManager> .I.SendGetChallengeList(sendParam, delegate
        {
            ((_003CDoInitialize_003Ec__Iterator6D) /*Error near IL_00a4: stateMachine*/)._003Cis_recv_quest_003E__0 = true;
        }, false);

        while (!is_recv_quest)
        {
            yield return((object)null);
        }
        this.StartCoroutine(CheckLimitQuestItem());
        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        base.Initialize();
    }
コード例 #2
0
    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();
    }
コード例 #3
0
    private IEnumerator DoDisplayChatStamp(int stampId)
    {
        chatStampUI.SetActive(false);
        LoadingQueue lqstamp = new LoadingQueue(this);
        LoadObject   lostamp = lqstamp.LoadChatStamp(stampId, true);

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

        if (!(lostamp.loadedObject == null))
        {
            if (chatStampTexture != null)
            {
                chatStampTexture.mainTexture = (lostamp.loadedObject as Texture2D);
            }
            if (CanDisplayChat())
            {
                chatStampUI.SetActive(true);
                if (chatStampTween != null)
                {
                    chatStampTween.ResetToBeginning();
                    chatStampTween.PlayForward();
                }
            }
        }
    }
コード例 #4
0
    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();
    }
コード例 #5
0
    private IEnumerator DoLoading()
    {
        LoadingQueue load_queue = new LoadingQueue(this);

        int[]             values = (int[])Enum.GetValues(typeof(SoundID.UISE));
        List <LoadObject> los    = new List <LoadObject>();
        bool internal_mode       = ResourceManager.internalMode;
        bool enable_cache        = ResourceManager.enableCache;

        ResourceManager.internalMode = true;
        ResourceManager.enableCache  = false;
        int[] array = values;
        foreach (int id in array)
        {
            if (id > 0)
            {
                LoadObject lo = load_queue.LoadSE(id);
                los.Add(lo);
            }
        }
        ResourceManager.internalMode = internal_mode;
        ResourceManager.enableCache  = enable_cache;
        yield return((object)load_queue.Wait());

        SetSystemSEClips(values, los);
        m_IsLoading = false;
    }
コード例 #6
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();
    }
コード例 #7
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();
    }
コード例 #8
0
	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();
	}
コード例 #9
0
    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();
    }
コード例 #10
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();
    }
コード例 #11
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);
    }
コード例 #12
0
    private IEnumerator DoInitialize()
    {
        LoadingQueue loadQueue = new LoadingQueue(this);

        Singleton <EquipItemTable> .I.CreateTableForEquipList();

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        base.Initialize();
    }
コード例 #13
0
    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());
                    }
                }
            }
        }
    }
コード例 #14
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();
    }
コード例 #15
0
    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);
    }
コード例 #16
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();
    }
コード例 #17
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();
    }
コード例 #18
0
 private IEnumerator DoCacheVoice(Action on_complete)
 {
     if (message != null && message.has_voice && model != null)
     {
         NPCLoader loader = model.GetComponent <NPCLoader>();
         if (loader != null)
         {
             LoadingQueue load_queue = new LoadingQueue(loader);
             load_queue.CacheVoice(message.voice_id, null);
             yield return((object)load_queue.Wait());
         }
     }
     on_complete();
 }
コード例 #19
0
    private IEnumerator DoLoadWeapon(EquipItemTable.EquipItemData data)
    {
        int    modelID = data.GetModelID(sexID);
        string name    = ResourceName.GetPlayerWeapon(modelID);
        byte   highTex = 0;

        if (MonoBehaviourSingleton <GlobalSettingsManager> .IsValid())
        {
            EquipModelHQTable hqTable = MonoBehaviourSingleton <GlobalSettingsManager> .I.equipModelHQTable;
            highTex = hqTable.GetWeaponFlag(modelID);
        }
        LoadObject lo = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.PLAYER_WEAPON, name);
        LoadObject lo_high_reso_tex = PlayerLoader.LoadHighResoTexs(loadingQueue, name, highTex);

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

        Transform weapon = lo.Realizes(_transform, _transform.get_gameObject().get_layer());

        weapon.set_localPosition(Vector3.get_zero());
        weapon.set_localRotation(Quaternion.get_identity());
        Renderer[] renderers = weapon.GetComponentsInChildren <Renderer>();
        PlayerLoader.SetEquipColor3(renderers, NGUIMath.IntToColor(data.modelColor0), NGUIMath.IntToColor(data.modelColor1), NGUIMath.IntToColor(data.modelColor2));
        Material materialR = null;
        Material materialL = null;
        int      j         = 0;

        for (int i = renderers.Length; j < i; j++)
        {
            Renderer r = renderers[j];
            if (r.get_name().EndsWith("_L"))
            {
                materialL = r.get_material();
                nodeSub   = r.get_transform();
            }
            else
            {
                materialR = r.get_material();
                nodeMain  = r.get_transform();
            }
        }
        yield return((object)this.StartCoroutine(InitRoopEffect(loadingQueue, weapon, SHADER_TYPE.NORMAL)));

        PlayerLoader.ApplyWeaponHighResoTexs(lo_high_reso_tex, highTex, materialR, materialL);
        displayInfo = new GlobalSettingsManager.UIModelRenderingParam.DisplayInfo(MonoBehaviourSingleton <GlobalSettingsManager> .I.uiModelRendering.WeaponDisplayInfos[(int)data.type]);
        if (data.id == 50020201 || data.id == 50020200)
        {
            displayInfo.mainPos    = new Vector3(0f, 0f, -0.21f);
            displayInfo.mainRot.x += 180f;
            displayInfo.subRot.x  += 180f;
        }
        if (data.id == 60020200 || data.id == 60020201 || data.id == 60020202)
        {
            displayInfo.mainPos = new Vector3(0f, 0f, 0f);
            displayInfo.mainRot = new Vector3(-64.50903f, 93.68915f, -118.1268f);
        }
        OnLoadFinished();
    }
コード例 #20
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);
    }
コード例 #21
0
    private IEnumerator LoadSE()
    {
        LoadingQueue load_queue = new LoadingQueue(this);

        int[] ids   = (int[])Enum.GetValues(typeof(AUDIO));
        int[] array = ids;
        foreach (int id in array)
        {
            load_queue.CacheSE(id, null);
        }
        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
    }
コード例 #22
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();
    }
コード例 #23
0
    private IEnumerator LoadSE()
    {
        LoadingQueue loadQueue = new LoadingQueue(this);

        int[] seList = (int[])Enum.GetValues(typeof(SE));
        int[] array  = seList;
        foreach (int seId in array)
        {
            loadQueue.CacheSE(seId, null);
        }
        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
    }
コード例 #24
0
    private IEnumerator DoInit(string resource_name)
    {
        isLoading = true;
        LoadingQueue load_queue  = new LoadingQueue(this);
        LoadObject   load_object = load_queue.LoadAndInstantiate(RESOURCE_CATEGORY.COMMON, resource_name);

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

        model = load_object.Realizes(MonoBehaviourSingleton <AppMain> .I._transform, -1);
        if (model != null)
        {
            models.Add(model);
            UpdateModelOffset();
        }
        isLoading = false;
    }
コード例 #25
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);
     }
 }
コード例 #26
0
    private IEnumerator Start()
    {
        LoadingQueue load_queue      = new LoadingQueue(this);
        LoadObject   lo_event_banner = load_queue.LoadAndInstantiate(RESOURCE_CATEGORY.UI, "EventBanner");

        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        mEventBannerPrefab = (lo_event_banner.loadedObject as GameObject);
        AddPrefab(mEventBannerPrefab, lo_event_banner.PopInstantiatedGameObject());
        mCenterOnChild1          = GetCtrl(UI.WRP_EVENT_BANNER1).GetComponent <UICenterOnChild>();
        mCenterOnChild1.onCenter = OnCenter1;
        mCenterOnChild2          = GetCtrl(UI.WRP_EVENT_BANNER2).GetComponent <UICenterOnChild>();
        mCenterOnChild2.onCenter = OnCenter2;
    }
コード例 #27
0
    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();
    }
コード例 #28
0
    private IEnumerator DoLoad()
    {
        if (onLoadStart != null)
        {
            onLoadStart();
        }
        LoadingQueue load_queue = new LoadingQueue(this);
        LoadObject   lo_image   = load_queue.Load(RESOURCE_CATEGORY.QUEST_LOCATION_IMAGE, ResourceName.GetQuestLocationImage(id), false);

        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        image = ResourceUtility.Realizes(lo_image.loadedObject, MonoBehaviourSingleton <StageManager> .I._transform, 5);
        QuestLocationImage c = image.GetComponent <QuestLocationImage>();

        if (!(c == null))
        {
            int w = uiTexture.width;
            int h = uiTexture.height;
            UIRenderTexture.ToRealSize(ref w, ref h);
            c.Init(w, h);
            Camera cam = image.GetComponent <Camera>();
            if (!(cam == null))
            {
                RenderTexture tex = cam.get_targetTexture();
                if (!(tex == null))
                {
                    uiTexture.mainTexture = tex;
                    FloatInterpolator anim = new FloatInterpolator();
                    anim.Set(0.25f, 0f, 1f, Curves.easeLinear, 0f, null);
                    anim.Play();
                    while (anim.IsPlaying())
                    {
                        yield return((object)null);

                        uiTexture.alpha = anim.Update();
                    }
                    if (onLoadComplete != null)
                    {
                        onLoadComplete();
                    }
                    coroutine = null;
                }
            }
        }
    }
コード例 #29
0
    private IEnumerator DoInitialize()
    {
        GlobalSettingsManager.PackParam.PackInfo pack_info = MonoBehaviourSingleton <GlobalSettingsManager> .I.packParam.GetPack(productId);

        LoadingQueue loadQueue = new LoadingQueue(this);
        LoadObject   loTex     = loadQueue.Load(RESOURCE_CATEGORY.GACHA_POP_UP_ADVERTISEMENT, pack_info.popupAdsBanner, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        if (loTex.loadedObject != null)
        {
            SetTexture((Enum)UI.TEX_MAIN, loTex.loadedObject as Texture);
        }
        base.Initialize();
    }
コード例 #30
0
    private IEnumerator DoInitialize()
    {
        string       buttonName = "BTN_SHOP_NORMAL1";
        LoadingQueue loadQueue  = new LoadingQueue(this);
        LoadObject   lo_button  = loadQueue.Load(RESOURCE_CATEGORY.GACHA_BUTTON, buttonName, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        GameObject buttonObj = Object.Instantiate(lo_button.loadedObject) as GameObject;

        buttonObj.get_transform().set_parent(FindCtrl(base._transform, UI.OBJ_BUY));
        buttonObj.get_transform().set_localScale(new Vector3(1f, 1f, 1f));
        buttonObj.get_transform().set_localPosition(new Vector3(0f, 0f, 0f));
        base.Initialize();
    }