public override void LoadContent() { this.graphicDefinition = UnitContentManager.LoadGraphicDefinition(this.unittype.UnitEntityType); //this.destinationRectangle.Width = this.graphicDefinition.SpriteSize.Width; //this.destinationRectangle.Height = this.graphicDefinition.SpriteSize.Height; this.unittype = null; base.LoadContent(); }
public override void Initialize(IRequestUnitService componentServices, IServiceProvider gameServices) { this.unittype = componentServices.RequestService<IUnitEntityType>(); // should be a service, this.destinationRectangle.X = 50; this.destinationRectangle.Y = 50; base.Initialize(componentServices, gameServices); }