コード例 #1
0
ファイル: SheetAnimMesh.cs プロジェクト: gsoec/lm-source
    // 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);
    }
コード例 #2
0
ファイル: SheetAnimMesh.cs プロジェクト: gsoec/lm-source
 // Token: 0x0600234D RID: 9037 RVA: 0x0040F164 File Offset: 0x0040D364
 private Material TexNoToMat(int TexID)
 {
     if (TexID >= 3)
     {
         return(null);
     }
     return(SheetAnimInfo.GetMaterial((ESheetMeshTexKind)TexID));
 }
コード例 #3
0
ファイル: FlyingObject.cs プロジェクト: gsoec/lm-source
 // Token: 0x0600232B RID: 9003 RVA: 0x0040DD10 File Offset: 0x0040BF10
 private void EndingCheck()
 {
     if (this.ScaleRoot != null)
     {
         MeshRenderer component = this.SourceObj.GetComponent <MeshRenderer>();
         if (component != null)
         {
             component.sharedMaterial = SheetAnimInfo.GetMaterial(ESheetMeshTexKind.WAR_BLUE);
         }
         this.ScaleRoot = null;
     }
 }
コード例 #4
0
ファイル: WarCastle.cs プロジェクト: gsoec/lm-source
    // Token: 0x06002398 RID: 9112 RVA: 0x004125D0 File Offset: 0x004107D0
    private GameObject loadModel(AssetBundle bundle, Vector3 pos, Vector3 rotate)
    {
        GameObject        gameObject        = UnityEngine.Object.Instantiate(bundle.mainAsset) as GameObject;
        int               sceneLightmapSize = LightmapManager.Instance.SceneLightmapSize;
        int               lightmapIndex     = 2 + sceneLightmapSize;
        MeshRenderer      component         = gameObject.GetComponent <MeshRenderer>();
        ESheetMeshTexKind kind = (!WarManager.IsNpcModeEnable) ? ESheetMeshTexKind.WAR_BLUE : ESheetMeshTexKind.WAR_GRAY;

        component.material                 = SheetAnimInfo.GetMaterial(kind);
        component.lightmapIndex            = lightmapIndex;
        gameObject.transform.parent        = this.castleRoot;
        gameObject.transform.localPosition = pos;
        gameObject.transform.Rotate(rotate);
        return(gameObject);
    }
コード例 #5
0
    // Token: 0x06002337 RID: 9015 RVA: 0x0040E584 File Offset: 0x0040C784
    private void initFlyingObject(FOKind foKind, ushort objKind, string filename, int count, int ambient)
    {
        if (count <= 0)
        {
            return;
        }
        GameObject  gameObject  = null;
        AssetBundle assetBundle = null;

        if (objKind == 0)
        {
            if (filename != string.Empty)
            {
                this.StringInstance.Length = 0;
                this.StringInstance.AppendFormat("Role/{0}", filename);
                assetBundle = AssetManager.GetAssetBundle(this.StringInstance.ToString(), 0L);
                gameObject  = (assetBundle.mainAsset as GameObject);
                MeshRenderer component = gameObject.GetComponent <MeshRenderer>();
                component.material = SheetAnimInfo.GetMaterial(ESheetMeshTexKind.WAR_BLUE);
                component.renderer.lightmapIndex = ambient;
                MeshFilter component2 = gameObject.GetComponent <MeshFilter>();
            }
        }
        else
        {
            gameObject = this.particleMgr.SpawnWithoutManager(objKind);
        }
        List <FlyingObject> list = this.freeList[(int)foKind];

        for (int i = 0; i < count; i++)
        {
            GameObject gameObject2 = null;
            if (gameObject != null)
            {
                gameObject2 = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
                gameObject2.transform.position = Vector3.zero;
                gameObject2.transform.parent   = this.renderRoot;
                gameObject2.SetActive(false);
            }
            list.Add(new FlyingObject
            {
                SourceObj = gameObject2,
                foKind    = foKind
            });
        }
        this.bundleList[(int)foKind] = assetBundle;
    }