Exemplo n.º 1
0
    public static void Load(string dataPath, int uniqueID, Vector3 position, Quaternion rotation, Vector3 scale)
    {
        M2Data    m2Data = new M2Data();
        M2Texture m2Tex  = new M2Texture();

        m2Data.dataPath = dataPath;
        m2Data.uniqueID = uniqueID;
        m2Data.position = position;
        m2Data.rotation = rotation;
        m2Data.scale    = scale;

        try
        {
            ThreadWorking = true;

            ParseM2_Root(dataPath, m2Data, m2Tex);
            ParseM2_Skin(dataPath, m2Data);
            AllM2Data.Enqueue(m2Data);

            ThreadWorking = false;
        }
        catch (Exception ex)
        {
            Debug.Log("Error : Trying to parse M2 - " + dataPath);
            Debug.LogException(ex);
        }
    }
Exemplo n.º 2
0
    public static void Load(uint FileDataId, int uniqueID, Vector3 position, Quaternion rotation, Vector3 scale, CASCHandler Handler)
    {
        M2Data    m2Data = new M2Data();
        M2Texture m2Tex  = new M2Texture();

        m2Data.FileDataId = FileDataId;
        m2Data.uniqueID   = uniqueID;
        m2Data.position   = position;
        m2Data.rotation   = rotation;
        m2Data.scale      = scale;

        try
        {
            ThreadWorking = true;

            ParseM2_Root(FileDataId, m2Data, m2Tex, Handler);

            foreach (uint skinFile in SkinFiles)
            {
                ParseM2_Skin(skinFile, m2Data, Handler);
            }

            AllM2Data.Enqueue(m2Data);

            ThreadWorking = false;
        }
        catch (Exception ex)
        {
            Debug.Log("Error : Trying to parse M2 - " + FileDataId);
            Debug.LogException(ex);
        }
    }
Exemplo n.º 3
0
    public static void Load(uint FileDataId, int uniqueID, Vector3 position, Quaternion rotation, Vector3 scale, CASCHandler Handler)
    {
        M2Data    m2Data = new M2Data();
        M2Texture m2Tex  = new M2Texture();

        m2Data.FileDataId = FileDataId;
        m2Data.uniqueID   = uniqueID;
        m2Data.position   = position;
        m2Data.rotation   = rotation;
        m2Data.scale      = scale;

        ThreadWorking = true;

        ParseM2_Root(FileDataId, m2Data, m2Tex, Handler);

        foreach (uint skinFile in SkinFiles)
        {
            ParseM2_Skin(skinFile, m2Data, Handler);
        }

        AllM2Data.Enqueue(m2Data);

        ThreadWorking = false;
    }