Example #1
0
        public override void Move(Direction dir)
        {
            base.Move(dir);

            Drawer.ImgType img_type = Drawer.ImgType.HeroDown;

            switch (dir)
            {
            case Direction.West:
                img_type = Drawer.ImgType.HeroLeft;
                drawer.MoveImage(this, img_type);
                break;

            case Direction.East:
                img_type = Drawer.ImgType.HeroRight;
                drawer.MoveImage(this, img_type);
                break;

            case Direction.North:
                img_type = Drawer.ImgType.HeroUp;
                drawer.MoveImage(this, img_type);
                break;

            case Direction.South:
                img_type = Drawer.ImgType.HeroDown;
                drawer.MoveImage(this, img_type);
                break;
            }
        }
Example #2
0
 public override void Move(Direction dir)
 {
     base.Move(dir);
     Drawer.ImgType img_type = Drawer.ImgType.BossDown;
     if (dir == Direction.East)
     {
         img_type = Drawer.ImgType.BossRight;
     }
     if (dir == Direction.North)
     {
         img_type = Drawer.ImgType.BossUp;
     }
     if (dir == Direction.South)
     {
         img_type = Drawer.ImgType.BossDown;
     }
     if (dir == Direction.West)
     {
         img_type = Drawer.ImgType.BossLeft;
     }
     drawer.MoveImage(this, img_type);
 }