Пример #1
0
 public override void Use(Player target)
 {
     target.HealthPoints += this.Health;
     if (target.HealthPoints > target.BaseHealthPoints)
     {
         target.HealthPoints = target.BaseHealthPoints;
         target.AddLive();
     }
 }
Пример #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            this.BackgroundSection = 0;
            this.Enemies = new List<Enemy>();
            Drops = new List<Item>();
            Player = new Player(PlayerStartX, PlayerStartY, StandartWidth, StandartHeight, "Pesho");

            this.Enemies = GameLevel.InitializeEnemies();

            this.BarSize = (int)Math.Floor(167.0 / this.Enemies.Count) - 2;
            this.Objects = new List<Obsticle>
            {
                new Boundary(0, ScreenHeight - FieldHeight, FieldWidth, 10),
                new Boundary(ScreenWidth, ScreenHeight - FieldHeight, 10, FieldHeight),
                new Boundary(0, ScreenHeight - FieldHeight, 10, FieldHeight),
                new Boundary(0, ScreenHeight, FieldWidth, 10)
            };

            this.Slider = 0;
            this.FadeInCounter = 0;
            this.FadeOutCounter = 255;

            //this.IsPlaying = true;

            this.LevelChanged = false;

            this.FrameHandlerVariable = new FrameHandler();

            base.Initialize();
        }
Пример #3
0
 public override void Use(Player target)
 {
     target.SetWeapon(this);
 }
Пример #4
0
 public override void Use(Player target)
 {
     target.SetArmor(this);
 }
 public override void Use(Player target)
 {
     target.ImmortalDuration += this.Duration;
 }
Пример #6
0
 public abstract void Use(Player target);