public static Medcit FromMetadata(MedcitMetadata metadata, ContentManager contentManager) { var medcit = new Medcit(); medcit.IsReuseble = true; medcit.ReuseTime = metadata.ReuseTime; medcit.InventoryTexture = contentManager.Load<Texture2D>(metadata.AssetName); medcit.HealingValue = metadata.HealingValue; medcit.SlotIndex = 2; return medcit; }
public override void Initialize(Game game) { base.Initialize(game); Medcit = Medcit.FromMetadata(game.Content.Load<MedcitMetadata>(UpgradeName), game.Content); DrawRectangle = new Rectangle((int)(Position.X + ComponentOffsetLeft + MedcitShopItemOffset), (int)(Position.Y + ComponentOffsetTop), 64, 64); }