Exemple #1
0
    public void LoadBox(List <Vector3> emptySpace, int randomNumber, Level level)
    {
        LoadObject loadboxx        = new LoadObject();
        GameObject cubebox         = loadboxx.LoadBox();
        WaysPlayer waysPlayer      = new WaysPlayer();
        Vector3    vectorPlayZ     = new Vector3(0, 0, 11);
        Vector3    vectorPlayX     = new Vector3(11, 0, 0);
        Vector3    vectorPlayLocal = emptySpace[randomNumber];

        int numberEmptyCall;

        emptySpace.RemoveAt(randomNumber);
        waysPlayer.SearchWayzPlayer(ref emptySpace, vectorPlayLocal, vectorPlayZ, vectorPlayX, Operation.Add);
        waysPlayer.SearchWayzPlayer(ref emptySpace, vectorPlayLocal, vectorPlayZ, vectorPlayX, Operation.Compute);
        waysPlayer.SearchWayzPlayer(ref emptySpace, vectorPlayLocal, vectorPlayX, vectorPlayZ, Operation.Add);
        waysPlayer.SearchWayzPlayer(ref emptySpace, vectorPlayLocal, vectorPlayX, vectorPlayZ, Operation.Compute);

        numberEmptyCall = emptySpace.Count;
        int numberBox = numberEmptyCall * level.GetHashCode() / 100;

        for (int i = 0; i < numberBox; i++)
        {
            int ii        = emptySpace.Count;
            int ranNumber = Random.Range(0, ii - 1);
            Instantiate(cubebox, emptySpace[ranNumber], Quaternion.identity);
            emptySpace.RemoveAt(ranNumber);
        }

        foreach (Vector3 vector in WaysPlayer.Костылек)
        {
            Field.emptySpace.Add(vector);
        }
    }
    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);
        });
    }
Exemple #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();
                }
            }
        }
    }
Exemple #4
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);
    }
Exemple #5
0
    private IEnumerator DoLoadHelm(EquipItemTable.EquipItemData data)
    {
        EquipModelTable.Data model_data = data.GetModelData(sexID);
        LoadObject           lo_head    = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.PLAYER_HEAD, ResourceName.GetPlayerHead(data.GetModelID(sexID)));
        LoadObject           lo_face    = null;

        if (model_data.needFace)
        {
            lo_face = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.PLAYER_FACE, ResourceName.GetPlayerFace(faceModelID));
        }
        yield return((object)loadingQueue.Wait());

        Transform head = lo_head.Realizes(_transform, _transform.get_gameObject().get_layer());

        head.set_localPosition(Vector3.get_zero());
        head.set_localRotation(Quaternion.get_identity());
        PlayerLoader.SetEquipColor(head, NGUIMath.IntToColor(data.modelColor0));
        nodeMain = head;
        yield return((object)this.StartCoroutine(InitRoopEffect(loadingQueue, head, SHADER_TYPE.NORMAL)));

        if (lo_face != null)
        {
            Transform face = lo_face.Realizes(head, _transform.get_gameObject().get_layer());
            _SetMannequinMaterial(face);
        }
        displayInfo = MonoBehaviourSingleton <GlobalSettingsManager> .I.uiModelRendering.helmDisplayInfo;
        OnLoadFinished();
    }
Exemple #6
0
 public void SetSystemSEClips(int[] values, List <LoadObject> los)
 {
     m_SystemSEClips = new UIntKeyTable <AudioClip>();
     foreach (int num in values)
     {
         if (num > 0)
         {
             string     sE         = ResourceName.GetSE(num);
             LoadObject loadObject = null;
             foreach (LoadObject lo in los)
             {
                 if (lo != null && lo.loadedObject != null && !string.IsNullOrEmpty(lo.loadedObject.get_name()))
                 {
                     string b = ResourceName.Normalize(lo.loadedObject.get_name());
                     if (sE == b)
                     {
                         loadObject = lo;
                     }
                 }
             }
             if (loadObject != null)
             {
                 AudioClip val = loadObject.loadedObject as AudioClip;
                 if (val != null)
                 {
                     m_SystemSEClips.Add((uint)num, val);
                 }
             }
         }
     }
 }
    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();
    }
Exemple #8
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;
    }
Exemple #9
0
 static public void SetLoadMovieObj(LoadObject obj)
 {
     loadObj   = obj;
     titleflag = false;
     loadflag  = true;
     menuflag  = false;
 }
    public void Initialize(FieldMapTable.FieldGimmickPointTableData pointData)
    {
        base.Initialize();
        param           = MonoBehaviourSingleton <InGameSettingsManager> .I.waveMatchParam;
        base.objectType = OBJECT_TYPE.WAVE_TARGET;
        id            = (int)pointData.pointID;
        m_gimmickType = pointData.gimmickType;
        if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.fieldGimmickModelTable != null)
        {
            LoadObject loadObject = MonoBehaviourSingleton <InGameProgress> .I.fieldGimmickModelTable.Get((uint)m_gimmickType);

            if (loadObject != null)
            {
                m_modelTrans = ResourceUtility.Realizes(loadObject.loadedObject, base._transform, -1);
            }
        }
        _maxHp        = (_nowHp = (int)pointData.value1);
        base.coopMode = (MonoBehaviourSingleton <CoopManager> .I.coopMyClient.isStageHost ? COOP_MODE_TYPE.ORIGINAL : COOP_MODE_TYPE.MIRROR);
        ParseParam(pointData.value2);
        if (MonoBehaviourSingleton <UIStatusGizmoManager> .IsValid())
        {
            MonoBehaviourSingleton <UIStatusGizmoManager> .I.CreateWaveTarget(this);
        }
        if (MonoBehaviourSingleton <MiniMap> .IsValid())
        {
            MonoBehaviourSingleton <MiniMap> .I.Attach(this);
        }
    }
    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();
    }
Exemple #12
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();
    }
Exemple #13
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();
    }
        /// <summary>
        /// Loads all records from a table.
        /// </summary>
        /// <typeparam name="T">A <see cref="SafnetBaseEntity"/> class</typeparam>
        /// <param name="method">A LoadObject method</param>
        /// <param name="storedProc">Stored procedure name</param>
        /// <returns>New <see cref="SafnetBaseEntity"/></returns>
        public static List <T> LoadAll <T>(LoadObject <T> method, string storedProc)
        {
            QueryParameter parm = new QueryParameter("All", true);

            return(LoadAllQuery <T>(method, storedProc, new List <QueryParameter>()
            {
                parm
            }));
        }
Exemple #15
0
    public LoadObject Load(RESOURCE_CATEGORY category, string package_name, string[] resource_names, bool cache_package = false)
    {
        LoadObject loadObject = new LoadObject(monoBehaviour, category, package_name, resource_names, cache_package);

        if (loadObject.isLoading)
        {
            loadQueue.Enqueue(loadObject);
        }
        return(loadObject);
    }
	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 void AssignVariables()
 {
     savedata        = new SaveData();
     sceneController = GetComponent <SceneController>();
     lObjGame        = objGameController.GetComponent <LoadObject>();
     gCondition      = objGameController.GetComponent <GameCondition>();
     lvl             = lObjGame.GetLevel;
     objPlayer       = lObjGame.GetPlayer;
     playerPoints    = objPlayer.GetComponent <PlayerPoints>();
     playerHealth    = objPlayer.GetComponent <PlayerHealth>();
 }
    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();
    }
Exemple #19
0
        public CachedObject(LoadObject loadObject, int cacheSeconds)
        {
            if (loadObject == null)
            {
                throw new ArgumentNullException("loadObject");
            }

            _loadObject   = loadObject;
            _cacheSeconds = cacheSeconds;
            _cache        = HttpContext.Current != null ? HttpContext.Current.Cache : new Cache();
        }
        public LoadObject[] LoadUseResources(LoadingQueue load_queue)
        {
            LoadObject[] array = new LoadObject[useResourceList.Count];
            int          i     = 0;

            for (int count = useResourceList.Count; i < count; i++)
            {
                array[i] = load_queue.LoadAndInstantiate(RESOURCE_CATEGORY.UI, useResourceList[i]);
            }
            return(array);
        }
Exemple #21
0
    public void CacheSE(int se_id, List <LoadObject> los = null)
    {
        string sEPackage = ResourceName.GetSEPackage(se_id);

        string[] resource_names = new string[1]
        {
            ResourceName.GetSE(se_id)
        };
        LoadObject item = Load(RESOURCE_CATEGORY.SOUND_SE, sEPackage, resource_names, false);

        los?.Add(item);
    }
Exemple #22
0
    public void CacheActionVoice(int voice_id, List <LoadObject> los = null)
    {
        string actionVoicePackageNameFromVoiceID = ResourceName.GetActionVoicePackageNameFromVoiceID(voice_id);

        string[] resource_names = new string[1]
        {
            ResourceName.GetActionVoiceName(voice_id)
        };
        LoadObject item = Load(RESOURCE_CATEGORY.SOUND_VOICE, actionVoicePackageNameFromVoiceID, resource_names, false);

        los?.Add(item);
    }
Exemple #23
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);
    }
    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);
    }
Exemple #25
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();
    }
Exemple #26
0
    public void CacheItemIcon(int icon_id, List <LoadObject> los = null)
    {
        string itemIcon     = ResourceName.GetItemIcon(icon_id);
        byte   hash         = (byte)Utility.GetHash(itemIcon);
        string package_name = RESOURCE_CATEGORY.ICON_ITEM.ToHash256String(hash);

        string[] resource_names = new string[1]
        {
            itemIcon
        };
        LoadObject item = Load(RESOURCE_CATEGORY.ICON_ITEM, package_name, resource_names, false);

        los?.Add(item);
    }
Exemple #27
0
    private IEnumerator DoLoadSkillItemSymbol(SkillItemTable.SkillItemData data)
    {
        LoadObject lo = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemSymbolModel(data.iconID));

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

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

        item.set_localPosition(Vector3.get_zero());
        item.set_localRotation(Quaternion.get_identity());
        nodeMain    = item;
        displayInfo = MonoBehaviourSingleton <GlobalSettingsManager> .I.uiModelRendering.itemDisplayInfo;
        OnLoadFinished();
    }
Exemple #28
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();
    }
    void Start()
    {
        gController = GetComponent <GameController>();
        loadObj     = GetComponent <LoadObject> ();
        GameObject player = loadObj.GetPlayer;

        if (player != null)
        {
            playerHealth = player.GetComponent <PlayerHealth> ();
            playerPoins  = player.GetComponent <PlayerPoints> ();
        }
        Time.timeScale = 1.0f;
        lvl            = loadObj.GetLevel;
    }
    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);
    }