public static void SetLoadingInfo(string path, EventTriggerStageLoader.LoadComplete LoadCompleteFunc)
    {
        string text = string.Empty;

        if (!NrTSingleton <NrGlobalReference> .Instance.isLoadWWW)
        {
            text = string.Format("{0}{1}.xml", CDefinePath.XMLPath(), path);
        }
        else if (!NrTSingleton <NrGlobalReference> .Instance.useCache)
        {
            text = string.Format("{0}{1}.xml", CDefinePath.XMLPath(), path);
            EventTriggerStageLoader._ItemType = ItemType.USER_STRING;
        }
        else
        {
            if (TsPlatform.IsMobile)
            {
                text = string.Format("{0}{1}_mobile{2}", CDefinePath.XMLBundlePath(), path, Option.extAsset);
            }
            else
            {
                text = string.Format("{0}{1}{2}", CDefinePath.XMLBundlePath(), path, Option.extAsset);
            }
            EventTriggerStageLoader._ItemType = ItemType.USER_ASSETB;
        }
        path = text;
        EventTriggerStageLoader._Path         = path;
        EventTriggerStageLoader._LoadComplete = LoadCompleteFunc;
        EventTriggerStageLoader.HasLoadItem   = true;
        TsLog.Log("EventTriggerStageLoader.SetLoadingInfo({0}...)", new object[]
        {
            EventTriggerStageLoader._Path
        });
    }
    public bool ReadCutScneData(string fileName, int nCharKind, eCharAnimationType eAni, int nHide, int nAlly)
    {
        this.Clear();
        string text = string.Empty;

        if (!NrTSingleton <NrGlobalReference> .Instance.isLoadWWW)
        {
            string text2 = Option.GetProtocolRootPath(Protocol.FILE);
            text2 = text2.Substring("file:///".Length, text2.Length - "file:///".Length);
            text  = string.Format("{0}{1}{2}.xml", text2, CDefinePath.XMLPath(), fileName);
            this.ReadXML(text, null);
        }
        else
        {
            ItemType itemType;
            if (!NrTSingleton <NrGlobalReference> .Instance.useCache)
            {
                text     = string.Format("{0}{1}.xml", CDefinePath.XMLPath(), fileName);
                itemType = ItemType.USER_STRING;
            }
            else
            {
                if (TsPlatform.IsMobile)
                {
                    text = string.Format("{0}{1}_mobile{2}", CDefinePath.XMLBundlePath(), fileName, Option.extAsset);
                }
                else
                {
                    text = string.Format("{0}{1}{2}", CDefinePath.XMLBundlePath(), fileName, Option.extAsset);
                }
                itemType = ItemType.USER_ASSETB;
            }
            WWWItem wWWItem = Holder.TryGetOrCreateBundle(text, null);
            wWWItem.SetItemType(itemType);
            wWWItem.SetCallback(new PostProcPerItem(this.ReadXML), null);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
        }
        this.bLoadComplete        = false;
        this.nReservationCharKind = nCharKind;
        this.eReservationAni      = eAni;
        if (nHide != 0)
        {
            this.bHide     = true;
            this.nHideAlly = nAlly;
        }
        return(true);
    }
Example #3
0
    private void _Construct(string strFileName)
    {
        string text  = string.Empty;
        string text2 = string.Empty;

        if (Path.HasExtension(strFileName))
        {
            strFileName = Path.GetFileNameWithoutExtension(strFileName);
        }
        if (!NrTSingleton <NrGlobalReference> .Instance.isLoadWWW)
        {
            text               = CDefinePath.NDTPath();
            text2              = ".ndt";
            strFileName       += text2;
            this.m_strFilePath = Path.Combine(text, strFileName);
        }
        else
        {
            if (!NrTSingleton <NrGlobalReference> .Instance.useCache)
            {
                text  = CDefinePath.NDTPath();
                text2 = ".ndt";
            }
            else
            {
                text  = CDefinePath.XMLBundlePath();
                text2 = ".assetbundle";
                if (strFileName.Contains("/"))
                {
                    int num = strFileName.IndexOf("/");
                    if (num < strFileName.Length)
                    {
                        strFileName = strFileName.Substring(num + 1);
                    }
                }
            }
            if (NrTSingleton <NrGlobalReference> .Instance.useCache && TsPlatform.IsMobile)
            {
                strFileName += "_mobile";
            }
            this.m_strFilePath = string.Format("{0}{1}{2}", text, strFileName, text2);
            this.m_wItem       = this.CreateRequest();
        }
    }