Exemple #1
0
        protected void Load()
        {
            CoreComponents.LoadContent();
            Components.LoadContent();

            _Cube = new Content.Cube(this);
            _Cube.LoadContent();

            LoadContent();
        }
Exemple #2
0
        protected virtual void Initialize()
        {
            CoreComponents.Add(_Keyboard = new Keyboard(this));
            CoreComponents.Add(_Mouse    = new Mouse(this));
            CoreComponents.Add(_Camera   = new Camera(this));

            _ModelFactory    = new ModelFactory(this);
            _TextureFactory  = new TextureFactory(this);
            _EffectFactory   = new EffectFactory(this);
            _MaterialFactory = new MaterialFactory(this);
        }
Exemple #3
0
        protected void Unload()
        {
            Components.UnloadContent();
            CoreComponents.UnloadContent();

            if (_Cube != null)
            {
                _Cube.UnloadContent();
            }
            _Cube = null;

            ModelFactory.UnloadAll();
            MaterialFactory.UnloadAll();
            EffectFactory.UnloadAll();
            TextureFactory.UnloadAll();

            UnloadContent();
        }
Exemple #4
0
 private void Draw3D(EngineTime time, ref Matrix world, ref Matrix view, ref Matrix proj)
 {
     CoreComponents.Draw(time, ref world, ref view, ref proj);
     Components.Draw(time, ref world, ref view, ref proj);
 }
Exemple #5
0
 protected virtual void Update(EngineTime time)
 {
     CoreComponents.Update(time);
     Components.Update(time);
 }