예제 #1
0
        protected override void Initialize()
        {
            this.Window.Title             = "SharpEngine v0.1 [F1 for Editor]";
            this.Window.AllowUserResizing = true;
            this.IsFixedTimeStep          = false;
            this.IsMouseVisible           = false;

            //create and register components
            this.Components.Add(InputMgr.Create(this));
            this.Components.Add(EntityMgr.Create(this));
            this.Components.Add(GraphicsMgr.Create(this));
            this.Components.Add(ResourceMgr.Create(this));
            this.Components.Add(Editor.Create(this));

            base.Initialize();

            //HACK create our main free camera
            FreeCamera freecam = new FreeCamera();

            freecam.Name = "MainCamera";

            EntityMgr entityMgr = EntityMgr.Instance;

            entityMgr.AddEntity(freecam);
            GraphicsMgr.Instance.Camera = freecam;

            Light light = new LightPoint();

            light.Name = "Light0";
            light.ID   = 1;
            entityMgr.AddEntity(light);
            light      = new LightPoint();
            light.Name = "Light1";
            light.ID   = 2;
            entityMgr.AddEntity(light);
            light      = new LightPoint();
            light.Name = "Light2";
            light.ID   = 3;
            entityMgr.AddEntity(light);
            light      = new LightDirectionnal();
            light.Name = "Light3";
            light.ID   = 4;
            entityMgr.AddEntity(light);
        }
예제 #2
0
 public static InputMgr Create(Game game)
 {
     sInstance = new InputMgr(game);
     return(sInstance);
 }