コード例 #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
ファイル: MainGameLoop.php プロジェクト: hackheim/pixelpong
 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');
 }
コード例 #4
0
 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();
 }