Equripment.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Tank_11_14.Properties;

namespace Tank_11_14
{
    class Equripment:Module
    {
        private static Image imgStar = Resources.star;
        private static Image imgBomb = Resources.bomb;
        private static Image imgTimer = Resources.timer;
        //表示那个物品
        private int flag;

        public int Flag
        {
            get { return flag; }
            set { flag = value; }
        }
        public Equripment(int x, int y, int flag):base(x,y,imgStar.Width,imgStar.Height)
        {
            this.flag = flag;
            this.Height = 40;
            this.Width = 40;
        }
        //根据不同的标志画出不同的图像
        public override void Draw(Graphics g)
        {
            switch(flag)
            {
                case 0:
                    g.DrawImage(imgStar, this.X, this.Y);
                    break;
                case 1:
                    g.DrawImage(imgBomb, this.X, this.Y);
                    break;
                case 2:
                    g.DrawImage(imgTimer, this.X, this.Y);
                    break;
                default:
                    break;
                
            }
        }


    }
}

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

AI 解读 AI

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

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