Gift.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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


namespace 全民英雄
{
    /// <summary>
    /// 礼物类
    /// </summary>
    class Gift
    {

        public Point locatin;//道具出来时的位置
        public Image[] imagepower;  //道具显示的图片
        public int indexpower;//道具闪动标志
        Boolean iseat;

        public Boolean Iseat
        {
            get { return iseat; }
            set { iseat = value; }
        }
        public Gift()
        {
            iseat = false;
            locatin = new Point();
            imagepower = new Image[]
            {   Resource1.power_1,
                Resource1.power_2};
            indexpower = 0;
        }

        /// <summary>
        /// 绘制道具道具
        /// </summary>
        /// <param name="g">绘图工具</param>
        public void Draw(Graphics g)
        {
            if (!iseat)
            {
                g.DrawImage(imagepower[indexpower], locatin);
                indexpower = 1 - indexpower; 
            }
        
        }

        public void Move()
        {
            locatin.Y += 5;
        }
        /// <summary>
        /// 获取每一个奖励的位置
        /// </summary>
        /// <returns></returns>
        public Rectangle GiftRec()
        {
            return new Rectangle(this.locatin, this.imagepower[indexpower].Size);
后面还有 3 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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