private ShipModel(Model m, String name)
{
shipmodels.Add(name, this); //add to static dictionary of models
ship = m;
GraphicsDevice graphicsDevice = Game1.device;
Point center = Point.Zero;
m.Root.Transform = Matrix.CreateScale(10f);
basicEffect = new BasicEffect(Game1.device);
foreach (ModelMesh mesh in ship.Meshes)
{
foreach (ModelMeshPart part in mesh.MeshParts)
{
part.Effect = basicEffect;
}
}
// Create a BasicEffect, which will be used to render the primitive.
//basicEffect = new BasicEffect(graphicsDevice);
basicEffect.DiffuseColor = new Vector3(50, 50, 50);
basicEffect.EnableDefaultLighting();
}