Ejemplo n.º 1
0
    // Token: 0x0600234E RID: 9038 RVA: 0x0040F178 File Offset: 0x0040D378
    private ushort createActor(byte kind, byte tier, byte texNo)
    {
        ushort num = (ushort)(kind * 10 + tier);

        if (!SheetAnimInfo.Instance.containMesh(num))
        {
            SheetAnimInfo.Instance.createMesh(num);
        }
        this.MainObj    = new GameObject("AnimMesh");
        this.meshShower = this.MainObj.AddComponent <MeshFilter>();
        MeshRenderer meshRenderer = this.MainObj.AddComponent <MeshRenderer>();

        meshRenderer.castShadows    = false;
        meshRenderer.receiveShadows = false;
        meshRenderer.sharedMaterial = this.TexNoToMat((int)texNo);
        this.meshRenderer           = meshRenderer.renderer;
        this.transform = this.MainObj.transform;
        sAnimInfo animInfo = SheetAnimInfo.Instance.getAnimInfo(num, 0);

        if (animInfo.animMesh != null)
        {
            this.keyframeCount = animInfo.keyframeCount;
            this.curAnimMesh   = animInfo.animMesh;
            this.animLength    = animInfo.animLength;
        }
        return(num);
    }
Ejemplo n.º 2
0
    // Token: 0x0600234F RID: 9039 RVA: 0x0040F250 File Offset: 0x0040D450
    private ushort createFO(byte kind, byte tier)
    {
        ushort num = (ushort)(kind * 10 + tier);

        if (!SheetAnimInfo.Instance.containMesh(num * 10))
        {
            SheetAnimInfo.Instance.createAnimFO(num);
        }
        this.MainObj    = new GameObject("AnimFO");
        this.meshShower = this.MainObj.AddComponent <MeshFilter>();
        MeshRenderer meshRenderer = this.MainObj.AddComponent <MeshRenderer>();

        meshRenderer.castShadows    = false;
        meshRenderer.receiveShadows = false;
        meshRenderer.sharedMaterial = SheetAnimInfo.GetMaterial(ESheetMeshTexKind.WAR_BLUE);
        this.meshRenderer           = meshRenderer.renderer;
        this.transform = this.MainObj.transform;
        sAnimInfo animFOInfo = SheetAnimInfo.Instance.getAnimFOInfo(num);

        if (animFOInfo.animMesh != null)
        {
            this.keyframeCount = animFOInfo.keyframeCount;
            this.curAnimMesh   = animFOInfo.animMesh;
            this.animLength    = animFOInfo.animLength;
        }
        return(num);
    }
Ejemplo n.º 3
0
    // Token: 0x06002344 RID: 9028 RVA: 0x0040EF4C File Offset: 0x0040D14C
    public void createCastleGate(ushort modelID)
    {
        if (this.m_MeshList.ContainsKey(modelID * 100))
        {
            return;
        }
        this.StringInstance.Length = 0;
        this.StringInstance.AppendFormat("Role/CastleGate_{0:00}", modelID);
        AssetBundle assetBundle = AssetManager.GetAssetBundle(this.StringInstance.ToString(), 0L);
        GameObject  gameObject  = UnityEngine.Object.Instantiate(assetBundle.mainAsset) as GameObject;
        MeshFilter  component   = gameObject.GetComponent <MeshFilter>();

        Mesh[] animMesh = new Mesh[]
        {
            component.mesh
        };
        sAnimInfo value = default(sAnimInfo);

        value.animLength    = 0f;
        value.keyframeCount = 1;
        value.animMesh      = animMesh;
        this.m_CastleGateList.Add((uint)modelID, value);
        this.m_MeshList.Add(modelID * 100, 1);
        UnityEngine.Object.Destroy(gameObject);
        assetBundle.Unload(true);
    }