Missile.cs

(完整代码) 813B

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

namespace Tank_11_14
{
    public abstract class Missile:Member
    {
        public int power;//子弹威力
        public Missile(Roles role, int life, int width, int height, int speed, int power)
            : base(role.X + role.Width / 2 - 6, role.Y + role.Hight/ 2 - 6, life, width, height, speed, role.dr)
        {
            this.power=power;
        }
        //子弹的移动
        public override void  Move()
        {
            if (this.X < 0 || this.X > 660 || this.Y < 0 || this.Y > 660)
            {
                this.Life = 0;//如果子弹出边界,子弹的生命力为0
            }
            Adjustdirection();  //调用判断方向的方法
        }

    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。