예제 #1
0
        public Enemy(GridSheet sheet, GraphicsDevice gd, Player player) : base(gd)
        {
            GSheet    = sheet;
            playerRef = player;

            AddAnimation(new int[] { 0, 1, 0, 2 }, 0, "walkdown");
            AddAnimation(new int[] { 0, 1, 0, 2 }, 1, "walkup");
            AddAnimation(new int[] { 0, 1, 0, 2 }, 2, "walkleft");
            AddAnimation(new int[] { 0, 1, 0, 2 }, 3, "walkright");

            Speed = 45f;

            SetHealth(10);
            SetDamage(1, 3);
            SetExp((int)Rng.NoxtDouble((Health / 2) * 0.8, (Health / 2) * 1.2));
            Console.WriteLine(MaxExp);
            KnockbackPower      = 2f;
            HealthBar.BarHeight = 2;
            HealthBar.BarWidth  = 16;
            HealthBar.distanceBetweenObjectY = -4;
        }