using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pcd_g1
{
    class SwimmingBabbleCharacterStageObject : CharacterStageObject
    {
        public SwimmingBabbleCharacterStageObject(int x, int y, Stage stg)
            : base(x, y, stg)
        {
            isFloating = true;
        }

        public override void Update(int keyStatus, out int vx, out int vy)
        {
            speedX = 6;

            base.Update(keyStatus, out vx, out vy);
        }

        int animCount = 0;
        public override void Draw(System.Drawing.Graphics g, int width, int height)
        {
            string imgname;
            if (animCount < 20)
            {
                imgname = "333-1";
            }
            else if (animCount < 40)
            {
                imgname = "333-2";
            }
            else
            {
                imgname = "333-3";
            }
            g.DrawImage(ImageManager.Search(imgname),0,0);
            if (++animCount > 60) animCount = 0;
        }
    }
}
