50 Commits
Author SHA1 Message Date
Pascal cea1740792 added attack sounds for player
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-16 20:57:19 +02:00
Pascal 7559a3f40a added item chests, audio and deployment
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-16 20:51:24 +02:00
Pascal 0004849110 added zombie texture and basic ki
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-16 05:45:59 +02:00
Pascal f1d6c7d69f started skeleton and zombie, added GUI and menu system
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-16 04:42:39 +02:00
Pascal e3b9eff67d added a whole lot of crap
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-15 23:47:44 +02:00
Pascal 4edf8453d1 extruded char sprites
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-14 16:37:21 +02:00
Pascal 0c53d2a2d8 Merge remote-tracking branch 'origin/PascalMachtSachen' into PascalMachtSachen 2020-07-13 16:39:21 +02:00
Pascal c2befeaa2b added attacks and dynamic enemy spawning
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-13 16:37:56 +02:00
Pascal 600575655d fixed favicons and added service-worker
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-07-11 16:23:53 +02:00
Pascal 07e08ba4f6 added Storage and ControlsSettings
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-06-04 17:42:23 +02:00
Pascal 7c4d08cf8f added items and pickup basic
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-05-31 11:08:56 +02:00
Pascal a726db1306 added entitys, enemys, bats and custom attack hitboxes for players
added map loading and one-way collision (needs to move to tiled attribute tho)

Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-05-20 11:13:21 +02:00
Pascal 4a22dbe657 modified template
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-05-18 12:59:59 +02:00
Pascal 01939b8ed8 added favicons
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-14 02:33:33 +01:00
Pascal 45b9891716 added automatic scaling and implemented Menu Scene
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-11 01:45:53 +01:00
Pascal 94ba56f2aa added default Menu Scene
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-11 01:45:20 +01:00
Pascal 2c2744efb0 added default html style
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-11 01:44:50 +01:00
Pascal 78026a22d2 added support for more asset file types
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-11 01:44:14 +01:00
Pascal 853b0f489c Changed version, author and repo url
Signed-off-by: Pascal Syma <pascal@syma.dev>
2020-02-11 01:43:32 +01:00
Richard Davey 5609708c59 Updated to Phaser 3.20.1 2019-11-12 12:02:02 +00:00
Richard Davey a731193889 Merge pull request #24 from chrisl8/master
Update Node dependencies to latest versions, including fixes.
2019-11-12 11:57:51 +00:00
Chris L8 98934ac42c Update Node dependencies to latest versions, including fixes.
CleanWebpackPlugin had some minor usage changes.
2019-10-03 08:29:51 -05:00
Richard Davey 52f3c5bc4a Merge pull request #21 from arnekeller/patch-1
Updated Phaser to latest release in dependencies
2019-04-05 17:59:34 +01:00
Arne Keller e42a4085d5 Updated Phaser to latest release in dependencies 2019-03-23 00:04:15 +01:00
Richard Davey 01d7c430a4 Merge pull request #20 from ctaylo21/master
Upgrade to Webpack 4 (including webpack-dev-server). Add ES6 support via Babel 7.
2019-03-06 09:52:15 +00:00
Caleb Taylor 2b7ef67edd remove image-webpack-loader 2019-01-08 14:34:34 -08:00
Caleb Taylor d0a0d29a3e Increase maxEntrypointSize and maxAssetSize limits for webpack production build 2019-01-08 14:06:56 -08:00
Caleb Taylor 77e0b7706b Merge branch 'master' of https://github.com/photonstorm/phaser3-project-template 2019-01-07 17:12:35 -08:00
Caleb Taylor de3f661d0e Upgrade to Webpack 4 (including webpack-dev-server). Add ES6 support via Babel 7. 2019-01-07 17:11:12 -08:00
Richard Davey b392fe65cb Fixed start script and updated phaser. Fix #10 #9 2018-03-27 02:46:47 +01:00
Richard Davey 2fc406067b Merge pull request #4 from EvoluoGames/npm-script-and-doc
Remove path into npm script & update documentation
2018-03-07 11:21:54 +00:00
Richard Davey ee9e9e172c Merge branch 'master' into npm-script-and-doc 2018-03-07 11:21:46 +00:00
Richard Davey eaca1987cb Updated to 3.2.0 2018-03-07 11:18:48 +00:00
Richard Davey e7995b8c13 Merge pull request #8 from candelibas/patch-1
Updated required Phaser version
2018-02-25 11:52:44 +00:00
Can Delibas a60b552376 Updated required Phaser version 2018-02-24 08:10:34 +03:00
Richard Davey 357d98628e Updated required Phaser version. 2018-02-21 09:43:28 +00:00
Richard Davey 38ce292530 Added raw-loader to package.json. Fixes #7 #6 2018-02-02 12:07:05 +00:00
Richard Davey 448133c311 Added raw-loader and updated version 2018-01-31 20:21:19 +00:00
Richard Davey 877096eabf Merge pull request #5 from cjke/master
Replaced live server with webpack dev server
2018-01-20 13:03:50 +00:00
Chris Kelly 11e573fa56 Replaced live server with webpack dev server which gives hot reload for free 2018-01-20 22:41:50 +11:00
Richard Davey d497d21e93 Updated v3 version 2018-01-11 12:27:35 +00:00
Richard Davey 702e85ee07 Updated to Beta 5. 2017-10-02 12:05:08 +01:00
Richard Davey 73e3a4fb85 Updated readme. 2017-09-27 12:29:56 +01:00
photonstorm 4fd882c02a Updated for Beta 4 + added renderer flags. 2017-09-25 15:28:18 +01:00
evoluo games 36fc05aa2b Remove path into npm script & update documentation 2017-09-24 00:17:25 +02:00
photonstorm 04f4219ac0 Updated minimum build. 2017-09-11 14:18:49 +01:00
Richard Davey 986d1853e3 Merge pull request #1 from kfern/feature-npm-start
Run the template easily
2017-08-30 12:59:12 +01:00
@kfern 567912583d Added live-server
Added start script
Add short "How to run" in readme
2017-08-30 13:33:53 +02:00
photonstorm bf0e27242b Added sample project files. 2017-07-31 17:17:07 +01:00
Richard Davey f211da59f6 Initial commit 2017-07-31 16:39:58 +01:00
141 changed files with 21239 additions and 202 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"presets": [
["@babel/env", {
"targets": {
"browsers": [
">0.25%",
"not ie 11",
"not op_mini all"
]
},
"modules": false
}]
],
}
+14
View File
@@ -0,0 +1,14 @@
# System and IDE files
Thumbs.db
.DS_Store
.idea
*.suo
*.sublime-project
*.sublime-workspace
# Vendors
node_modules/
# Build
dist/
/npm-debug.log
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Vendored
+65
View File
@@ -0,0 +1,65 @@
pipeline {
agent {
label 'node&&windows'
}
stages {
stage ('Initialize') {
steps {
echo 'Initializing..'
}
}
stage('Build') {
steps {
echo 'Building..'
bat 'npm install'
bat 'npm run build'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Archive') {
when {
branch 'master'
expression {
currentBuild.result == null || currentBuild.result == 'SUCCESS'
}
}
steps {
echo 'Deploying....'
dir("dist") {
withCredentials([sshUserPrivateKey(credentialsId: 'id_rsa', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'userName')])
{
script {
def remote = [:]
remote.name = "1blu"
remote.host = "webhosting72.1blu.de"
remote.allowAnyHosts = true
remote.user = userName
remote.identityFile = identity
sshCommand remote: remote, command: "mkdir www/mi2.mama.productions/releases/${BUILD_NUMBER}"
sshPut remote: remote, from: "${WORKSPACE}\\dist\\", into: "www/mi2.mama.productions/releases/${BUILD_NUMBER}"
sshCommand remote: remote, command: "rm www/mi2.mama.productions/public"
sshCommand remote: remote, command: "ln -s releases/${BUILD_NUMBER}/dist www/mi2.mama.productions/public"
}
}
bat 'git init'
bat 'git add .'
bat 'git config --global user.email "jenkins@bosym.de"'
bat 'git config --global user.name "Jenkins"'
bat 'git commit -m "Deploy by Jenkins"'
withCredentials([usernamePassword(credentialsId: 'e3d97a6f-476f-489f-a207-4766a1c420cf', usernameVariable: 'username', passwordVariable: 'password')])
{
bat "git push --force --quiet \"https://$username:$password@git.bosym.de/Pascal/MI2Mario.git\" master:gh-pages"
}
}
deleteDir()
}
}
}
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Richard Davey
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+55
View File
@@ -0,0 +1,55 @@
# Medieninformatik 2 SoSe 2020 Mario
A Phaser 3 project template with ES6 support via [Babel 7](https://babeljs.io/) and [Webpack 4](https://webpack.js.org/)
that includes hot-reloading for development and production-ready builds.
Loading images via JavaScript module `import` is also supported.
## Requirements
[Node.js](https://nodejs.org) is required to install dependencies and run scripts via `npm`.
## Available Commands
| Command | Description |
|---------|-------------|
| `npm install` | Install project dependencies |
| `npm start` | Build project and open web server running project |
| `npm run build` | Builds code bundle with production settings (minification, uglification, etc..) |
## Writing Code
After cloning the repo, run `npm install` from your project directory. Then, you can start the local development
server by running `npm start`.
After starting the development server with `npm start`, you can edit any files in the `src` folder
and webpack will automatically recompile and reload your server (available at `http://localhost:8080`
by default).
## Customizing Template
### Babel
You can write modern ES6+ JavaScript and Babel will transpile it to a version of JavaScript that you
want your project to support. The targeted browsers are set in the `.babelrc` file and the default currently
targets all browsers with total usage over "0.25%" but excludes IE11 and Opera Mini.
```
"browsers": [
">0.25%",
"not ie 11",
"not op_mini all"
]
```
### Webpack
If you want to customize your build, such as adding a new webpack loader or plugin (i.e. for loading CSS or fonts), you can
modify the `webpack/base.js` file for cross-project changes, or you can modify and/or create
new configuration files and target them in specific npm tasks inside of `package.json'.
## Deploying Code
After you run the `npm run build` command, your code will be built into a single bundle located at
`dist/bundle.min.js` along with any other assets you project depended.
If you put the contents of the `dist` folder in a publicly-accessible location (say something like `http://mycoolserver.com`),
you should be able to open `http://mycoolserver.com/index.html` and play your game.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="mstile-70x70.png"/>
<square150x150logo src="mstile-150x150.png"/>
<wide310x150logo src="mstile-310x150.png"/>
<square310x310logo src="mstile-310x310.png"/>
<TileColor>#000</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

-59
View File
@@ -1,59 +0,0 @@
{
"name": "Cave Knight",
"short_name": "cave-knight",
"description": "Cave Knight",
"dir": "auto",
"lang": "en-US",
"display": "standalone",
"orientation": "any",
"start_url": "../",
"background_color": "#000",
"theme_color": "#333",
"icons": [
{
"src": "android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
-14
View File
@@ -1,14 +0,0 @@
{
"version": "2.1.0",
"name": "Cave Knight",
"description": "Cave Knight",
"icons": {
"60": "firefox_app_60x60.png",
"128": "firefox_app_128x128.png",
"512": "firefox_app_512x512.png"
},
"developer": {
"name": "MaMa Productions",
"url": "https://mama.productions"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

-9
View File
@@ -1,9 +0,0 @@
{
"version": "2.1.0",
"api_version": 1,
"layout": {
"logo": "yandex-browser-50x50.png",
"color": "#000",
"show_title": true
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

-2
View File
File diff suppressed because one or more lines are too long
-97
View File
@@ -1,97 +0,0 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author Felipe Alfonso <@bitnenfer>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @author Florian Vazelle
* @author Geoffrey Glaive
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author Igor Ognichenko <ognichenko.igor@gmail.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Vladimir Agafonkin
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Stefan Hedman <schteppe@gmail.com> (http://steffe.se)
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Joachim Grill <joachim@codeandweb.com>
* @copyright 2018 CodeAndWeb GmbH
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author samme <samme.npm@gmail.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @author Richard Davey <rich@photonstorm.com>
* @author Florian Mertens
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
+4 -4
View File
File diff suppressed because one or more lines are too long
+12010
View File
File diff suppressed because it is too large Load Diff
+48
View File
@@ -0,0 +1,48 @@
{
"name": "mi2-mario",
"version": "2.1.0",
"description": "Medieninformatik 2 SoSe 2020 Mario",
"main": "src/index.js",
"scripts": {
"build": "webpack --config webpack/prod.js ",
"start": "webpack-dev-server --config webpack/base.js --open"
},
"repository": {
"type": "git",
"url": "git+https://git.bosym.de/git/Pascal/MI2Mario.git"
},
"author": "Pascal Syma <pascal@syma.dev> (https://syma.dev)",
"contributors": [
{
"name": "Richard Davey",
"email": "rdavey@gmail.com",
"url": "http://www.photonstorm.com"
}
],
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"bugs": {
"url": "https://git.bosym.de/Pascal/MI2Mario/issues"
},
"homepage": "https://git.bosym.de/Pascal/MI2Mario#readme",
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^3.0.0",
"favicons-webpack-plugin": "^2.0.0",
"file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0",
"raw-loader": "^3.1.0",
"terser-webpack-plugin": "^2.2.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
"webpack-merge": "^4.2.2",
"workbox-webpack-plugin": "^5.1.3"
},
"dependencies": {
"phaser": "^3.20.1",
"phaser3-rex-plugins": "^1.1.18"
}
}

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

File diff suppressed because one or more lines are too long
+40
View File
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
* All rights reserved.
*/
export default class Storage {
static get() {
if (!window.localStorage.getItem(Storage.KEY))
this.reset();
return JSON.parse(atob(window.localStorage.getItem(Storage.KEY)));
}
static set(value) {
window.localStorage.setItem(Storage.KEY, btoa(JSON.stringify(value)));
}
static clear() {
window.localStorage.removeItem(Storage.KEY);
}
static reset() {
this.set({
controls: {
jump: {name: "Jump", bind: Phaser.Input.Keyboard.KeyCodes.W},
w_left: {name: "Walk left", bind: Phaser.Input.Keyboard.KeyCodes.A},
w_right: {name: "Walk right", bind: Phaser.Input.Keyboard.KeyCodes.D},
use_left: {name: "Use left item", bind: Phaser.Input.Keyboard.KeyCodes.Q},
use_right: {name: "Use right item", bind: Phaser.Input.Keyboard.KeyCodes.E},
attack: {name: "Attack", bind: Phaser.Input.Keyboard.KeyCodes.SPACE},
block: {name: "Block", bind: Phaser.Input.Keyboard.KeyCodes.F},
pickup: {name: "Pickup", bind: Phaser.Input.Keyboard.KeyCodes.S}
}
})
}
}
Storage.KEY = "save";
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
* All rights reserved.
*/
export default class TextElement {
constructor(scene, item) {
this.scene = scene;
this.text = scene.add.text(Math.ceil(item.x), Math.ceil(item.y), item.text.text, {
fontFamily: item.text.fontfamily || "Consolas",
fontSize: item.text.pixelsize || 16,
align: item.text.halign || "center",
fontStyle: item.text.bold ? "strong" : "",
fixedHeight: item.height,
fixedWidth: item.width,
color: item.text.color || "#000000",
wordWrap: {
width: item.width,
useAdvancedWrap: item.text.wrap
}
})
if (item.name === "action") {
this.text.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.text.width, this.text.height), Phaser.Geom.Rectangle.Contains)
.on('pointerover', () => {
this.scene.sound.play('menu_hover', {volume: 0.3});
})
.on('pointerdown', () => {
this.scene.sound.play('menu_click', {volume: 0.5});
let action = item.properties.filter(obj => obj.name === "action");
if (action.length <= 0)
return;
action = action[0].value;
switch (action) {
case "pause_resume":
this.endMyself();
scene.scene.resume('Game');
this.scene.scene.get('Game').music.play();
break;
case "pause_exit":
this.endMyself();
scene.scene.stop('Game');
scene.scene.start('GUI', {key: 'MainMenu'});
break;
}
});
}
}
endMyself() {
this.scene.scene.stop();
this.scene.scene.setVisible(false);
}
}

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 943 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Some files were not shown because too many files have changed in this diff Show More