[英]Can't fullscreen phaser + webpack + cordova in android
我使用Phaser-ce 2.7.3 , Webpack 2.2.0和Cordova 6.4.0我的代碼
import 'pixi'
import 'p2'
import Phaser from 'phaser'
import BootState from './states/Boot'
import MenuState from './states/Menu'
import GameState from './states/Game'
import WinState from './states/Win'
class Game extends Phaser.Game {
constructor () {
const width = window.innerWidth
const height = window.innerHeight
super(width, height, Phaser.CANVAS, 'content', null)
this.state.add('Boot', BootState, false)
this.state.add('Menu', MenuState, false)
this.state.add('Game', GameState, false)
this.state.add('Win', WinState, false)
this.state.start('Boot')
}
}
window.game = new Game()
並且全尺寸屏幕的內容在按鈕中獲得黑線
修復cordova-custom-config插件並添加
<preference name="android-manifest/application/activity/@android:theme" value="@android:style/Theme.NoTitleBar.Fullscreen" />
to config.xml
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.