Exemple #1
0
 public Bullet(Sprite gun)
     : base("bullet")
 {
     _gun = gun;
     IsAnimating = false;
     FrameSize = new Point(12, 13);
 }
Exemple #2
0
 protected override void AddSprites()
 {
     var background = new BackGround("JnRLayer01");
     Add(background);
     var trre = new Sprite("Tree Tall");
     trre.SetSize(101, 171);
     trre.SetPosition(250, 250);
     var dragon = new AirDragon();
     dragon.SetPosition(350, 250);
     Add(dragon);
     Add(trre);
     AddRange(CreateBricks(BrickType.Grass, 20));
     CollisionDetection.RegisterSprites(this.OfType<Sprite>());
 }
 public static Sprite Colliding(Sprite sprite)
 {
     return Sprites.FirstOrDefault(s => s.Collided(sprite));
 }