Esempio n. 1
0
        protected UnitEntity buildCube()
        {
            UnitEntity   e            = new UnitEntity();
            UnitServices unitservices = new UnitServices();

            unitservices.AddService(typeof(IUnitEntityType), e);

            GraphicComponent graphic = new GraphicComponent(); // get provided services

            // init each component
            initializeComponent(graphic, unitservices);
            graphic.LoadContent();

            e.Components.Add(graphic);
            return(e);
        }
Esempio n. 2
0
 protected void initializeComponent(BaseUnitComponent component, UnitServices unitServices)
 {
     component.Initialize(unitServices, this.serviceProvider);
 }