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();
    }
    protected override ModelLoaderBase LoadModel()
    {
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0025: Expected O, but got Unknown
        bool useSpecialModel = false;

        if (npcData.specialModelID > 0)
        {
            useSpecialModel = true;
        }
        return(npcData.LoadModel(this.get_gameObject(), true, true, null, useSpecialModel));
    }
Esempio n. 3
0
    private void LoadModel()
    {
        //IL_0085: Unknown result type (might be due to invalid IL or missing references)
        //IL_0099: Expected O, but got Unknown
        DeleteModel();
        targetTex = UI.TEX_NPC;
        InitRenderTexture(targetTex, 45f, false);
        model   = Utility.CreateGameObject("NPC", GetRenderTextureModelTransform(targetTex), GetRenderTextureLayer(targetTex));
        npcData = Singleton <NPCTable> .I.GetNPCData(message.npc);

        isLoading = true;
        npcData.LoadModel(model.get_gameObject(), false, false, OnModelLoadComplete, false);
    }
Esempio n. 4
0
    protected override ModelLoaderBase LoadModel()
    {
        //IL_004c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0055: Expected O, but got Unknown
        bool useSpecialModel = false;

        HomeThemeTable.HomeThemeData homeThemeData = Singleton <HomeThemeTable> .I.GetHomeThemeData(Singleton <HomeThemeTable> .I.CurrentHomeTheme);

        if (homeThemeData != null && (npcData.specialModelID > 0 || homeThemeData.name != "NORMAL"))
        {
            useSpecialModel = true;
        }
        return(npcData.LoadModel(this.get_gameObject(), true, true, null, useSpecialModel));
    }
Esempio n. 5
0
    public static StoryCharacter Initialize(int id, UITexture ui_tex, string _name, string _dir, string idle_anim)
    {
        //IL_0056: Unknown result type (might be due to invalid IL or missing references)
        //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e3: Expected O, but got Unknown
        //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00fe: Expected O, but got Unknown
        NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData(_name);

        if (nPCData == null)
        {
            return(null);
        }
        UIRenderTexture uIRenderTexture = UIRenderTexture.Get(ui_tex, -1f, true, -1);

        uIRenderTexture.Disable();
        uIRenderTexture.nearClipPlane = 1f;
        uIRenderTexture.farClipPlane  = 100f;
        Transform      val            = Utility.CreateGameObject("StoryModel", uIRenderTexture.modelTransform, uIRenderTexture.renderLayer);
        StoryCharacter storyCharacter = val.get_gameObject().AddComponent <StoryCharacter>();

        storyCharacter.model     = val;
        storyCharacter.id        = id;
        storyCharacter.renderTex = uIRenderTexture;
        storyCharacter.uiTex     = ui_tex;
        storyCharacter.charaName = _name;
        storyCharacter.aliasName = string.Empty;
        storyCharacter.SetStandPosition(_dir, false);
        if (string.IsNullOrEmpty(idle_anim))
        {
            storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(nPCData.anim);
        }
        else
        {
            storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(idle_anim);
        }
        storyCharacter.isLoading = true;
        ModelLoaderBase modelLoaderBase = nPCData.LoadModel(val.get_gameObject(), false, false, storyCharacter.OnModelLoadComplete, false);

        storyCharacter.npcLoader = (modelLoaderBase as NPCLoader);
        storyCharacter.CollectTween(ui_tex.get_transform());
        return(storyCharacter);
    }
    private IEnumerator DoInitialize()
    {
        SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo;

        magiLoader = new GameObject("magimodel").AddComponent <ItemLoader>();
        int wait3 = 1;

        magiLoader.LoadSkillItem(skillItemInfo.tableID, magiLoader.get_transform(), magiLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003C_003Ef__this.magiLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003Cwait_003E__1--;
        });
        wait3++;
        magiSymbolLoader = new GameObject("magisymbol").AddComponent <ItemLoader>();
        magiSymbolLoader.LoadSkillItemSymbol(skillItemInfo.tableID, magiSymbolLoader.get_transform(), magiSymbolLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003C_003Ef__this.magiSymbolLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003Cwait_003E__1--;
        });
        LoadingQueue loadingQueue = new LoadingQueue(this);
        LoadObject   lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "GrowSkillDirection", false);

        LoadObject[] materialLoadObjects = new LoadObject[materials.Length];
        for (int j = 0; j < materials.Length; j++)
        {
            SkillItemTable.SkillItemData data = Singleton <SkillItemTable> .I.GetSkillItemData(materials[j].tableID);

            materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(data.modelID), false);
        }
        wait3++;
        NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3);

        GameObject npcRoot = new GameObject("NPC");

        npcData.LoadModel(npcRoot, false, true, delegate
        {
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0224: stateMachine*/)._003Cwait_003E__1--;
        }, false);
        CacheAudio(loadingQueue);
        yield return((object)loadingQueue.Wait());

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

        GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length];
        for (int i = 0; i < materials.Length; i++)
        {
            SkillItemTable.SkillItemData data2 = Singleton <SkillItemTable> .I.GetSkillItemData(materials[i].tableID);

            Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1);
            PlayerLoader.SetEquipColor(item, data2.modelColor.ToColor());
            materialObjects[i] = item.get_gameObject();
        }
        magiLoader.nodeMain.get_gameObject().SetActive(true);
        magiSymbolLoader.nodeMain.get_gameObject().SetActive(true);
        SkillGrowDirector d = directionTransform.GetComponent <SkillGrowDirector>();

        d.Init();
        d.SetNPC(npcRoot);
        d.SetMagiModel(magiLoader.get_gameObject(), magiSymbolLoader.get_gameObject(), materialObjects);
        d.SetMaterials(materials);
        director = d;
        base.Initialize();
    }
    private IEnumerator TEst()
    {
        this.get_gameObject().AddComponent <ResourceManager>();
        SkillItemInfo s = new SkillItemInfo();

        s.tableData         = new SkillItemTable.SkillItemData();
        s.tableData.type    = SKILL_SLOT_TYPE.ATTACK;
        s.tableData.modelID = 1;
        SetMaterials(new List <SkillItemInfo>
        {
            s,
            s,
            s,
            s,
            s
        }.ToArray());
        LoadingQueue loadingQueue = new LoadingQueue(this);
        LoadObject   lo           = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(tmpid), false);
        LoadObject   lo_symbol    = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetItemModel(80000001), false);

        LoadObject[] materialLoadObjects = new LoadObject[materials.Length];
        for (int j = 0; j < materials.Length; j++)
        {
            materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(Random.Range(1, 5)), false);
        }
        LoadObject npcTableLoadObject = loadingQueue.Load(RESOURCE_CATEGORY.TABLE, "NPCTable", false);

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

        TextAsset tableCSV = npcTableLoadObject.loadedObject as TextAsset;

        if (!Singleton <NPCTable> .IsValid())
        {
            Singleton <NPCTable> .Create();

            Singleton <NPCTable> .I.CreateTable(tableCSV.get_text());
        }
        bool wait = true;

        NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3);

        npcData.LoadModel(npcParent.get_gameObject(), false, true, delegate
        {
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0016: Expected O, but got Unknown
            ((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003C_003Ef__this.SetNPC(((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003C_003Ef__this.npcParent.get_gameObject());
            ((_003CTEst_003Ec__Iterator130) /*Error near IL_0251: stateMachine*/)._003Cwait_003E__9 = false;
        }, false);
        GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length];
        for (int i = 0; i < materials.Length; i++)
        {
            Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1);
            materialObjects[i] = item.get_gameObject();
        }
        Transform magi       = ResourceUtility.Realizes(lo.loadedObject, -1);
        Transform magiSymbol = ResourceUtility.Realizes(lo_symbol.loadedObject, -1);

        SetMagiModel(magi.get_gameObject(), magiSymbol.get_gameObject(), materialObjects);
        while (wait)
        {
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0.2f));

        StartDirection(delegate
        {
        });
    }