示例#1
0
 public Sprite(Sprite.Type current)
 {
     this.current = current;
     this.i       = 7;
     this.j       = 1;
     _frames.Add(new Bitmap(@"..\..\images\dirt.bmp"));
     _frames.Add(new Bitmap(@"..\..\images\grass.bmp"));
     _frames.Add(new Bitmap(@"..\..\images\bush.bmp"));
 }
示例#2
0
 public Sprite(int i, int j, Sprite.Type current)
 {
     this.current = current;
     this.i       = i;
     this.j       = j;
     x            = i * size;
     y            = j * size;
     _frames.Add(new Bitmap(@"..\..\images\dirt.bmp"));
     _frames.Add(new Bitmap(@"..\..\images\grass.bmp"));
     _frames.Add(new Bitmap(@"..\..\images\bush.bmp"));
 }
示例#3
0
 public Sprite(int i, int j, Sprite.Type actual)
 {
     this.actual = actual;
     this.i      = i;
     this.j      = j;
     x           = i * size;
     y           = j * size;
     _frames.Add(new Bitmap(@"G:\Knights-Tour-v2.3\Game\images\horse.png"));
     _frames.Add(new Bitmap(@"G:\Knights-Tour-v2.3\Game\images\marbleb.png"));
     _frames.Add(new Bitmap(@"G:\Knights-Tour-v2.3\Game\images\marblew.png"));
     _frames.Add(new Bitmap(@"G:\Knights-Tour-v2.3\Game\images\marked.png"));
     _frames.Add(new Bitmap(@"G:\Knights-Tour-v2.3\Game\images\opcion.png"));
 }
示例#4
0
        public Text(float x, float y, string text, Sprite.Type type) : base(x, y)
        {
            words   = new List <string>();
            sprites = new List <Sprite>();
            timer   = new Timer(0);

            Dialogue = text;
            textType = type;
            maximumCharacterCount = text.Length * 2;
            compact = true;
            showAll = true;
            scale   = 1;

            BreakUpWords();
            CreateText();
        }
示例#5
0
        public Text(float x, float y, string dialogue, float scale, Sprite.Type type, Color color) : base(x, y)
        {
            words   = new List <string>();
            sprites = new List <Sprite>();
            timer   = new Timer(0);

            Dialogue = dialogue;
            textType = type;
            maximumCharacterCount = dialogue.Length * 2;
            compact    = true;
            showAll    = true;
            this.scale = scale;

            BreakUpWords();
            CreateText();
            SetColor(color);
        }
示例#6
0
        public Stopwatch(float x, float y, string currentTime, Type timerType, Sprite.Type spriteType) : base(x, y)
        {
            numbers = new List <Number>();
            sprites = new List <Sprite>();
            type    = timerType;
            int textWidth = 0;

            increment = type == Type.CountUp ? 1 : -1;

            switch (spriteType)
            {
            case Sprite.Type.Text8x8:
                textWidth = 8;
                break;
            }

            timer = new Timer(1000);

            int colonCount = 0;

            for (int i = 0; i < currentTime.Length; i++)
            {
                colonCount = currentTime.Substring(i, 1) == ":" ? ++colonCount : colonCount;
            }

            int offset = (int)X;
            int index  = 0;

            for (int i = 0; i < colonCount + 1; i++)
            {
                numbers.Add(new Number(offset, y, ParseTime(index, currentTime), 2, 60, spriteType));
                offset += textWidth * 2;
                if (i != colonCount)
                {
                    sprites.Add(new Sprite(offset, y, Sprite.Type.Colon8));
                }
                offset += 4;
                index  += 3;
            }
        }
示例#7
0
 public Sprite(Sprite.Type current)
 {
     this.current = current;
     this.i = 11;
     this.j = 1;
    _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\peon.bmp"));
     _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\torre.bmp"));
     _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\reina.bmp"));
     _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\caballo.bmp"));
 }
示例#8
0
        public Sprite(int i, int j, Sprite.Type current)
        {
            this.current = current;
            this.i=i;
            this.j=j;
            x = i * size;
            y = j * size;
            _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\peon.bmp"));
            _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\torre.bmp"));
            _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\reina.bmp"));
            _frames.Add(new Bitmap(@"C:\Users\Zero\Downloads\Game\Game\images\caballo.bmp"));

            
        }
示例#9
0
        public Number(float x, float y, int currentValue, int totalPlaceValue, int maxValue, Sprite.Type whatFont) : base(x, y)
        {
            MaxValue     = maxValue;
            CurrentValue = currentValue;

            sprites = new List <Sprite>();

            int textWidth = 0;

            switch (whatFont)
            {
            case Sprite.Type.Text8x8:
                textWidth = 8;
                break;
            }

            for (int i = totalPlaceValue - 1; i >= 0; i--)
            {
                sprites.Add(new Sprite((int)x + (textWidth * i), (int)y, whatFont));
            }

            Set(CurrentValue);
        }
示例#10
0
 public Text(float x, float y, string text, Sprite.Type type, int maximumCharacterCount, float textSpeed, float scale) : this(x, y, text, type, maximumCharacterCount, textSpeed)
 {
     this.scale = scale;
     CreateText();
 }
示例#11
0
 public Text(float x, float y, string text, Sprite.Type type, int maximumCharacterCount, float textSpeed) : this(x, y, text, type)
 {
     this.maximumCharacterCount = maximumCharacterCount;
     showAll = textSpeed <= 0 ? true : false;
     CreateText();
 }
示例#12
0
 public Text(float x, float y, string text, Sprite.Type type, float scale) : this(x, y, text, type)
 {
     this.scale = scale;
     CreateText();
 }
示例#13
0
    public Sprite(double i,double j,Sprite.Type anterior)
    {
        this.anterior = anterior;

            var x = i * size;
            var y = j * size;

            _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\horse.png"));
            _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\marked.png"));
    }
示例#14
0
 public Sprite(int i, int j, Sprite.Type current)
 {
     this.current = current;
         this.i = i;
         this.j = j;
         x = i * size;
         y = j * size;
         _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\horse.png"));
         _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\marbleb.png"));
         _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\marblew.png"));
         _frames.Add(new Bitmap(@"F:\Knights-Tour\Game\images\marked.png"));
 }
示例#15
0
 public Text(float x, float y, string dialogue, Sprite.Type type) : this(x, y, dialogue, 1, type, Color.White)
 {
 }
 public DamageEventArgs(Sprite _sprite, int _damage, Sprite.Type _damageType)
 {
     this.sprite = _sprite;
     this.damage = _damage;
     this.damageType = _damageType;
 }