示例#1
0
 protected override void OnAttached()
 {
     bufferModel             = new Sprite2DBufferModel();
     bufferModel.Sprites     = Sprites;
     bufferModel.SpriteCount = SpriteCount;
     if (texture != null)
     {
         (RenderCore as Sprite2DRenderCore).UpdateTexture(texture, EffectTechnique.EffectsManager.MaterialTextureManager);
     }
     base.OnAttached();
 }
示例#2
0
 protected override void OnAttached()
 {
     bufferModel             = Collect(new Sprite2DBufferModel());
     bufferModel.Sprites     = Sprites;
     bufferModel.SpriteCount = SpriteCount;
     if (texture != null)
     {
         TextureView = Collect(EffectTechnique.EffectsManager.MaterialTextureManager.Register(texture, true));
     }
     base.OnAttached();
 }
示例#3
0
 protected override void OnDetach()
 {
     bufferModel = null;
     TextureView = null;
     base.OnDetach();
 }