Esempio n. 1
0
 public Actor(int w, int h, TextureComponent texturecomp, CollisionComponent collisioncomp)
 {
     textureComponent   = texturecomp;
     collisionComponent = collisioncomp;
     width  = w;
     height = h;
 }
Esempio n. 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;
 }