コード例 #1
0
ファイル: SimpleBuildings.cs プロジェクト: temik911/audio
        public SimpleBuildings(Game game, List<SimpleBuilding> buildings, LayerServiceConfig config)
            : base(game, config)
        {
            var rs = game.GraphicsDevice;
            var ml = Game.GetService<LayerService>().MapLayer;

            constBuffer = rs.CreateConstBuffer<ConstData>();
            drawShader	= rs.CreateUberShader("SimpleBuildings.hlsl", typeof(BuildingsFlags));

            vertexBuffer = rs.CreateVertexBuffer(typeof(SimpleBuilding), buildings.Count);
            vertexBuffer.SetData(buildings.ToArray(), 0, buildings.Count);

            //MeshInstance mi = new MeshInstance(rs, GenerateMesh(buildings), Matrix.Scaling(ml.Zoom)*Matrix.Translation(ml.Offset.X, 0.0f, ml.Offset.Y), "Ololo");
            //rs.Instances.Add(mi);
        }
コード例 #2
0
ファイル: LayerService.cs プロジェクト: nkast/FusionFramework
 public LayerService(Game game) : base(game)
 {
     Config = new LayerServiceConfig();
 }