Пример #1
0
 public function __construct(FrameBuffer $frameBuffer, ContainerInterface $container)
 {
     parent::__construct($frameBuffer, $container);
     $this->p1UpSprite = $this->bitmapLoader->loadSprite('joy_up', 6, 6);
     $this->p1DownSprite = $this->bitmapLoader->loadSprite('joy_down', 6, 17);
     $this->p2UpSprite = $this->bitmapLoader->loadSprite('joy_up', 35, 6);
     $this->p2DownSprite = $this->bitmapLoader->loadSprite('joy_down', 35, 17);
     $this->addSprite($this->p1UpSprite);
     $this->addSprite($this->p1DownSprite);
     $this->addSprite($this->p2UpSprite);
     $this->addSprite($this->p2DownSprite);
 }
Пример #2
0
 public function __construct(FrameBuffer $frameBuffer, ContainerInterface $container)
 {
     parent::__construct($frameBuffer, $container);
     $this->initializeGame($frameBuffer);
 }
Пример #3
0
 public function __construct(FrameBuffer $frameBuffer, ContainerInterface $container)
 {
     parent::__construct($frameBuffer, $container);
     $this->background = $this->bitmapLoader->loadBitmap('test_image');
 }
 public function __construct(FrameBuffer $frameBuffer, ContainerInterface $container)
 {
     parent::__construct($frameBuffer, $container);
     $this->pressStartFrame = $this->bitmapLoader->loadBitmap('press_start')->getPixels();
     $this->toPlayFrame = $this->bitmapLoader->loadBitmap('to_play')->getPixels();
 }