Beispiel #1
0
 public Actor(int w, int h, TextureComponent texturecomp, CollisionComponent collisioncomp)
 {
     textureComponent   = texturecomp;
     collisionComponent = collisioncomp;
     width  = w;
     height = h;
 }
Beispiel #2
0
 public Block(int width, int height, TextureComponent texturecomponent, CollisionComponent collisioncomponent) : base(width, height, texturecomponent, collisioncomponent)
 {
     if (width != height)
     {
         throw new Exception("Height of Block has to be equal to its width");
     }
     _size          = width;
     _structureSize = _size * _size;
 }