Пример #1
0
 public GameButton(SpriteManager.ESprite s, Vector2 pos, PlayerControl.HandlerAction act)
     : base(App.Game)
 {
     btnState = ButtonState.Released;
     handler = act;
     type = s;
     coord = new Rectangle((int)pos.X, (int)pos.Y, (int)Constants.Measures.buttonSize, (int)Constants.Measures.buttonSize);
 }
Пример #2
0
 public Block(SpriteManager.ESprite color, ATetrimino cont, float transpar = 1f)
     : base(App.Game)
 {
     this.color = color;
     container = cont;
     hitBox = Rectangle.Empty;
     this.transparency = transpar;
 }
Пример #3
0
 public ATetrimino(SpriteManager.ESprite color, CoordHelper.EProfile pt, float transparency = 1f, bool shadow = false)
     : base(App.Game)
 {
     PlayerType = pt;
     orientation = 0;
     posRel = new Vector2(3, -3);
     orientations = new List<Action>();
     orientations.Add(pos1);
     shape = new List<Block>();
     shape.Add(new Block((shadow ? SpriteManager.ESprite.NONE : color), this, transparency));
     shape.Add(new Block((shadow ? SpriteManager.ESprite.NONE : color), this, transparency));
     shape.Add(new Block((shadow ? SpriteManager.ESprite.NONE : color), this, transparency));
     shape.Add(new Block((shadow ? SpriteManager.ESprite.NONE : color), this, transparency));
     orientations[orientation].Invoke();
 }