change scale mode

This commit is contained in:
Mashy 2019-02-05 10:35:40 +10:00
parent cda20d40db
commit 4e0d6cc053
3 changed files with 4 additions and 3 deletions

2
client/package.json Normal file → Executable file
View File

@ -21,7 +21,7 @@
"keymaster": "^1.6.2", "keymaster": "^1.6.2",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"parcel": "^1.9.7", "parcel": "^1.9.7",
"phaser": "^3", "phaser": "^3.16.0-rc3",
"redux": "^4.0.0" "redux": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {

3
client/src/scenes/cryps.js Normal file → Executable file
View File

@ -11,7 +11,7 @@ function renderCryps() {
// backgroundColor: '#181818', // backgroundColor: '#181818',
resolution: window.devicePixelRatio, resolution: window.devicePixelRatio,
scale: { scale: {
mode: Phaser.DOM.WIDTH_CONTROLS_HEIGHT, mode: Phaser.Scale.FIT,
width: 1600, width: 1600,
height: 1000, height: 1000,
max: { max: {
@ -59,6 +59,7 @@ function renderCryps() {
window.addEventListener('mouseup', () => game.registry.set('pan', false)); window.addEventListener('mouseup', () => game.registry.set('pan', false));
window.addEventListener('mousedown', () => game.registry.set('pan', true)); window.addEventListener('mousedown', () => game.registry.set('pan', true));
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
console.log(game);
game.scale.displaySize.maxWidth = window.innerHeight * 1.6; game.scale.displaySize.maxWidth = window.innerHeight * 1.6;
game.scale.displaySize.maxHeight = window.innerHeight; game.scale.displaySize.maxHeight = window.innerHeight;
}); });

View File

@ -59,7 +59,7 @@ Buff `Base ally targetted skill - significantly increase ally speed`
### Slow ### ### Slow ###
Combine `Base Skill Debuff + 1 Red & 2 Blue` Combine `Base Skill Debuff + 1 Red & 2 Blue`
Buff `Base ally targetted skill - significantly increase ally speed` Buff `Base ally targetted skill - significantly decrease enemy speed`
# Non-Violence Type # # Non-Violence Type #