Exemplo n.º 1
0
 public FleetRenderer(IContext context)
 {
     _context = context;
     _shader = context.Shaders.Get<LightShader>();
     _model = new ObjModel(context.DirectX.Device, "BasicBoat.obj", context.TextureManager.Create("Metal.png"));
     _baseOverlay = new TexturedRectangle(context, context.TextureManager.Create("fleet_overlay.dds", "Data/UI/"));
     _enemySubOverlay = new TexturedRectangle(context, context.TextureManager.Create("fleet_overlay_relation_enemy.dds", "Data/UI/"));
     _allySubOverlay = new TexturedRectangle(context, context.TextureManager.Create("fleet_overlay_relation_ally.dds", "Data/UI/"));
     _neutralSubOverlay = new TexturedRectangle(context, context.TextureManager.Create("fleet_overlay_relation_neutral.dds", "Data/UI/"));
     _mineSubOverlay = new TexturedRectangle(context, context.TextureManager.Create("fleet_overlay_relation_mine.dds", "Data/UI/"));
     foreach (Fleet fleet in context.World.FleetManager.Fleets)
         OnNewFleet(context, fleet);
     context.NotificationResolver.FleetMoved += f => OnFleetUpdate(context, f);
 }
Exemplo n.º 2
0
Arquivo: Sky.cs Projeto: ndech/Alpha
 public Sky(IContext context)
 {
     _skydome = new ObjModel(context.DirectX.Device, "skydome.obj", context.TextureManager.Create("Sky.png"));
     _shader = context.Shaders.Get<LightShader>();
 }