예제 #1
0
파일: Medcit.cs 프로젝트: sergik/Cardio
        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;
        }
예제 #2
0
 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);
 }