Ejemplo n.º 1
0
 public Wall(string name, UIColor color, SizeF size) : base(color, size)
 {
     Name                           = name;
     PhysicsBody                    = SKPhysicsBody.BodyWithRectangleOfSize(size);
     PhysicsBody.Dynamic            = true;
     PhysicsBody.CategoryBitMask    = (uint)Category;
     PhysicsBody.ContactTestBitMask = (uint)Categories.Head;
     PhysicsBody.CollisionBitMask   = 0;
 }
Ejemplo n.º 2
0
 public Head(UIColor color, SizeF size, int rowLocation, int columnLocation) : base(color, size)
 {
     PhysicsBody                  = SKPhysicsBody.BodyWithRectangleOfSize(size); // Creates a physics body for the sprite
     PhysicsBody.Dynamic          = true;                                        // The physics engine will not control the movement of the monster.
     PhysicsBody.CategoryBitMask  = (uint)Category;                              // Sets the category bit mask
     PhysicsBody.CollisionBitMask = 0;                                           // Prevents for bouncing
     RowLocation                  = rowLocation;                                 // The row where sprite will appear
     ColumnLocation               = columnLocation;                              // The column where sprite will appear
     Position = GetLocation();                                                   // Calculates the Initial position where sprite will appear, depending of the row and column
 }