Example #1
0
 public ActorContainer(Space space, ModelDrawer modelDrawer, LineDrawer constraintDrawer, LightDrawer lightDrawer)
 {
     _space = space;
     _meshes = new List<LPPMesh>();
     _deleteList = new List<Actor>();
     _actors = new List<Actor>();
     _components = new List<Component>();
     _modelDrawer = modelDrawer;
     _constraintDrawer = constraintDrawer;
     _lightDrawer = lightDrawer;
     _actorDictionary = new Dictionary<string, Actor>();
     Content = Game1.thegame.Content;
 }
Example #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            Manager = new Manager(this, graphics, "Default");
            Manager.AutoCreateRenderTarget = true;
            Manager.Initialize();

            ModelDrawer = new BruteModelDrawer(this);
            ConstraintDrawer = new LineDrawer(this);
            LightDrawer = new LightDrawer(this);
            space = new Space();
            space.ForceUpdater.Gravity = new Vector3(0.0f, -10.0f, 0.0f);
            Actors = new ActorContainer(space, ModelDrawer, ConstraintDrawer, LightDrawer);

            base.Initialize();
        }