├── .watchmanconfig ├── .gitignore ├── assets ├── icon.png ├── audio │ ├── mp.mp3 │ ├── mpi.mp3 │ ├── coin.wav │ ├── jump.wav │ └── spin.wav ├── images │ ├── hud │ │ ├── hud.png │ │ └── hud.json │ ├── items │ │ └── items.png │ ├── pipes │ │ └── pipes.png │ ├── tiles │ │ ├── ground.png │ │ ├── ninja-tiles16.png │ │ └── level.json │ ├── title │ │ └── title.png │ ├── sprites │ │ └── mario.png │ ├── enemies │ │ └── enemies.png │ └── background │ │ ├── background.png │ │ ├── background-objects.png │ │ └── background-objects.json └── fonts │ └── invasion2000.ttf ├── .prettierrc ├── flow-typed └── react-native.js ├── game ├── GameObject.js ├── states │ ├── index.js │ ├── Play.js │ ├── Boot.js │ └── Preload.js ├── EXState.js ├── objects │ ├── Enemy.js │ ├── Coins.js │ ├── Enemies.js │ ├── Controls.js │ ├── Player.js │ ├── MysteryBoxes.js │ ├── Mechanics.js │ └── Level.js └── sprites │ ├── Items.js │ └── Mario.js ├── .babelrc ├── TilemapLoader ├── parseTilemap.js ├── jsonFromResourceAsync.js ├── replaceValueForKeyInJson.js └── loadTilemapsAsync.js ├── README.md ├── utils └── uri.js ├── constants └── Settings.js ├── components ├── Game.js ├── GameWrapper.js ├── ControlButtons.js ├── Loading.js ├── ControlButton.js ├── TouchVisualizer.js ├── Pad.js └── Controller.js ├── app.json ├── package.json ├── .flowconfig ├── LICENSE ├── Game.js ├── Assets.js ├── App.js └── AudioManager.js /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/audio/mp.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/audio/mp.mp3 -------------------------------------------------------------------------------- /assets/audio/mpi.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/audio/mpi.mp3 -------------------------------------------------------------------------------- /assets/audio/coin.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/audio/coin.wav -------------------------------------------------------------------------------- /assets/audio/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/audio/jump.wav -------------------------------------------------------------------------------- /assets/audio/spin.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/audio/spin.wav -------------------------------------------------------------------------------- /assets/images/hud/hud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/hud/hud.png -------------------------------------------------------------------------------- /assets/fonts/invasion2000.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/fonts/invasion2000.ttf -------------------------------------------------------------------------------- /assets/images/items/items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/items/items.png -------------------------------------------------------------------------------- /assets/images/pipes/pipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/pipes/pipes.png -------------------------------------------------------------------------------- /assets/images/tiles/ground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/tiles/ground.png -------------------------------------------------------------------------------- /assets/images/title/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/title/title.png -------------------------------------------------------------------------------- /assets/images/sprites/mario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/sprites/mario.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsxBracketSameLine": true, 3 | "printWidth": 100, 4 | "singleQuote": true, 5 | "trailingComma": "es5" 6 | } 7 | -------------------------------------------------------------------------------- /assets/images/enemies/enemies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/enemies/enemies.png -------------------------------------------------------------------------------- /assets/images/tiles/ninja-tiles16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/tiles/ninja-tiles16.png -------------------------------------------------------------------------------- /flow-typed/react-native.js: -------------------------------------------------------------------------------- 1 | declare var __DEV__: boolean; 2 | 3 | declare module 'react-native' { 4 | declare module.exports: any; 5 | } 6 | -------------------------------------------------------------------------------- /game/GameObject.js: -------------------------------------------------------------------------------- 1 | class GameObject { 2 | constructor({ game }) { 3 | this.game = game; 4 | } 5 | } 6 | export default GameObject; 7 | -------------------------------------------------------------------------------- /assets/images/background/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/background/background.png -------------------------------------------------------------------------------- /assets/images/background/background-objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvanBacon/Expo-Super-Mario-World/HEAD/assets/images/background/background-objects.png -------------------------------------------------------------------------------- /game/states/index.js: -------------------------------------------------------------------------------- 1 | export { default as Boot } from './Boot'; 2 | export { default as Preload } from './Preload'; 3 | export { default as Play } from './Play'; 4 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["babel-preset-expo"], 3 | "env": { 4 | "development": { 5 | "plugins": ["transform-react-jsx-source"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /TilemapLoader/parseTilemap.js: -------------------------------------------------------------------------------- 1 | import replaceValueForKeyInJson from './replaceValueForKeyInJson'; 2 | export default (json, provider) => 3 | replaceValueForKeyInJson(json, 'image', provider); 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mario 2 | 3 | Mario clone running in expo-phaser to test the abilities of the port. 4 | 5 | ### Based on this 6 | 7 | [Web build](https://kevinchau321.github.io/SuperMarioWorldJS/) by [kevinchau321](https://github.com/kevinchau321) 8 | -------------------------------------------------------------------------------- /game/EXState.js: -------------------------------------------------------------------------------- 1 | // import { Phaser } from 'expo-phaser'; 2 | // extends Phaser.State 3 | class EXState { 4 | constructor({ game }) { 5 | // super(); 6 | this.game = game; 7 | } 8 | preload() {} 9 | create() {} 10 | update() {} 11 | } 12 | 13 | export default EXState; 14 | -------------------------------------------------------------------------------- /utils/uri.js: -------------------------------------------------------------------------------- 1 | import { Asset } from 'expo'; 2 | 3 | export default (resource, debugTag) => { 4 | let asset = Asset.fromModule(resource); 5 | if (!asset.localUri) { 6 | console.error( 7 | 'Provided resource is not downloaded. Please download this resource before attempting to load.', 8 | debugTag 9 | ); 10 | } else { 11 | return asset.localUri; 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /TilemapLoader/jsonFromResourceAsync.js: -------------------------------------------------------------------------------- 1 | import AssetUtils from 'expo-asset-utils'; 2 | import { FileSystem } from 'expo'; 3 | 4 | async function jsonFromResourceAsync(resource) { 5 | const jsonUrl = await AssetUtils.uriAsync(resource); 6 | const jsonString = await FileSystem.readAsStringAsync(jsonUrl); 7 | return JSON.parse(jsonString); 8 | } 9 | 10 | export default jsonFromResourceAsync; 11 | -------------------------------------------------------------------------------- /constants/Settings.js: -------------------------------------------------------------------------------- 1 | const SCALE = window.devicePixelRatio * 2; 2 | const buffer_height = window.innerHeight * SCALE; 3 | 4 | export default { 5 | SCALAR: buffer_height / 432, 6 | MAP_HEIGHT: 432, 7 | MAP_WIDTH: 5120, 8 | 9 | MAP_HEIGHT_16: 416, 10 | MAP_HEIGHT_32: 400, 11 | MAP_HEIGHT_48: 384, 12 | 13 | DEBUG_ON: false, 14 | 15 | MUSIC_ON: false, 16 | gravity: 2000 * SCALE, 17 | SCALE, 18 | }; 19 | -------------------------------------------------------------------------------- /game/objects/Enemy.js: -------------------------------------------------------------------------------- 1 | import GameObject from '../GameObject'; 2 | import Settings from '../../constants/Settings'; 3 | const { SCALE } = Settings; 4 | class Enemy extends GameObject { 5 | constructor({ game, x, y, frame }) { 6 | super({ game }); 7 | this.game = game; 8 | this.x = x; 9 | this.y = y; 10 | this.sprite = this.game.add.sprite(x, y, 'enemies', frame); 11 | this.sprite.scale.setTo(SCALE, SCALE); 12 | } 13 | } 14 | export default Enemy; 15 | -------------------------------------------------------------------------------- /components/Game.js: -------------------------------------------------------------------------------- 1 | import Expo from 'expo'; 2 | import React from 'react'; 3 | import { StyleSheet } from 'react-native'; 4 | import Game from '../Game'; 5 | 6 | export default class App extends React.Component { 7 | shouldComponentUpdate() { 8 | return false; 9 | } 10 | 11 | render() { 12 | return ( 13 | new Game({ context })} 16 | /> 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "exponots", 4 | "description": "tiny expo people", 5 | "slug": "exponots", 6 | "sdkVersion": "26.0.0", 7 | "version": "1.0.0", 8 | "orientation": "portrait", 9 | "primaryColor": "#E1E4F0", 10 | "icon": "./assets/icon.png", 11 | "loading": { 12 | "icon": "./assets/icon.png", 13 | "hideExponentText": false 14 | }, 15 | "packagerOpts": { 16 | "assetExts": ["json"] 17 | }, 18 | "ios": { 19 | "supportsTablet": true 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /TilemapLoader/replaceValueForKeyInJson.js: -------------------------------------------------------------------------------- 1 | const isObject = obj => obj !== null && typeof obj === 'object'; 2 | 3 | const replaceValueForKeyInJson = (json, target, provider) => { 4 | const parseJson = json => { 5 | const output = json; 6 | for (let key in json) { 7 | if (key in json) { 8 | const value = json[key]; 9 | if (isObject(value)) { 10 | output[key] = parseJson(value); 11 | } else if (key === target) { 12 | output[key] = provider(value); 13 | } 14 | } 15 | } 16 | return output; 17 | }; 18 | 19 | return parseJson(json); 20 | }; 21 | 22 | export default replaceValueForKeyInJson; 23 | -------------------------------------------------------------------------------- /components/GameWrapper.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, View } from 'react-native'; 3 | 4 | import ControlButtons from './ControlButtons'; 5 | import Controller from './Controller'; 6 | import Game from './Game'; 7 | 8 | class GameWrapper extends React.Component { 9 | update = event => global.joystickupdate && global.joystickupdate(event); 10 | render() { 11 | return ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | } 20 | } 21 | 22 | export default GameWrapper; 23 | -------------------------------------------------------------------------------- /game/sprites/Items.js: -------------------------------------------------------------------------------- 1 | const fps = { 2 | mysteryBox: { 3 | spin: 8, 4 | }, 5 | coin: { 6 | spin: 8, 7 | }, 8 | }; 9 | 10 | export default { 11 | coin: { 12 | basic: { 13 | spin: { frames: [4, 5, 6, 7], fps: fps.coin.spin }, 14 | }, 15 | blue: { 16 | spin: { frames: [19, 20, 21, 22], fps: fps.coin.spin }, 17 | }, 18 | }, 19 | mysteryBox: { 20 | basic: { 21 | spin: { frames: [146, 147, 144, 145], fps: fps.mysteryBox.spin }, 22 | }, 23 | red: { 24 | spin: { frames: [155, 156, 153, 154], fps: fps.mysteryBox.spin }, 25 | }, 26 | }, 27 | powers: { 28 | feather: 8, 29 | yellowStar: 9, 30 | redStar: 10, 31 | moon: 23, 32 | fireFlower: 24, 33 | redMushroom: 25, 34 | greenMushroom: 26, 35 | }, 36 | }; 37 | -------------------------------------------------------------------------------- /components/ControlButtons.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | import ControlButton from './ControlButton'; 5 | 6 | class ControlButtons extends React.Component { 7 | render() { 8 | const buttonSize = 64; 9 | return ( 10 | 18 | 19 | 20 | 21 | 22 | ); 23 | } 24 | } 25 | 26 | export default ControlButtons; 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic", 3 | "version": "0.0.0", 4 | "description": "expo-phaser basic example", 5 | "author": "support@expo.io", 6 | "private": true, 7 | "main": "node_modules/expo/AppEntry.js", 8 | "scripts": { 9 | "fix": "rm -rf node_modules/gl-matrix/.babelrc" 10 | }, 11 | "dependencies": { 12 | "expo": "^26.0.0", 13 | "expo-asset-utils": "^0.0.4-alpha.2", 14 | "expo-multi-touch": "^0.0.0", 15 | "expo-phaser": "^0.0.1-alpha.0", 16 | "react": "16.3.1", 17 | "react-native": "https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz", 18 | "sat": "^0.7.0" 19 | }, 20 | "devDependencies": { 21 | "babel-preset-es2015": "^6.24.1", 22 | "babel-preset-stage-2": "^6.24.1", 23 | "eslint": "^4.9.0", 24 | "eslint-config-universe": "^1.0.6", 25 | "prettier": "^1.7.4" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /game/states/Play.js: -------------------------------------------------------------------------------- 1 | import EXState from '../EXState'; 2 | import Controls from '../objects/Controls'; 3 | import Enemies from '../objects/Enemies'; 4 | import Level from '../objects/Level'; 5 | import Player from '../objects/Player'; 6 | import Coins from '../objects/Coins'; 7 | import MysteryBoxes from '../objects/MysteryBoxes'; 8 | 9 | export default class Play extends EXState { 10 | create() { 11 | super.create(); 12 | const { game } = this; 13 | 14 | this.map = new Level({ game }); 15 | this.map.buildLevel1(); 16 | game.player = new Player({ game }); 17 | this.controls = new Controls({ game }); 18 | // this.enemies = new Enemies({ game }); 19 | game.onResizeGame(); 20 | 21 | this.coins = new Coins({ game }); 22 | this.mysteryBoxes = new MysteryBoxes({ game }); 23 | } 24 | 25 | update() { 26 | super.update(); 27 | this.controls.update(); 28 | 29 | if (this.enemies) { 30 | this.enemies.updateEnemies(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | /src/.*[.]android.js 5 | 6 | /node_modules/metro-bundler/.* 7 | /node_modules/react-native/.* 8 | /node_modules/react-native-gesture-handler/.* 9 | 10 | [include] 11 | 12 | [libs] 13 | 14 | [options] 15 | emoji=true 16 | 17 | esproposal.export_star_as=enable 18 | 19 | module.file_ext=.js 20 | module.file_ext=.json 21 | module.file_ext=.ios.js 22 | module.file_ext=.native.js 23 | 24 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 25 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 26 | 27 | suppress_type=$FlowIssue 28 | suppress_type=$FlowFixMe 29 | suppress_type=$FixMe 30 | 31 | suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe 32 | suppress_comment= \\(.\\|\n\\)*\\$FlowIssue 33 | 34 | unsafe.enable_getters_and_setters=true 35 | 36 | [version] 37 | -------------------------------------------------------------------------------- /components/Loading.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { StyleSheet, Dimensions, Image, Text, View } from 'react-native'; 3 | import Assets from '../Assets'; 4 | 5 | const { width, height } = Dimensions.get('window'); 6 | 7 | export default class Loading extends Component { 8 | static defaultProps = { 9 | text: 'Loading...', 10 | }; 11 | render() { 12 | const { text, loading, children } = this.props; 13 | return ( 14 | 21 | {children} 22 | {loading && } 23 | 24 | ); 25 | } 26 | } 27 | 28 | const styles = StyleSheet.create({ 29 | container: { 30 | ...StyleSheet.absoluteFillObject, 31 | justifyContent: 'center', 32 | alignItems: 'center', 33 | backgroundColor: '#FFC266', 34 | }, 35 | text: { 36 | textAlign: 'center', 37 | }, 38 | }); 39 | -------------------------------------------------------------------------------- /game/objects/Coins.js: -------------------------------------------------------------------------------- 1 | import Settings from '../../constants/Settings'; 2 | import GameObject from '../GameObject'; 3 | import SpriteMap from '../sprites/Items'; 4 | 5 | const { SCALE } = Settings; 6 | 7 | class Coins extends GameObject { 8 | static spacing = 30; 9 | 10 | constructor({ game }) { 11 | super({ game }); 12 | game.coins = game.add.group(); 13 | game.coins.enableBody = true; 14 | 15 | for (let i = 0; i < 12; i++) { 16 | this.add({ 17 | x: 80 + i * Coins.spacing * SCALE, 18 | y: game.world.height - 45 * SCALE, 19 | type: 'basic', 20 | }); 21 | } 22 | } 23 | 24 | add = ({ x, y, type }) => { 25 | const { game } = this; 26 | const coin = game.coins.create(x, y, 'items'); 27 | coin.anchor.setTo(0.5, 0.5); 28 | coin.scale.setTo(SCALE, SCALE); 29 | coin.body.height = 16 * SCALE; 30 | coin.body.width = 12 * SCALE; 31 | 32 | const { frames, fps } = SpriteMap.coin[type].spin; 33 | coin.frame = frames[0]; 34 | coin.animations.add('spin', frames, fps, true); 35 | coin.animations.play('spin'); 36 | }; 37 | } 38 | export default Coins; 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Evan Bacon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /game/states/Boot.js: -------------------------------------------------------------------------------- 1 | import { Phaser } from 'expo-phaser'; 2 | 3 | import Settings from '../../constants/Settings'; 4 | import EXState from '../EXState'; 5 | 6 | class Boot extends EXState { 7 | create() { 8 | super.create(); 9 | // Scale 10 | this.game.scale.scaleMode = Phaser.ScaleManager.USER_SCALE; 11 | this.game.scale.setUserScale(Settings.SCALE, Settings.SCALE); 12 | 13 | // enable crisp rendering 14 | this.game.renderer.renderSession.roundPixels = true; 15 | Phaser.Canvas.setImageRenderingCrisp(this.game.canvas); 16 | 17 | // Bounds 18 | this.world.setBounds( 19 | 0, 20 | 0, 21 | Settings.MAP_WIDTH * Settings.SCALAR, 22 | Settings.MAP_HEIGHT * Settings.SCALAR 23 | ); 24 | // this.world.scale.setTo(constants.SCALE, constants.SCALE); 25 | // Physics 26 | this.game.physics.startSystem(Phaser.Physics.ARCADE); 27 | 28 | // Slopes 29 | this.game.add.plugin(Phaser.Plugin.ArcadeSlopes); 30 | 31 | // Debug 32 | if (Settings.DEBUG_ON) { 33 | // this.game.add.plugin(Phaser.Plugin.Debug); 34 | } 35 | 36 | // Start Prelod State 37 | this.state.start('Preload'); 38 | } 39 | } 40 | 41 | export default Boot; 42 | -------------------------------------------------------------------------------- /components/ControlButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, View } from 'react-native'; 3 | import { BaseButton } from 'react-native-gesture-handler'; 4 | 5 | const emit = (type, props) => { 6 | if (window.document && window.document.emitter) { 7 | window.document.emitter.emit(type, props); 8 | } 9 | }; 10 | 11 | class ControlButton extends React.Component { 12 | render() { 13 | const { size, name, margin, color } = this.props; 14 | return ( 15 | 27 | 34 | global.buttonupdate && global.buttonupdate({ name, active }) 35 | }> 36 | {name} 37 | 38 | 39 | ); 40 | } 41 | } 42 | export default ControlButton; 43 | -------------------------------------------------------------------------------- /game/objects/Enemies.js: -------------------------------------------------------------------------------- 1 | import Enemy from '../objects/Enemy'; 2 | import GameObject from '../GameObject'; 3 | 4 | import { Phaser } from 'expo-phaser'; 5 | import Settings from '../../constants/Settings'; 6 | const { SCALE } = Settings; 7 | 8 | class Enemies extends GameObject { 9 | constructor({ game }) { 10 | super({ game }); 11 | 12 | game.goon = new Enemy({ game, x: 144, y: 369, frame: 88 }); 13 | game.physics.arcade.enable(game.goon.sprite); 14 | game.goon.sprite.animations.add('walk', [88, 109], 10, true); 15 | game.goon.sprite.animations.play('walk'); 16 | game.goon.sprite.body.gravity.y = 1000 * SCALE; 17 | game.goon.sprite.anchor.setTo(0.5, 1); 18 | game.goon.sprite.body.drag.setTo(250, 0); 19 | } 20 | 21 | updateEnemies = () => { 22 | const { game } = this; 23 | game.goon.sprite.body.height = game.goon.sprite.height; 24 | game.physics.arcade.collide(game.goon.sprite, game.groundTilesGroup); 25 | game.physics.arcade.collide(game.goon.sprite, game.player); 26 | 27 | if (game.goon.sprite.x - game.player.x > 16) { 28 | game.goon.sprite.scale.x = -SCALE; 29 | game.goon.sprite.x -= SCALE; 30 | } else if (game.goon.sprite.x - game.player.x < -16) { 31 | game.goon.sprite.scale.x = SCALE; 32 | game.goon.sprite.x += SCALE; 33 | } 34 | }; 35 | } 36 | 37 | export default Enemies; 38 | -------------------------------------------------------------------------------- /game/objects/Controls.js: -------------------------------------------------------------------------------- 1 | import GameObject from '../GameObject'; 2 | import Mechanics from './Mechanics'; 3 | 4 | class Controls extends GameObject { 5 | constructor({ game }) { 6 | super({ game }); 7 | this.mechanics = new Mechanics({ game }); 8 | global.buttonupdate = ({ active, name }) => { 9 | this.mechanics.active = active; 10 | this.mechanics.name = name; 11 | 12 | if (active) { 13 | switch (name) { 14 | case 'A': 15 | console.log('jump'); 16 | this.mechanics.jump(); 17 | break; 18 | case 'B': 19 | console.log('Spin'); 20 | this.mechanics.spin(); 21 | break; 22 | case 'Y': 23 | // mechanics.spin() 24 | break; 25 | case 'Mute': 26 | this.mute(); 27 | break; 28 | } 29 | } 30 | }; 31 | 32 | global.joystickupdate = ({ speed, angle, touching }) => { 33 | // console.log('joystickupdate', { speed, angle, touching }); 34 | this.mechanics.speed = speed; 35 | this.mechanics.angle = angle; 36 | this.mechanics.touching = touching; 37 | }; 38 | } 39 | 40 | update = () => { 41 | this.mechanics.update(); 42 | }; 43 | 44 | mute = () => { 45 | this.game.sound.mute = !this.game.sound.mute; 46 | }; 47 | } 48 | export default Controls; 49 | -------------------------------------------------------------------------------- /components/TouchVisualizer.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { View, StyleSheet } from 'react-native'; 3 | 4 | const colors = ['red', 'blue', 'yellow', 'green', 'orange', 'cyan', 'plum', 'gray', 'purple']; 5 | export default class App extends Component { 6 | render() { 7 | const { touches } = this.props; 8 | 9 | return ( 10 | 11 | {Object.values(touches).map((item, index) => { 12 | if (!item) { 13 | return null; 14 | } 15 | 16 | return ( 17 | 33 | ); 34 | })} 35 | 36 | ); 37 | } 38 | } 39 | 40 | const TOUCH_SIZE = 56; 41 | 42 | const styles = StyleSheet.create({ 43 | touch: { 44 | position: 'absolute', 45 | aspectRatio: 1, 46 | width: TOUCH_SIZE, 47 | borderRadius: TOUCH_SIZE / 2, 48 | }, 49 | }); 50 | -------------------------------------------------------------------------------- /Game.js: -------------------------------------------------------------------------------- 1 | import ExpoPhaser, { Phaser } from 'expo-phaser'; 2 | import React from 'react'; 3 | import AudioManager from './AudioManager'; 4 | import * as states from './game/states'; 5 | import loadTilemapAsync from './TilemapLoader/loadTilemapsAsync'; 6 | import Assets from './Assets'; 7 | import uri from './utils/uri'; 8 | 9 | // import './game/libs/phaser-debug.min.js'; 10 | 11 | export default class Game { 12 | constructor({ context }) { 13 | global.gameObjects = {}; 14 | 15 | require('./game/libs/phaser-arcade-slopes.min.js'); 16 | const game = ExpoPhaser.game({ context }); 17 | game.backgroundColor = 0xff00ff; 18 | game._context = context; 19 | game.antialias = false; 20 | 21 | game.onResizeGame = () => { 22 | const size = { 23 | width: window.innerWidth * window.devicePixelRatio, 24 | height: window.innerHeight * window.devicePixelRatio, 25 | }; 26 | console.log('Resize', { size }); 27 | game.renderer.resize(size.width, size.height); 28 | game.camera.setSize(size.width, size.height); 29 | game.camera.height = size.height + 16; 30 | game.camera.follow(game.player, Phaser.Camera.FOLLOW_PLATFORMER); 31 | }; 32 | Object.keys(states).forEach(state => game.state.add(state, new states[state]({ game }), false)); 33 | game.state.start('Boot'); 34 | 35 | // AudioManager.sharedInstance.playAsync('music', true, true); 36 | window.addEventListener('resize', () => game.onResizeGame()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'icon.png': require(`./assets/icon.png`), 3 | audio: { 4 | 'coin.wav': require(`./assets/audio/coin.wav`), 5 | 'jump.wav': require(`./assets/audio/jump.wav`), 6 | 'mp.mp3': require(`./assets/audio/mp.mp3`), 7 | 'mpi.mp3': require(`./assets/audio/mpi.mp3`), 8 | 'spin.wav': require(`./assets/audio/spin.wav`), 9 | }, 10 | fonts: { 11 | 'invasion2000.ttf': require(`./assets/fonts/invasion2000.ttf`), 12 | }, 13 | images: { 14 | background: { 15 | 'background-objects.json': require(`./assets/images/background/background-objects.json`), 16 | 'background-objects.png': require(`./assets/images/background/background-objects.png`), 17 | 'background.png': require(`./assets/images/background/background.png`), 18 | }, 19 | enemies: { 20 | 'enemies.json': require(`./assets/images/enemies/enemies.json`), 21 | 'enemies.png': require(`./assets/images/enemies/enemies.png`), 22 | }, 23 | items: { 24 | 'items.json': require(`./assets/images/items/items.json`), 25 | 'items.png': require(`./assets/images/items/items.png`), 26 | }, 27 | hud: { 28 | 'hud.json': require(`./assets/images/hud/hud.json`), 29 | 'hud.png': require(`./assets/images/hud/hud.png`), 30 | }, 31 | pipes: { 32 | 'pipes.json': require(`./assets/images/pipes/pipes.json`), 33 | 'pipes.png': require(`./assets/images/pipes/pipes.png`), 34 | }, 35 | sprites: { 36 | 'mario.json': require(`./assets/images/sprites/mario.json`), 37 | 'mario.png': require(`./assets/images/sprites/mario.png`), 38 | }, 39 | tiles: { 40 | 'ground.json': require(`./assets/images/tiles/ground.json`), 41 | 'ground.png': require(`./assets/images/tiles/ground.png`), 42 | 'ninja-tiles16.png': require(`./assets/images/tiles/ninja-tiles16.png`), 43 | 'level.json': require(`./assets/images/tiles/level.json`), 44 | }, 45 | title: { 46 | 'title.png': require(`./assets/images/title/title.png`), 47 | }, 48 | }, 49 | }; 50 | -------------------------------------------------------------------------------- /game/objects/Player.js: -------------------------------------------------------------------------------- 1 | import Settings from '../../constants/Settings'; 2 | const { SCALE } = Settings; 3 | import GameObject from '../GameObject'; 4 | import SpriteMap from '../sprites/Mario'; 5 | import { Phaser } from 'expo-phaser'; 6 | 7 | class Player extends Phaser.Sprite { 8 | details = { 9 | name: 'mario', 10 | power: 'normal', 11 | size: 'small', 12 | }; 13 | 14 | direction = 'right'; 15 | hitPlatform = false; 16 | jumptimeStart = -1; 17 | jumpType = 0; 18 | 19 | _spriteMap = null; 20 | set spriteMap(value) { 21 | if (value === this._spriteMap) { 22 | return; 23 | } 24 | this._spriteMap = value; 25 | 26 | this.frame = value.standing; 27 | console.log('make player', this.frame); 28 | this._addAnimationForName({ name: 'walk' }); 29 | this._addAnimationForName({ name: 'run' }); 30 | this._addAnimationForName({ name: 'spin' }); 31 | } 32 | 33 | get spriteMap() { 34 | return this._spriteMap; 35 | } 36 | 37 | constructor({ game }) { 38 | super(game, 24 * SCALE, 120, 'mario'); 39 | game.world.addChild(this); 40 | game.physics.arcade.enable(this); 41 | this.scale.setTo(SCALE, SCALE); 42 | 43 | this.body.bounce.y = 0; 44 | this.body.gravity.y = Settings.gravity; 45 | this.body.collideWorldBounds = true; 46 | this.body.drag.setTo(250, 0); 47 | 48 | this.anchor.setTo(0.5, 1); 49 | 50 | // Dimensions for slope collision 51 | this.body.width = 13 * SCALE; 52 | this.body.height = 15 * SCALE; 53 | 54 | game.slopes.enable(this); 55 | 56 | // Default frame 57 | this.updateDetails(); 58 | } 59 | 60 | updateDetails = () => { 61 | const { name, power, size } = this.details; 62 | this.spriteMap = SpriteMap[name][power][size]; 63 | }; 64 | 65 | addPower = named => { 66 | this.details.power = named; 67 | this.updateDetails(); 68 | }; 69 | 70 | _addAnimationForName = ({ name }) => { 71 | if (!this.spriteMap) { 72 | return; 73 | } 74 | 75 | const { frames, fps } = this.spriteMap[name]; 76 | this.animations.add(name, frames, fps, true); 77 | }; 78 | 79 | grow = () => { 80 | this.details.size = 'big'; 81 | this.updateDetails(); 82 | }; 83 | 84 | shrink = () => { 85 | this.details.size = 'small'; 86 | this.updateDetails(); 87 | }; 88 | } 89 | 90 | export default Player; 91 | -------------------------------------------------------------------------------- /game/states/Preload.js: -------------------------------------------------------------------------------- 1 | import Assets from '../../Assets'; 2 | import loadTilemapAsync from '../../TilemapLoader/loadTilemapsAsync'; 3 | import uri from '../../utils/uri'; 4 | import EXState from '../EXState'; 5 | 6 | class Preload extends EXState { 7 | preload() { 8 | super.preload(); 9 | 10 | const { game, load } = this; 11 | // Background Image 12 | load.image('sky', uri(Assets.images.background['background.png'])); 13 | 14 | const { jsonTilemaps } = global; 15 | ['level'].forEach(key => { 16 | const json = jsonTilemaps[key]; 17 | 18 | const assetProvider = name => { 19 | // const [category, imageName] = name.replace('../', '').split('/'); 20 | const res = Assets.images.background['background-objects.png']; //[name]; 21 | const localUri = uri(res); 22 | // console.log('Load JSON: ', res, name, localUri); 23 | return localUri; 24 | }; 25 | 26 | loadTilemapAsync({ 27 | inGameName: key, 28 | json, 29 | game, 30 | assetProvider, 31 | }); 32 | }); 33 | 34 | load.spritesheet( 35 | 'collision-spritesheet', 36 | uri(Assets.images.tiles['ninja-tiles16.png']), 37 | 16, 38 | 16 39 | ); 40 | 41 | load.atlasJSONArray( 42 | 'mario', 43 | uri(Assets.images.sprites['mario.png']), 44 | null, 45 | global.jsonTilemaps.mario 46 | ); 47 | load.atlasJSONArray( 48 | 'items', 49 | uri(Assets.images.items['items.png']), 50 | null, 51 | global.jsonTilemaps.items 52 | ); 53 | load.atlasJSONArray( 54 | 'groundTiles', 55 | uri(Assets.images.tiles['ground.png']), 56 | null, 57 | global.jsonTilemaps.ground 58 | ); 59 | load.atlasJSONArray( 60 | 'background-objects', 61 | uri(Assets.images.background['background-objects.png']), 62 | null, 63 | global.jsonTilemaps.background 64 | ); 65 | load.atlasJSONArray( 66 | 'pipes', 67 | uri(Assets.images.pipes['pipes.png']), 68 | null, 69 | global.jsonTilemaps.pipes 70 | ); 71 | load.atlasJSONArray( 72 | 'enemies', 73 | uri(Assets.images.enemies['enemies.png']), 74 | null, 75 | global.jsonTilemaps.enemies 76 | ); 77 | } 78 | 79 | create() { 80 | super.create(); 81 | this.state.start('Play'); 82 | } 83 | } 84 | 85 | export default Preload; 86 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import Expo from 'expo'; 2 | import AssetUtils from 'expo-asset-utils'; 3 | import React from 'react'; 4 | 5 | import Assets from './Assets'; 6 | import AudioManager from './AudioManager'; 7 | import GameWrapper from './components/GameWrapper'; 8 | import Loading from './components/Loading'; 9 | import jsonFromResourceAsync from './TilemapLoader/jsonFromResourceAsync'; 10 | 11 | console.ignoredYellowBox = ['Phaser.Cache:']; 12 | global.jsonTilemaps = {}; 13 | 14 | export default class App extends React.Component { 15 | state = { 16 | loading: true, 17 | }; 18 | 19 | get fonts() { 20 | let items = {}; 21 | const keys = Object.keys(Assets.fonts || {}); 22 | for (let key of keys) { 23 | const item = Assets.fonts[key]; 24 | const name = key.substr(0, key.lastIndexOf('.')); 25 | items[name] = item; 26 | } 27 | return [items]; 28 | } 29 | 30 | get files() { 31 | return [...AssetUtils.arrayFromObject(Assets.images || {})]; 32 | } 33 | 34 | get tilemaps() { 35 | let jsonFiles = { 36 | background: Assets.images.background['background-objects.json'], 37 | enemies: Assets.images.enemies['enemies.json'], 38 | items: Assets.images.items['items.json'], 39 | pipes: Assets.images.pipes['pipes.json'], 40 | mario: Assets.images.sprites['mario.json'], 41 | ground: Assets.images.tiles['ground.json'], 42 | level: Assets.images.tiles['level.json'], 43 | }; 44 | 45 | const load = async key => { 46 | const resource = jsonFiles[key]; 47 | console.log('load', key); 48 | const tilemap = await jsonFromResourceAsync(resource); 49 | global.jsonTilemaps[key] = tilemap; 50 | }; 51 | 52 | return Object.keys(jsonFiles).map(load); 53 | } 54 | 55 | async preloadAssets() { 56 | await AssetUtils.cacheAssetsAsync({ 57 | fonts: this.fonts, 58 | files: this.files, 59 | }); 60 | await Promise.all(this.tilemaps); 61 | await AudioManager.sharedInstance.setupAudioAsync(); 62 | this.setState({ loading: false }); 63 | } 64 | 65 | componentWillMount() { 66 | Expo.ScreenOrientation.allow(Expo.ScreenOrientation.Orientation.LANDSCAPE); 67 | this.preloadAssets(); 68 | } 69 | 70 | get loading() { 71 | return ; 72 | } 73 | 74 | get screen() { 75 | return ; 76 | } 77 | 78 | render() { 79 | return this.state.loading ? this.loading : this.screen; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /game/objects/MysteryBoxes.js: -------------------------------------------------------------------------------- 1 | import { Phaser } from 'expo-phaser'; 2 | 3 | import Settings from '../../constants/Settings'; 4 | import GameObject from '../GameObject'; 5 | import SpriteMap from '../sprites/Items'; 6 | 7 | const { SCALE } = Settings; 8 | 9 | class MysteryBoxes extends GameObject { 10 | static spacing = 16 * SCALE; 11 | 12 | constructor({ game }) { 13 | super({ game }); 14 | game.mysteryBoxes = game.add.group(); 15 | game.mysteryBoxes.enableBody = true; 16 | 17 | game.powers = game.add.group(); 18 | game.powers.enableBody = true; 19 | 20 | for (let i = 0; i < 12; i++) { 21 | this.add({ 22 | x: 80 + i * MysteryBoxes.spacing * SCALE, 23 | y: game.world.height - 80 * SCALE, 24 | type: 'basic', 25 | }); 26 | } 27 | } 28 | 29 | add = ({ x, y, type }) => { 30 | const { game } = this; 31 | const item = game.mysteryBoxes.create(x, y, 'items'); 32 | item.body.immovable = true; 33 | item.body.height = 16 * SCALE; 34 | item.body.width = 16 * SCALE; 35 | item.anchor.setTo(0.5, 0.5); 36 | item.scale.setTo(SCALE, SCALE); 37 | item._spent = false; 38 | 39 | let bounceTween = bounceAnimation(game, item); 40 | 41 | item.body.onCollide = new Phaser.Signal(); 42 | item.body.onCollide.add(() => { 43 | bounceTween.start(); 44 | 45 | if (item._spent) { 46 | return; 47 | } 48 | item._spent = true; 49 | console.log('hit'); 50 | 51 | let size = 16 * SCALE; 52 | const power = game.powers.create(x, y - size, 'items'); 53 | power._powerId = 'fire'; 54 | bounceAnimation(game, power, 30).start(); 55 | power.body.height = size; 56 | power.body.width = size; 57 | power.anchor.setTo(0.5, 0.5); 58 | power.scale.setTo(SCALE, SCALE); 59 | power.frame = SpriteMap.powers.fireFlower; 60 | }, this); 61 | 62 | const { frames, fps } = SpriteMap.mysteryBox[type].spin; 63 | item.frame = frames[0]; 64 | item.animations.add('spin', frames, fps, true); 65 | item.animations.play('spin'); 66 | }; 67 | } 68 | export default MysteryBoxes; 69 | 70 | const bounceAnimation = (game, item, amount = 20, duration = 90) => { 71 | let bounceTween = game.add 72 | .tween(item) 73 | .to({ y: item.y - amount }, duration, Phaser.Easing.Linear.EaseOut); 74 | bounceTween.chain(game.add.tween(item).to({ y: item.y }, duration, Phaser.Easing.Linear.EaseIn)); 75 | return bounceTween; 76 | }; 77 | -------------------------------------------------------------------------------- /game/sprites/Mario.js: -------------------------------------------------------------------------------- 1 | const fps = { 2 | run: 16, 3 | spin: 20, 4 | walk: 10, 5 | }; 6 | 7 | export default { 8 | mario: { 9 | normal: { 10 | small: { 11 | standing: 14, 12 | walk: { frames: [15, 14], fps: fps.walk }, 13 | run: { frames: [15, 14], fps: fps.run }, 14 | spin: { frames: [20, 21, 14], fps: fps.spin }, 15 | crouch: 49, 16 | lookingUp: 9, 17 | jumping: 1, 18 | falling: 3, 19 | }, 20 | big: { 21 | standing: 105, 22 | walk: { frames: [112, 106, 105], fps: fps.walk }, 23 | run: { frames: [112, 106, 105], fps: fps.run }, 24 | spin: { frames: [123, 124, 105], fps: fps.spin }, 25 | crouch: 150, 26 | lookingUp: 131, 27 | jumping: 104, 28 | falling: 111, 29 | }, 30 | }, 31 | fire: { 32 | small: { 33 | standing: 248, 34 | walk: { frames: [249, 248], fps: fps.walk }, 35 | run: { frames: [249, 248], fps: fps.run }, 36 | spin: { frames: [254, 255, 248], fps: fps.spin }, 37 | crouch: 278, 38 | lookingUp: 238, 39 | jumping: 228, 40 | falling: 232, 41 | }, 42 | big: { 43 | standing: 332, 44 | walk: { frames: [333, 348, 332], fps: fps.walk }, 45 | run: { frames: [333, 348, 332], fps: fps.run }, 46 | spin: { frames: [353, 354, 332], fps: fps.spin }, 47 | crouch: 384, 48 | lookingUp: 368, 49 | jumping: 330, 50 | falling: 338, 51 | }, 52 | }, 53 | }, 54 | luigi: { 55 | normal: { 56 | small: { 57 | standing: 33, 58 | walk: { frames: [34, 33], fps: fps.walk }, 59 | run: { frames: [34, 33], fps: fps.run }, 60 | spin: { frames: [39, 40, 33], fps: fps.spin }, 61 | crouch: 53, 62 | lookingUp: 29, 63 | jumping: 12, 64 | falling: 14, 65 | }, 66 | big: { 67 | standing: 115, 68 | walk: { frames: [116, 115], fps: fps.walk }, 69 | run: { frames: [116, 117, 115], fps: fps.run }, 70 | spin: { frames: [39, 40, 115], fps: fps.spin }, 71 | crouch: 53, 72 | lookingUp: 29, 73 | jumping: 12, 74 | falling: 14, 75 | }, 76 | }, 77 | fire: { 78 | small: { 79 | standing: 248, 80 | walk: { frames: [249, 248], fps: fps.walk }, 81 | run: { frames: [249, 248], fps: fps.run }, 82 | spin: { frames: [254, 255, 248], fps: fps.spin }, 83 | crouch: 278, 84 | lookingUp: 238, 85 | jumping: 228, 86 | falling: 231, 87 | }, 88 | big: { 89 | standing: 332, 90 | walk: { frames: [333, 332], fps: fps.walk }, 91 | run: { frames: [333, 348, 332], fps: fps.run }, 92 | spin: { frames: [353, 354, 332], fps: fps.spin }, 93 | crouch: 384, 94 | lookingUp: 368, 95 | jumping: 330, 96 | falling: 338, 97 | }, 98 | }, 99 | }, 100 | }; 101 | -------------------------------------------------------------------------------- /AudioManager.js: -------------------------------------------------------------------------------- 1 | // import { store } from '../rematch/Gate'; 2 | import Expo from 'expo'; 3 | import Assets from './Assets'; 4 | import AssetUtils from 'expo-asset-utils'; 5 | class AudioManager { 6 | sounds = {}; 7 | 8 | playAsync = async (name, isLooping, startOver = true) => { 9 | // if (store.getState().muted) { 10 | // return; 11 | // } 12 | 13 | if (this.sounds.hasOwnProperty(name)) { 14 | const soundObject = this.sounds[name]; 15 | try { 16 | if (startOver) { 17 | await soundObject.setPositionAsync(0); 18 | } 19 | 20 | await soundObject.setIsLoopingAsync(isLooping); 21 | await soundObject.playAsync(); 22 | } catch (error) { 23 | console.warn('Error playing audio', { error }); 24 | } 25 | } else { 26 | console.warn("Audio doesn't exist", name); 27 | } 28 | }; 29 | stopAsync = async name => { 30 | if (this.sounds.hasOwnProperty(name)) { 31 | const soundObject = this.sounds[name]; 32 | try { 33 | await soundObject.stopAsync(); 34 | } catch (error) { 35 | console.warn('Error stopping audio', { error }); 36 | } 37 | } else { 38 | console.warn("Audio doesn't exist", name); 39 | } 40 | }; 41 | volumeAsync = async (name, volume) => { 42 | if (this.sounds.hasOwnProperty(name)) { 43 | const soundObject = this.sounds[name]; 44 | try { 45 | await soundObject.setVolumeAsync(volume); 46 | } catch (error) { 47 | console.warn('Error setting volume of audio', { error }); 48 | } 49 | } else { 50 | console.warn("Audio doesn't exist", name); 51 | } 52 | }; 53 | 54 | pauseAsync = async name => { 55 | if (this.sounds.hasOwnProperty(name)) { 56 | const soundObject = this.sounds[name]; 57 | try { 58 | await soundObject.pauseAsync(); 59 | } catch (error) { 60 | console.warn('Error pausing audio', { error }); 61 | } 62 | } else { 63 | console.warn("Audio doesn't exist", name); 64 | } 65 | }; 66 | 67 | configureExperienceAudioAsync = async () => 68 | Expo.Audio.setAudioModeAsync({ 69 | allowsRecordingIOS: false, 70 | interruptionModeIOS: Expo.Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX, 71 | playsInSilentModeIOS: false, 72 | shouldDuckAndroid: true, 73 | interruptionModeAndroid: Expo.Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX, 74 | }); 75 | 76 | get assets() { 77 | return Assets.audio; 78 | } 79 | 80 | setupAudioAsync = async () => { 81 | const keys = Object.keys(this.assets || {}); 82 | for (let key of keys) { 83 | const item = this.assets[key]; 84 | const { sound } = await Expo.Audio.Sound.create(item); 85 | this.sounds[key.substr(0, key.lastIndexOf('.'))] = sound; 86 | } 87 | }; 88 | 89 | downloadAsync = async () => 90 | AssetUtils.cacheAssetsAsync({ 91 | files: [...AssetUtils.arrayFromObject(this.assets)], 92 | }); 93 | 94 | async setupAsync() { 95 | await this.configureExperienceAudioAsync(); 96 | await this.downloadAsync(); 97 | await this.setupAudioAsync(); 98 | await super.setupAsync(); 99 | } 100 | } 101 | 102 | AudioManager.sharedInstance = new AudioManager(); 103 | 104 | export default AudioManager; 105 | -------------------------------------------------------------------------------- /components/Pad.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Text, Animated, StyleSheet } from 'react-native'; 3 | import PropTypes from 'prop-types'; 4 | const PAD_RADIUS = 64; 5 | const THUMB_RADIUS = 24; 6 | 7 | 8 | const radiansBetweenPoints = (p1, p2) => Math.atan2(p2.y - p1.y, p2.x - p1.x); 9 | 10 | const vectorSize = ({ x, y }) => Math.sqrt(x * x + y * y); 11 | const transformPosition = ({ angle, distance }) => ({ 12 | x: Math.cos(angle) * distance, 13 | y: Math.sin(angle) * distance, 14 | }); 15 | 16 | export default class Pad extends Component { 17 | static propTypes = { 18 | center: PropTypes.object, 19 | touchPosition: PropTypes.object, 20 | visible: PropTypes.bool, 21 | force: PropTypes.number, 22 | }; 23 | 24 | animatedValue = new Animated.Value(0); 25 | angle = 0; 26 | speed = 0; 27 | 28 | componentWillReceiveProps({ visible }) { 29 | const { props } = this; 30 | if (props.visible != visible) { 31 | this.visible = visible; 32 | } 33 | } 34 | 35 | set visible(value) { 36 | Animated.timing(this.animatedValue, { 37 | toValue: value ? 1 : 0, 38 | duration: 150, 39 | useNativeDriver: true, 40 | }).start(); 41 | 42 | if (!value) { 43 | this.speed = 0; 44 | } 45 | } 46 | 47 | get positionStyle() { 48 | const { center } = this.props; 49 | return { 50 | top: center.y - PAD_RADIUS, 51 | left: center.x - PAD_RADIUS, 52 | }; 53 | } 54 | 55 | get animatedStyle() { 56 | const scale = this.animatedValue; 57 | return { 58 | transform: [{ scale }], 59 | }; 60 | } 61 | 62 | get containerStyle() { 63 | return [styles.container, this.positionStyle, this.animatedStyle]; 64 | } 65 | 66 | get normalizedTouch() { 67 | const { center, touchPosition } = this.props; 68 | return { 69 | x: center.x - touchPosition.x, 70 | y: center.y - touchPosition.y, 71 | }; 72 | } 73 | 74 | get thumbPositionStyle() { 75 | const { center, touchPosition, force } = this.props; 76 | const { normalizedTouch } = this; 77 | const distance = Math.min(PAD_RADIUS, vectorSize(normalizedTouch)); 78 | const angle = radiansBetweenPoints(center, touchPosition); 79 | const position = transformPosition({ angle, distance }); 80 | 81 | this.angle = angle; 82 | this.speed = distance / PAD_RADIUS; 83 | 84 | return { 85 | top: PAD_RADIUS + position.y - THUMB_RADIUS, 86 | left: PAD_RADIUS + position.x - THUMB_RADIUS, 87 | transform: [{ scale: 1 + (force || 0) * 0.5 }], 88 | }; 89 | } 90 | 91 | get thumbStyle() { 92 | return [this.thumbPositionStyle, styles.thumb]; 93 | } 94 | 95 | render() { 96 | return ( 97 | 98 | 99 | 100 | ); 101 | } 102 | } 103 | 104 | const styles = StyleSheet.create({ 105 | container: { 106 | shadowColor: 'black', 107 | shadowRadius: 2, 108 | shadowOffset: { width: 0, height: 0 }, 109 | shadowOpacity: 0.5, 110 | 111 | position: 'absolute', 112 | alignItems: 'center', 113 | justifyContent: 'center', 114 | aspectRatio: 1, 115 | width: PAD_RADIUS * 2, 116 | borderRadius: PAD_RADIUS, 117 | borderWidth: 3, 118 | borderColor: 'rgba(255,255,255,0.5)', 119 | backgroundColor: 'rgba(255,255,255,0.1)', 120 | }, 121 | thumb: { 122 | position: 'absolute', 123 | width: THUMB_RADIUS * 2, 124 | borderRadius: THUMB_RADIUS, 125 | backgroundColor: 'white', 126 | aspectRatio: 1, 127 | }, 128 | }); 129 | -------------------------------------------------------------------------------- /components/Controller.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { View, Dimensions, StyleSheet } from 'react-native'; 3 | import { MultiTouchView } from 'expo-multi-touch'; 4 | import Pad from './Pad'; 5 | import TouchVisualizer from './TouchVisualizer'; 6 | 7 | const { width } = Dimensions.get('window'); 8 | const halfWidth = width / 2; 9 | 10 | export default class App extends Component { 11 | state = { 12 | touches: {}, 13 | leftTouchId: null, 14 | }; 15 | 16 | componentWillMount() { 17 | this.touchProps = { 18 | ...this.props.touchProps, 19 | onTouchBegan: event => { 20 | const { identifier } = event; 21 | this.setState(previous => ({ 22 | touches: { 23 | ...previous.touches, 24 | [identifier]: event, 25 | }, 26 | })); 27 | if (this.state.leftTouchId == null && event.pageX < halfWidth) { 28 | this.setState( 29 | { 30 | leftTouchId: identifier, 31 | }, 32 | () => { 33 | this.updateWithPad(); 34 | } 35 | ); 36 | } 37 | this.props.touchProps.onTouchBegan && this.props.touchProps.onTouchBegan(event); 38 | }, 39 | onTouchMoved: event => { 40 | const { identifier } = event; 41 | this.setState( 42 | previous => ({ 43 | touches: { 44 | ...previous.touches, 45 | [identifier]: event, 46 | }, 47 | }), 48 | () => { 49 | if (this.state.leftTouchId) { 50 | this.updateWithPad(); 51 | } 52 | } 53 | ); 54 | this.props.touchProps.onTouchMoved && this.props.touchProps.onTouchMoved(event); 55 | }, 56 | onTouchEnded: event => { 57 | this.onTouchEnded(event); 58 | this.props.touchProps.onTouchEnded && this.props.touchProps.onTouchEnded(event); 59 | }, 60 | onTouchCancelled: event => { 61 | this.onTouchEnded(event); 62 | this.props.touchProps.onTouchCancelled && this.props.touchProps.onTouchCancelled(event); 63 | }, 64 | }; 65 | } 66 | 67 | onTouchEnded = event => { 68 | const { identifier } = event; 69 | this.setState(previous => ({ 70 | touches: { 71 | ...previous.touches, 72 | [identifier]: null, 73 | }, 74 | })); 75 | 76 | if (identifier === this.state.leftTouchId) { 77 | this.setState( 78 | { 79 | leftTouchId: null, 80 | }, 81 | () => { 82 | this.updateWithPad(false); 83 | } 84 | ); 85 | } 86 | }; 87 | 88 | updateWithPad = (touching = true) => { 89 | if (!this.pad) { 90 | return; 91 | } 92 | let speed = 0; 93 | let angle = 0; 94 | if (touching) { 95 | speed = this.pad.speed; 96 | angle = this.pad.angle; 97 | } 98 | this.props.update({ 99 | speed, 100 | angle, 101 | touching, 102 | pad: this.pad, 103 | }); 104 | }; 105 | 106 | leftTouchPosition = { x: 0, y: 0 }; 107 | leftTouchStart = { x: 0, y: 0 }; 108 | leftTouchForce = 0; 109 | render() { 110 | const { touches, leftTouchId } = this.state; 111 | 112 | const leftTouch = touches[leftTouchId]; 113 | 114 | if (leftTouch && leftTouch.initialTouch) { 115 | this.leftTouchStart = { 116 | x: leftTouch.initialTouch.pageX, 117 | y: leftTouch.initialTouch.pageY, 118 | }; 119 | this.leftTouchPosition = { 120 | x: leftTouch.pageX, 121 | y: leftTouch.pageY, 122 | }; 123 | 124 | this.leftTouchForce = leftTouch.force || 0; 125 | } 126 | 127 | // 128 | return ( 129 | 130 | 131 | {this.props.children} 132 | 133 | (this.pad = ref)} 135 | visible={!!leftTouchId} 136 | center={this.leftTouchStart} 137 | touchPosition={this.leftTouchPosition} 138 | force={this.leftTouchForce} 139 | /> 140 | 141 | 142 | ); 143 | } 144 | } 145 | 146 | const styles = StyleSheet.create({ 147 | container: { 148 | flex: 1, 149 | alignItems: 'center', 150 | justifyContent: 'center', 151 | }, 152 | }); 153 | -------------------------------------------------------------------------------- /TilemapLoader/loadTilemapsAsync.js: -------------------------------------------------------------------------------- 1 | import Expo from 'expo'; 2 | import ExpoPhaser, { Phaser } from 'expo-phaser'; 3 | import AssetUtils from 'expo-asset-utils'; 4 | import parseTilemap from './parseTilemap'; 5 | import jsonFromResourceAsync from './jsonFromResourceAsync'; 6 | // import { url } from 'inspector'; 7 | 8 | global.jsonMaps = {}; 9 | 10 | async function loadTilemapAsync({ inGameName, json, game, assetProvider }) { 11 | // let rawJson = await jsonFromResourceAsync(jsonStaticResource); 12 | const parsedJson = parseTilemap(json, assetProvider); 13 | game.load.tilemap(inGameName, '', parsedJson, Phaser.Tilemap.TILED_JSON); 14 | } 15 | 16 | export default loadTilemapAsync; 17 | 18 | // export default class App extends React.Component { 19 | // state = { loading: true }; 20 | // async componentWillMount() { 21 | // await AssetUtils.cacheAssetsAsync({ files: AssetUtils.arrayFromObject(Assets) }); 22 | 23 | // let keys = [ 24 | // // 'sector01_room01', 25 | // // 'sector01_room02', 26 | // // 'sector01_room03', 27 | // // 'sector01_room04', 28 | // // 'sector01_room05', 29 | // // 'sector01_room06', 30 | // // 'sector01_room07', 31 | // // 'sector01_room08', 32 | // 'features_test_rotated', 33 | // ]; 34 | // for (let key of keys) { 35 | // const res = Assets.test[key + '.json']; 36 | // global.jsonMaps[key] = await jsonFromResourceAsync(res); 37 | // } 38 | 39 | // this.setState({ loading: false }); 40 | // } 41 | // render() { 42 | // if (this.state.loading) { 43 | // return ; 44 | // } 45 | 46 | // return ( 47 | // 48 | // startGame({ context })} /> 49 | // 50 | // ); 51 | // } 52 | // } 53 | 54 | // function startGame({ context }) { 55 | // const game = ExpoPhaser.game({ context }); 56 | 57 | // var map; 58 | // var layer; 59 | 60 | // var sprite; 61 | // var cursors; 62 | 63 | // const hitCoin = (sprite, tile) => { 64 | // tile.alpha = 0.2; 65 | 66 | // layer.dirty = true; 67 | 68 | // return false; 69 | // }; 70 | 71 | // game.state.add('Playable', { 72 | // preload: function() { 73 | // const texture = Expo.Asset.fromModule(Assets['man.png']).localUri; 74 | 75 | // // const resource = Assets.tilemap.maps["debug.json"] 76 | // // const _url = url(resource); 77 | // const json = global.jsonMaps['debug']; 78 | // const parsedJson = parseTilemap(json, name => { 79 | // // const [category, imageName] = name.replace('../', '').split('/'); 80 | // const res = Assets.test[name]; 81 | // const localUri = url(res); 82 | // console.log(name, localUri); 83 | // return localUri; 84 | // }); 85 | // // game.load.tilemap('debug', '', json, Phaser.Tilemap.TILED_JSON); 86 | 87 | // game.load.tilemap('map', '', json, Phaser.Tilemap.TILED_JSON); 88 | 89 | // game.load.image('ground_1x1', url(Assets.test['ground_1x1.png'])); 90 | // game.load.image('walls_1x2', url(Assets.test['walls_1x2.png'])); 91 | // game.load.image('tiles2', url(Assets.test['tiles2.png'])); 92 | // game.load.image('phaser', url(Assets.test['arrow.png'])); 93 | // game.load.spritesheet('coin', url(Assets.test['coin.png']), 32, 32); 94 | // game.load.image('bunny', url(Assets.test['bunny.png'])); 95 | 96 | // // game.load.image('brown', url(Assets.tilemap.backgrounds['brown.png'])); 97 | // // game.load.image('debug_bg', url(Assets.tilemap.backgrounds['debug_bg.png'])); 98 | // // game.load.image('greenpassage', url(Assets.tilemap.backgrounds['greenpassage.png'])); 99 | // // game.load.image('pipecorridor', url(Assets.tilemap.backgrounds['pipecorridor.png'])); 100 | // // game.load.image('sr388cave', url(Assets.tilemap.backgrounds['sr388cave.png'])); 101 | 102 | // // game.load.image('browntank', url(Assets.tilemap.animatedBackgrounds['browntank.png'])); 103 | 104 | // // game.load.image('collision', url(Assets.tilemap.tilesets['collision.png'])); 105 | // // game.load.image('corridor1', url(Assets.tilemap.tilesets['corridor1.png'])); 106 | // // game.load.image('debug', url(Assets.tilemap.tilesets['debug.png'])); 107 | // // game.load.image('srx', url(Assets.tilemap.tilesets['srx.png'])); 108 | // // game.load.image('yellow', url(Assets.tilemap.tilesets['yellow.png'])); 109 | 110 | // // const atlas = Expo.Asset.fromModule(Assets['man.json']).localUri; 111 | // // const tex = Expo.Asset.fromModule(Assets['man.png']).localUri; 112 | // // game.load.atlasJSONHash('man', tex, atlas); 113 | // }, 114 | // create: function() { 115 | // game.stage.backgroundColor = '#4488AA'; 116 | 117 | // game.physics.startSystem(Phaser.Physics.ARCADE); 118 | 119 | // map = game.add.tilemap('map'); 120 | 121 | // map.addTilesetImage('ground_1x1'); 122 | // map.addTilesetImage('coin'); 123 | // map.addTilesetImage('walls_1x2'); 124 | // map.addTilesetImage('tiles2'); 125 | 126 | // map.setCollisionBetween(1, 12); 127 | 128 | // // This will set Tile ID 26 (the coin) to call the hitCoin function when collided with 129 | // map.setTileIndexCallback(26, hitCoin, this); 130 | 131 | // // This will set the map location 2, 0 to call the function 132 | // map.setTileLocationCallback(2, 0, 1, 1, hitCoin, this); 133 | 134 | // layer = map.createLayer('Tile Layer 1'); 135 | // layer.resizeWorld(); 136 | // layer.debugSettings.forceFullRedraw = true; 137 | 138 | // var layer3 = map.createLayer('Tile Layer 3'); 139 | 140 | // sprite = game.add.sprite(260, 100, 'phaser'); 141 | // sprite.anchor.set(0.5); 142 | // game.physics.enable(sprite); 143 | 144 | // sprite.body.setSize(16, 16, 8, 8); 145 | 146 | // // We'll set a lower max angular velocity here to keep it from going totally nuts 147 | // sprite.body.maxAngular = 500; 148 | 149 | // // Apply a drag otherwise the sprite will just spin and never slow down 150 | // sprite.body.angularDrag = 50; 151 | 152 | // game.camera.follow(sprite); 153 | // }, 154 | // update: function() { 155 | // game.physics.arcade.collide(sprite, layer); 156 | 157 | // sprite.body.velocity.x = 0; 158 | // sprite.body.velocity.y = 0; 159 | // sprite.body.angularVelocity = 0; 160 | 161 | // // if (cursors.left.isDown) 162 | // // { 163 | // // sprite.body.angularVelocity = -200; 164 | // // } 165 | // // else if (cursors.right.isDown) 166 | // // { 167 | // // sprite.body.angularVelocity = 200; 168 | // // } 169 | 170 | // // if (cursors.up.isDown) 171 | // // { 172 | // // game.physics.arcade.velocityFromAngle(sprite.angle, 200, sprite.body.velocity); 173 | // // } 174 | // game.debug.body(sprite); 175 | // }, 176 | // }); 177 | 178 | // game.state.start('Playable'); 179 | // } 180 | -------------------------------------------------------------------------------- /game/objects/Mechanics.js: -------------------------------------------------------------------------------- 1 | // import sound from './sound'; 2 | 3 | import { Phaser } from 'expo-phaser'; 4 | import GameObject from '../GameObject'; 5 | import AudioManager from '../../AudioManager'; 6 | 7 | import Settings from '../../constants/Settings'; 8 | const { SCALE } = Settings; 9 | const speedScale = SCALE * 2; 10 | const jumpScale = SCALE * 2; 11 | const baseAcceleration = 500 * speedScale; 12 | const walkSpeed = 75 * speedScale; 13 | const runSpeed = 125 * speedScale; 14 | const jumpSpeed = 250 * jumpScale; 15 | const spinSpeed = 200 * jumpScale; 16 | 17 | class Mechanics extends GameObject { 18 | update = () => { 19 | const { game } = this; 20 | const { player } = game; 21 | 22 | player.body.height = player.height; 23 | 24 | player.touchGroundTile = game.physics.arcade.collide(player, game.groundTilesGroup); 25 | player.onSlope = game.physics.arcade.collide(player, game.groundSlope); 26 | player.touchPlatform = game.physics.arcade.collide(player, game.platforms); 27 | 28 | player.hitPlatform = player.touchGroundTile || player.touchPlatform || player.onSlope; 29 | if (player.onSlope) { 30 | player.body.drag.setTo(baseAcceleration, baseAcceleration); 31 | } else { 32 | player.body.drag.setTo(baseAcceleration / 2, 0); 33 | } 34 | 35 | player.jumpType = player.body.touching.down && player.hitPlatform ? 0 : player.jumpType; 36 | 37 | if (player.direction === 'right') { 38 | player.scale.x = SCALE; 39 | } else if (player.direction === 'left') { 40 | player.scale.x = -SCALE; 41 | } 42 | 43 | if (this.name === 'B' && this.touching && player.jumptimeStart != -1) { 44 | if (game.time.time - player.jumptimeStart > 175) { 45 | player.jumptimeStart = -1; 46 | } else { 47 | player.body.velocity.y = 48 | Math.abs(player.body.velocity.x) >= runSpeed 49 | ? -290 50 | : Math.abs(player.body.velocity.x) >= walkSpeed ? -265 : -250; 51 | } 52 | } 53 | 54 | if (this.name === 'A' && this.pressing && player.jumptimeStart != -1) { 55 | if (game.time.time - player.jumptimeStart > 200) { 56 | player.jumptimeStart = -1; 57 | } else { 58 | player.body.velocity.y = 59 | Math.abs(player.body.velocity.x) >= runSpeed 60 | ? -240 61 | : Math.abs(player.body.velocity.x) >= walkSpeed ? -215 : -200; 62 | } 63 | } 64 | 65 | //speed, angle, touching 66 | 67 | const halfPI = Math.PI / 2; 68 | 69 | const quarterPI = halfPI / 2; 70 | 71 | const absAngle = Math.abs(this.angle); 72 | 73 | const isUp = absAngle < quarterPI; 74 | const isDown = absAngle > quarterPI; 75 | 76 | const direction = absAngle < halfPI ? 1 : -1; 77 | const impulse = this.speed * direction; 78 | const minImpulse = this.speed > 0.001; 79 | const isLeft = direction === -1; // ?? 80 | 81 | // console.log('ok', { 82 | // touching: this.touching, 83 | // minImpulse, 84 | // isLeft, 85 | // isUp, 86 | // isDown, 87 | // isRight: !isLeft, 88 | // }); 89 | 90 | const isYDown = true; //this.name === 'Y' && this.pressing; 91 | 92 | if ( 93 | this.touching && 94 | isLeft && 95 | minImpulse 96 | // !(this.cursors.up.isDown || this.cursors.down.isDown) 97 | ) { 98 | player.direction = 'left'; 99 | player.body.maxVelocity.x = isYDown ? runSpeed : walkSpeed; 100 | player.body.acceleration.x = isYDown ? -baseAcceleration : -baseAcceleration; 101 | player.body.acceleration.x = player.onSlope ? -10000 : player.body.acceleration.x; 102 | } else if ( 103 | this.touching && 104 | !isLeft && 105 | minImpulse 106 | // !(this.cursors.up.isDown || this.cursors.down.isDown) 107 | ) { 108 | player.direction = 'right'; 109 | if (isYDown) { 110 | player.body.maxVelocity.x = runSpeed; 111 | player.body.acceleration.x = baseAcceleration; 112 | } else { 113 | player.body.maxVelocity.x = walkSpeed; 114 | player.body.acceleration.x = baseAcceleration; 115 | } 116 | 117 | player.body.acceleration.x = player.onSlope ? 10000 : player.body.acceleration.x; 118 | } else if (player.jumpType === 2) { 119 | if (player.body.acceleration.x > 0) { 120 | player.body.acceleration.x = 121 | player.body.acceleration.x <= 0 ? 0 : player.body.acceleration.x - 50; 122 | } else if (player.body.acceleration.x < 0) { 123 | player.body.acceleration.x = 124 | player.body.acceleration.x >= 0 ? 0 : player.body.acceleration.x + 50; 125 | } 126 | player.animations.play('spin'); 127 | } else if (player.jumpType === 1) { 128 | if (player.body.acceleration.x > 0) { 129 | player.body.acceleration.x = 130 | player.body.acceleration.x <= 0 ? 0 : player.body.acceleration.x - 100; 131 | } else if (player.body.acceleration.x < 0) { 132 | player.body.acceleration.x = 133 | player.body.acceleration.x >= 0 ? 0 : player.body.acceleration.x + 100; 134 | } 135 | } else { 136 | player.body.acceleration.x = 0; 137 | } 138 | 139 | if (Math.abs(player.body.velocity.x) > walkSpeed) { 140 | if (player.jumpType === 0) { 141 | player.animations.play('run'); 142 | } 143 | } else if (Math.abs(player.body.velocity.x) > 0) { 144 | if (player.jumpType === 0) { 145 | player.animations.play('walk'); 146 | } 147 | } else { 148 | if (player.jumpType != 2) { 149 | player.animations.stop(); 150 | player.frame = player.spriteMap.standing; 151 | } 152 | } 153 | 154 | if (player.jumpType === 1) { 155 | if (player.body.velocity.y < 0) { 156 | player.frame = player.spriteMap.jumping; 157 | } else if (player.body.velocity.y > 0) { 158 | player.frame = player.spriteMap.falling; 159 | } 160 | } 161 | 162 | if (this.pressing && isUp && player.body.touching.down && player.hitPlatform) { 163 | player.frame = player.spriteMap.lookingUp; 164 | } else if (this.pressing && isDown && player.body.touching.down && player.hitPlatform) { 165 | player.frame = player.spriteMap.crouch; 166 | } 167 | 168 | // Coin collisions 169 | game.physics.arcade.collide(game.coins, game.platforms); 170 | game.physics.arcade.overlap(player, game.coins, this.collectCoin, null, this); 171 | 172 | game.physics.arcade.overlap(player, game.powers, this.collectPower, null, this); 173 | 174 | game.physics.arcade.collide(player, game.mysteryBoxes); 175 | 176 | game.physics.arcade.collide(player, game.tilesGroup); 177 | game.physics.arcade.collide(player, game.blocksGroup); 178 | }; 179 | 180 | collectCoin = (player, coin) => { 181 | coin.kill(); 182 | AudioManager.sharedInstance.playAsync('coin'); 183 | this.score += 10; 184 | // scoreText.text = 'Score: ' + score; 185 | }; 186 | 187 | collectPower = (player, power) => { 188 | power.kill(); 189 | player.addPower(power._powerId); 190 | }; 191 | 192 | spin = () => { 193 | const { game } = this; 194 | game.player.jumpType = 2; 195 | if (game.player.hitPlatform) { 196 | game.player.jumptimeStart = game.time.time; 197 | game.player.body.velocity.y = -spinSpeed; 198 | AudioManager.sharedInstance.playAsync('spin'); 199 | game.player.animations.play('spin'); 200 | } 201 | }; 202 | 203 | jump = () => { 204 | const { game } = this; 205 | 206 | game.player.jumpType = 1; 207 | if (game.player.hitPlatform) { 208 | game.player.jumptimeStart = game.time.time; 209 | game.player.body.velocity.y = -jumpSpeed; 210 | AudioManager.sharedInstance.playAsync('jump'); 211 | } 212 | }; 213 | } 214 | 215 | export default Mechanics; 216 | -------------------------------------------------------------------------------- /game/objects/Level.js: -------------------------------------------------------------------------------- 1 | import GameObject from '../GameObject'; 2 | import Settings from '../../constants/Settings'; 3 | const { MAP_HEIGHT, MAP_HEIGHT_16, MAP_HEIGHT_32, MAP_HEIGHT_48, SCALE } = Settings; 4 | class Map extends GameObject { 5 | buildLevel1 = () => { 6 | // SLOPES 7 | // this.buildSlopes(); 8 | 9 | // Sky background 10 | for (let i = 0; i < 10; i++) { 11 | let sprite = scaleIt(this.game.add.sprite(i * 512, 0, 'sky')); 12 | } 13 | 14 | this.game.platforms = this.game.add.group(); 15 | this.game.platforms.enableBody = true; 16 | this.game.groundTilesGroup = this.game.add.group(); 17 | this.game.groundTilesGroup.enableBody = true; 18 | this.game.tilesGroup = this.game.add.group(); 19 | this.game.tilesGroup.enableBody = true; 20 | this.game.blocksGroup = this.game.add.group(); 21 | this.game.blocksGroup.enableBody = true; 22 | 23 | // Background Objects 24 | this.createBushes(); 25 | 26 | // First Ground Platform 27 | this.createGround(0, 59); 28 | 29 | this.createElevatedGround(59, 72, 4); 30 | 31 | this.createGround(73, 192); 32 | 33 | // Ditch 34 | this.createDitch(192, 198); 35 | 36 | this.createGround(199, 212); 37 | 38 | // GAP 39 | this.createGap(212, 3); 40 | 41 | this.createGround(216, 218); 42 | 43 | this.createDitch(218, 223); 44 | 45 | this.createGround(224, 227); 46 | 47 | this.createGap(227, 3); 48 | this.createGround(231, 286); 49 | 50 | this.createElevatedGround(286, 291, 3); 51 | 52 | this.createGround(292, 320); 53 | 54 | // // Ledges 55 | this.game.ledges = this.game.add.group(); 56 | this.createLedge(176); 57 | for (let j = 0; j < 3; j++) { 58 | this.createLedge(1200 + j * 64); 59 | } 60 | 61 | this.createPipes(); 62 | 63 | this.createBlocks(); 64 | 65 | this.createPlatforms(); 66 | }; 67 | 68 | createPlatforms = () => { 69 | let tile = this.game.add.sprite(2784, MAP_HEIGHT - 64, 'groundTiles', 175); 70 | for (var i = 0; i < 4; i++) { 71 | tile = this.game.add.sprite(2784, MAP_HEIGHT - (80 + i * 16), 'groundTiles', 175); 72 | } 73 | tile = this.game.add.sprite(2848, MAP_HEIGHT - 112, 'groundTiles', 177); 74 | tile = this.game.add.sprite(2848, MAP_HEIGHT - 128, 'groundTiles', 177); 75 | 76 | tile = this.game.add.sprite(2832, MAP_HEIGHT - 64, 'groundTiles', 175); 77 | tile = this.game.add.sprite(2832, MAP_HEIGHT - 80, 'groundTiles', 175); 78 | tile = this.game.add.sprite(2880, MAP_HEIGHT - 64, 'groundTiles', 177); 79 | tile = this.game.add.sprite(2880, MAP_HEIGHT - 80, 'groundTiles', 177); 80 | 81 | tile = this.game.add.sprite(2832, MAP_HEIGHT - 160, 'groundTiles', 175); 82 | 83 | let platform = this.game.platforms.create(2880, MAP_HEIGHT - 96, 'groundTiles', 109); 84 | platform.body.immovable = true; 85 | this.oneWayCollision(platform); 86 | platform = this.game.platforms.create(2832, MAP_HEIGHT - 96, 'groundTiles', 109); 87 | platform.body.immovable = true; 88 | this.oneWayCollision(platform); 89 | platform = this.game.platforms.create(2832, MAP_HEIGHT - 176, 'groundTiles', 151); 90 | platform.body.immovable = true; 91 | this.oneWayCollision(platform); 92 | platform = this.game.platforms.create(2848, MAP_HEIGHT - 176, 'groundTiles', 152); 93 | platform.body.immovable = true; 94 | this.oneWayCollision(platform); 95 | platform = this.game.platforms.create(2864, MAP_HEIGHT - 176, 'groundTiles', 152); 96 | platform.body.immovable = true; 97 | this.oneWayCollision(platform); 98 | platform = this.game.platforms.create(2880, MAP_HEIGHT - 176, 'groundTiles', 152); 99 | platform.body.immovable = true; 100 | this.oneWayCollision(platform); 101 | platform = this.game.platforms.create(2896, MAP_HEIGHT - 176, 'groundTiles', 152); 102 | platform.body.immovable = true; 103 | this.oneWayCollision(platform); 104 | platform.body.checkCollision.right = true; 105 | 106 | // Slope 107 | platform = this.game.add.sprite(2912, MAP_HEIGHT - 176, 'groundTiles', 30); 108 | platform = this.game.add.sprite(2912, MAP_HEIGHT - 161, 'groundTiles', 43); 109 | platform = this.game.add.sprite(2928, MAP_HEIGHT - 160, 'groundTiles', 30); 110 | platform = this.game.add.sprite(2928, MAP_HEIGHT - 145, 'groundTiles', 43); 111 | platform = this.game.add.sprite(2944, MAP_HEIGHT - 144, 'groundTiles', 30); 112 | platform = this.game.add.sprite(2944, MAP_HEIGHT - 129, 'groundTiles', 43); 113 | platform = this.game.add.sprite(2960, MAP_HEIGHT - 128, 'groundTiles', 30); 114 | platform = this.game.add.sprite(2960, MAP_HEIGHT - 113, 'groundTiles', 43); 115 | platform = this.game.add.sprite(2976, MAP_HEIGHT - 112, 'groundTiles', 30); 116 | platform = this.game.add.sprite(2976, MAP_HEIGHT - 97, 'groundTiles', 43); 117 | platform = this.game.add.sprite(2992, MAP_HEIGHT - 96, 'groundTiles', 30); 118 | platform = this.game.add.sprite(2992, MAP_HEIGHT - 81, 'groundTiles', 43); 119 | // End 120 | platform = this.game.platforms.create(3008, MAP_HEIGHT - 80, 'groundTiles', 152); 121 | platform.body.immovable = true; 122 | this.oneWayCollision(platform); 123 | platform = this.game.platforms.create(3024, MAP_HEIGHT - 80, 'groundTiles', 153); 124 | platform.body.immovable = true; 125 | this.oneWayCollision(platform); 126 | platform = this.game.platforms.create(3024, MAP_HEIGHT - 64, 'groundTiles', 177); 127 | platform.body.immovable = true; 128 | this.oneWayCollision(platform); 129 | platform.body.checkCollision.up = false; 130 | 131 | platform = this.game.platforms.create(2784, MAP_HEIGHT - 144, 'groundTiles', 151); 132 | platform.body.immovable = true; 133 | this.oneWayCollision(platform); 134 | platform = this.game.platforms.create(2800, MAP_HEIGHT - 144, 'groundTiles', 152); 135 | platform.body.immovable = true; 136 | this.oneWayCollision(platform); 137 | platform = this.game.platforms.create(2816, MAP_HEIGHT - 144, 'groundTiles', 152); 138 | platform.body.immovable = true; 139 | this.oneWayCollision(platform); 140 | platform = this.game.platforms.create(2832, MAP_HEIGHT - 144, 'groundTiles', 152); 141 | platform.body.immovable = true; 142 | this.oneWayCollision(platform); 143 | platform = this.game.platforms.create(2848, MAP_HEIGHT - 144, 'groundTiles', 109); 144 | platform.body.immovable = true; 145 | this.oneWayCollision(platform); 146 | platform = this.game.platforms.create(2848, MAP_HEIGHT - 144, 'groundTiles', 153); 147 | platform.body.immovable = true; 148 | this.oneWayCollision(platform); 149 | 150 | platform = this.game.platforms.create(2832, MAP_HEIGHT - 96, 'groundTiles', 151); 151 | platform.body.immovable = true; 152 | this.oneWayCollision(platform); 153 | platform = this.game.platforms.create(2848, MAP_HEIGHT - 96, 'groundTiles', 152); 154 | platform.body.immovable = true; 155 | this.oneWayCollision(platform); 156 | platform = this.game.platforms.create(2864, MAP_HEIGHT - 96, 'groundTiles', 152); 157 | platform.body.immovable = true; 158 | this.oneWayCollision(platform); 159 | platform = this.game.platforms.create(2880, MAP_HEIGHT - 96, 'groundTiles', 153); 160 | platform.body.immovable = true; 161 | this.oneWayCollision(platform); 162 | 163 | const sprite = (x, y, n, f) => scaleIt(this.game.add.sprite(x, y, n, f)); 164 | // Filler Tiles 165 | tile = sprite(3008, MAP_HEIGHT - 64, 'groundTiles', 109); 166 | tile = sprite(2992, MAP_HEIGHT - 64, 'groundTiles', 109); 167 | tile = sprite(2976, MAP_HEIGHT - 64, 'groundTiles', 109); 168 | tile = sprite(2960, MAP_HEIGHT - 64, 'groundTiles', 109); 169 | tile = sprite(2944, MAP_HEIGHT - 64, 'groundTiles', 109); 170 | tile = sprite(2928, MAP_HEIGHT - 64, 'groundTiles', 109); 171 | tile = sprite(2912, MAP_HEIGHT - 64, 'groundTiles', 109); 172 | tile = sprite(2896, MAP_HEIGHT - 64, 'groundTiles', 109); 173 | tile = sprite(2864, MAP_HEIGHT - 64, 'groundTiles', 109); 174 | tile = sprite(2848, MAP_HEIGHT - 64, 'groundTiles', 109); 175 | tile = sprite(2816, MAP_HEIGHT - 64, 'groundTiles', 109); 176 | tile = sprite(2800, MAP_HEIGHT - 64, 'groundTiles', 109); 177 | // 178 | tile = sprite(2976, MAP_HEIGHT - 80, 'groundTiles', 109); 179 | tile = sprite(2960, MAP_HEIGHT - 80, 'groundTiles', 109); 180 | tile = sprite(2944, MAP_HEIGHT - 80, 'groundTiles', 109); 181 | tile = sprite(2928, MAP_HEIGHT - 80, 'groundTiles', 109); 182 | tile = sprite(2912, MAP_HEIGHT - 80, 'groundTiles', 109); 183 | tile = sprite(2896, MAP_HEIGHT - 80, 'groundTiles', 109); 184 | tile = sprite(2864, MAP_HEIGHT - 80, 'groundTiles', 109); 185 | tile = sprite(2848, MAP_HEIGHT - 80, 'groundTiles', 109); 186 | tile = sprite(2816, MAP_HEIGHT - 80, 'groundTiles', 109); 187 | tile = sprite(2800, MAP_HEIGHT - 80, 'groundTiles', 109); 188 | // 189 | tile = sprite(2960, MAP_HEIGHT - 96, 'groundTiles', 109); 190 | tile = sprite(2944, MAP_HEIGHT - 96, 'groundTiles', 109); 191 | tile = sprite(2928, MAP_HEIGHT - 96, 'groundTiles', 109); 192 | tile = sprite(2912, MAP_HEIGHT - 96, 'groundTiles', 109); 193 | tile = sprite(2896, MAP_HEIGHT - 96, 'groundTiles', 109); 194 | tile = sprite(2816, MAP_HEIGHT - 96, 'groundTiles', 109); 195 | tile = sprite(2800, MAP_HEIGHT - 96, 'groundTiles', 109); 196 | // 197 | tile = sprite(2944, MAP_HEIGHT - 112, 'groundTiles', 109); 198 | tile = sprite(2928, MAP_HEIGHT - 112, 'groundTiles', 109); 199 | tile = sprite(2912, MAP_HEIGHT - 112, 'groundTiles', 109); 200 | tile = sprite(2896, MAP_HEIGHT - 112, 'groundTiles', 109); 201 | tile = sprite(2880, MAP_HEIGHT - 112, 'groundTiles', 109); 202 | tile = sprite(2864, MAP_HEIGHT - 112, 'groundTiles', 109); 203 | tile = sprite(2832, MAP_HEIGHT - 112, 'groundTiles', 109); 204 | tile = sprite(2816, MAP_HEIGHT - 112, 'groundTiles', 109); 205 | tile = sprite(2800, MAP_HEIGHT - 112, 'groundTiles', 109); 206 | // 207 | tile = sprite(2928, MAP_HEIGHT - 128, 'groundTiles', 109); 208 | tile = sprite(2912, MAP_HEIGHT - 128, 'groundTiles', 109); 209 | tile = sprite(2896, MAP_HEIGHT - 128, 'groundTiles', 109); 210 | tile = sprite(2880, MAP_HEIGHT - 128, 'groundTiles', 109); 211 | tile = sprite(2864, MAP_HEIGHT - 128, 'groundTiles', 109); 212 | tile = sprite(2832, MAP_HEIGHT - 128, 'groundTiles', 109); 213 | tile = sprite(2816, MAP_HEIGHT - 128, 'groundTiles', 109); 214 | tile = sprite(2800, MAP_HEIGHT - 128, 'groundTiles', 109); 215 | // 216 | tile = sprite(2912, MAP_HEIGHT - 144, 'groundTiles', 109); 217 | tile = sprite(2896, MAP_HEIGHT - 144, 'groundTiles', 109); 218 | tile = sprite(2880, MAP_HEIGHT - 144, 'groundTiles', 109); 219 | tile = sprite(2864, MAP_HEIGHT - 144, 'groundTiles', 109); 220 | // 221 | tile = sprite(2896, MAP_HEIGHT - 160, 'groundTiles', 109); 222 | tile = sprite(2880, MAP_HEIGHT - 160, 'groundTiles', 109); 223 | tile = sprite(2864, MAP_HEIGHT - 160, 'groundTiles', 109); 224 | tile = sprite(2848, MAP_HEIGHT - 160, 'groundTiles', 109); 225 | 226 | // Last Platform 227 | for (var j = 0; j < 3; j++) { 228 | tile = scaleIt(this.game.add.sprite(4304, MAP_HEIGHT - (64 + j * 16), 'groundTiles', 175)); 229 | } 230 | for (var i = 270; i < 277; i++) { 231 | for (var j = 0; j < 3; j++) { 232 | tile = scaleIt( 233 | this.game.add.sprite(16 * i, MAP_HEIGHT - (64 + j * 16), 'groundTiles', 109) 234 | ); 235 | } 236 | } 237 | for (var j = 0; j < 3; j++) { 238 | tile = scaleIt(this.game.add.sprite(4432, MAP_HEIGHT - (64 + j * 16), 'groundTiles', 177)); 239 | } 240 | platform = scaleIt(this.game.platforms.create(4304, MAP_HEIGHT - 112, 'groundTiles', 151)); 241 | platform.body.immovable = true; 242 | for (var i = 270; i < 277; i++) { 243 | platform = scaleIt(this.game.platforms.create(16 * i, MAP_HEIGHT - 112, 'groundTiles', 152)); 244 | platform.body.immovable = true; 245 | } 246 | platform = scaleIt(this.game.platforms.create(4432, MAP_HEIGHT - 112, 'groundTiles', 153)); 247 | platform.body.immovable = true; 248 | }; 249 | 250 | createPipes = () => { 251 | let pipePlatform = scaleIt(this.game.platforms.create(1808, MAP_HEIGHT - 96, 'pipes', 4)); 252 | pipePlatform.body.immovable = true; 253 | pipePlatform = scaleIt(this.game.platforms.create(1809, MAP_HEIGHT - 64, 'pipes', 44)); 254 | pipePlatform.body.immovable = true; 255 | 256 | pipePlatform = scaleIt(this.game.platforms.create(1920, MAP_HEIGHT - 80, 'pipes', 4)); 257 | pipePlatform.body.immovable = true; 258 | 259 | // Slope Pipes 260 | let pipe = scaleIt(this.game.ledges.create(818, MAP_HEIGHT - 101, 'background-objects', 26)); 261 | pipe = scaleIt(this.game.ledges.create(871, MAP_HEIGHT - 144, 'background-objects', 24)); 262 | pipe = scaleIt(this.game.ledges.create(1986, MAP_HEIGHT - 101, 'background-objects', 26)); 263 | pipe = scaleIt(this.game.ledges.create(2039, MAP_HEIGHT - 144, 'background-objects', 24)); 264 | 265 | const pipes = scaleIt( 266 | this.game.platforms.create(2096, MAP_HEIGHT - 112, 'background-objects', 32) 267 | ); 268 | pipes.body.immovable = true; 269 | 270 | // Silver Pipe 271 | pipePlatform = scaleIt(this.game.platforms.create(2224, MAP_HEIGHT - 112, 'pipes', 3)); 272 | pipePlatform.body.immovable = true; 273 | pipePlatform = scaleIt(this.game.platforms.create(2225, MAP_HEIGHT - 80, 'pipes', 43)); 274 | pipePlatform.body.immovable = true; 275 | pipePlatform = scaleIt(this.game.platforms.create(2225, MAP_HEIGHT - 64, 'pipes', 43)); 276 | pipePlatform.body.immovable = true; 277 | 278 | // Last Pipe 279 | pipePlatform = scaleIt(this.game.platforms.create(4544, MAP_HEIGHT - 112, 'pipes', 87)); 280 | pipePlatform.body.immovable = true; 281 | pipePlatform = scaleIt(this.game.platforms.create(4545, MAP_HEIGHT - 80, 'pipes', 102)); 282 | pipePlatform.body.immovable = true; 283 | pipePlatform = scaleIt(this.game.platforms.create(4545, MAP_HEIGHT - 64, 'pipes', 102)); 284 | pipePlatform.body.immovable = true; 285 | }; 286 | 287 | createBlocks = () => { 288 | let block = scaleIt( 289 | this.game.blocksGroup.create(1904, MAP_HEIGHT - 64, 'background-objects', 67) 290 | ); 291 | block.body.immovable = true; 292 | 293 | block = scaleIt(this.game.blocksGroup.create(1904, MAP_HEIGHT - 80, 'background-objects', 67)); 294 | block.body.immovable = true; 295 | block = scaleIt(this.game.blocksGroup.create(1904, MAP_HEIGHT - 96, 'background-objects', 67)); 296 | block.body.immovable = true; 297 | block = scaleIt(this.game.platforms.create(1904, MAP_HEIGHT - 112, 'background-objects', 67)); 298 | block.body.immovable = true; 299 | block = scaleIt(this.game.blocksGroup.create(1952, MAP_HEIGHT - 64, 'background-objects', 67)); 300 | block.body.immovable = true; 301 | block = scaleIt(this.game.blocksGroup.create(1952, MAP_HEIGHT - 80, 'background-objects', 67)); 302 | block.body.immovable = true; 303 | block = scaleIt(this.game.blocksGroup.create(1952, MAP_HEIGHT - 96, 'background-objects', 67)); 304 | block.body.immovable = true; 305 | block = scaleIt(this.game.platforms.create(1952, MAP_HEIGHT - 112, 'background-objects', 67)); 306 | block.body.immovable = true; 307 | block = scaleIt(this.game.platforms.create(1920, MAP_HEIGHT - 112, 'background-objects', 69)); 308 | block.body.immovable = true; 309 | block = scaleIt(this.game.platforms.create(1936, MAP_HEIGHT - 112, 'background-objects', 69)); 310 | block.body.immovable = true; 311 | }; 312 | 313 | createLedge = x => { 314 | scaleIt(this.game.ledges.create(x, MAP_HEIGHT - 144, 'background-objects', 23)); 315 | scaleIt(this.game.ledges.create(x + 4, MAP_HEIGHT - 92, 'background-objects', 28)); 316 | }; 317 | 318 | createElevatedGround = (x1, x2, y) => { 319 | // Inside Corner 320 | this.createGroundTile(x1 * 16, MAP_HEIGHT_48, 183); 321 | // Right Vertical 322 | for (var j = 0; j < y - 1; j++) { 323 | this.createTile(x1 * 16, MAP_HEIGHT - (64 + j * 16), 108); 324 | } 325 | // Outside Corner 326 | this.createGroundTile(x1 * 16, MAP_HEIGHT - (48 + y * 16), 83); 327 | // Top Ground 328 | for (var i = x1 + 1; i < x2; i += 1) { 329 | this.createGroundTile(i * 16, MAP_HEIGHT - (48 + y * 16), 84); 330 | for (var j = 0; j < y; j++) { 331 | this.createGroundTile(i * 16, MAP_HEIGHT - (48 + j * 16), 109); 332 | } 333 | } 334 | // Outside Corner 335 | this.createGroundTile(x2 * 16, MAP_HEIGHT - (48 + y * 16), 85); 336 | // Left Vertical 337 | for (var j = 0; j < y - 1; j++) { 338 | const tile = this.createTile(x2 * 16, MAP_HEIGHT - (64 + j * 16), 110); 339 | tile.body.checkCollision.up = false; 340 | tile.body.checkCollision.down = false; 341 | } 342 | // Inside Corner 343 | this.createGroundTile(x2 * 16, MAP_HEIGHT_48, 182); 344 | for (var i = x1; i < x2 + 1; i += 1) { 345 | this.createGroundTile(i * 16, MAP_HEIGHT_16, 109); 346 | this.createGroundTile(i * 16, MAP_HEIGHT_32, 109); 347 | } 348 | }; 349 | 350 | createGap = (x, width) => { 351 | this.createGroundTile(x * 16, MAP_HEIGHT_48, 85); 352 | this.createTile(x * 16, MAP_HEIGHT_32, 110); 353 | this.createTile(x * 16, MAP_HEIGHT_16, 110); 354 | this.createTile((x + width) * 16, MAP_HEIGHT_32, 108); 355 | this.createTile((x + width) * 16, MAP_HEIGHT_16, 108); 356 | this.createGroundTile((x + width) * 16, MAP_HEIGHT_48, 83); 357 | }; 358 | 359 | createDitch = (x1, x2) => { 360 | this.createGroundTile(x1 * 16, MAP_HEIGHT_48, 85); 361 | this.createGroundTile(x1 * 16, MAP_HEIGHT_32, 182); 362 | this.createGroundTile(x1 * 16, MAP_HEIGHT_16, 109); 363 | for (let i = x1 + 1; i < x2; i += 1) { 364 | this.createGroundTile(i * 16, MAP_HEIGHT_32, 84); 365 | this.createGroundTile(i * 16, MAP_HEIGHT_16, 109); 366 | } 367 | this.createGroundTile(x2 * 16, MAP_HEIGHT_32, 183); 368 | this.createGroundTile(x2 * 16, MAP_HEIGHT_16, 109); 369 | this.createGroundTile(x2 * 16, MAP_HEIGHT_48, 83); 370 | }; 371 | 372 | createGround = (x1, x2) => { 373 | for (let i = x1; i < x2; i += 1) { 374 | this.createGroundTile(i * 16, MAP_HEIGHT_48, 84); 375 | this.createGroundTile(i * 16, MAP_HEIGHT_16, 109); 376 | this.createGroundTile(i * 16, MAP_HEIGHT_32, 109); 377 | } 378 | }; 379 | 380 | createGroundTile = (x, y, frame) => { 381 | const tile = scaleIt(this.game.groundTilesGroup.create(x, y, 'groundTiles', frame)); 382 | tile.body.immovable = true; 383 | }; 384 | 385 | createTile = (x, y, frame) => { 386 | const tile = this.game.tilesGroup.create(x, y, 'groundTiles', frame); 387 | tile.body.immovable = true; 388 | scaleIt(tile); 389 | return tile; 390 | }; 391 | 392 | createBushes = () => { 393 | this.createBush(64, MAP_HEIGHT - 64, 73); 394 | this.createBush(320, MAP_HEIGHT - 64, 72); 395 | this.createBush(480, MAP_HEIGHT - 64, 72); 396 | this.createBush(640, MAP_HEIGHT - 64, 73); 397 | this.createBush(736, MAP_HEIGHT - 64, 72); 398 | this.createBush(1056, MAP_HEIGHT - 128, 72); 399 | this.createBush(1616, MAP_HEIGHT - 64, 73); 400 | this.createBush(1728, MAP_HEIGHT - 64, 73); 401 | this.createBush(2464, MAP_HEIGHT - 64, 72); 402 | this.createBush(3200, MAP_HEIGHT - 64, 72); 403 | this.createBush(3712, MAP_HEIGHT - 64, 72); 404 | this.createBush(3984, MAP_HEIGHT - 64, 72); 405 | this.createBush(4224, MAP_HEIGHT - 64, 72); 406 | }; 407 | 408 | createBush = (x, y, frame) => { 409 | const bush = this.game.add.sprite(x, y, 'background-objects', frame); 410 | scaleIt(bush); 411 | }; 412 | 413 | buildSlopes = () => { 414 | // Slopes 415 | this.game.mapSlope = this.game.add.tilemap('level'); 416 | this.game.mapSlope.addTilesetImage('collision', 'collision-spritesheet'); 417 | // this.game.groundSlope = this.game.mapSlope.createLayer('collision'); 418 | 419 | // this.game.slopes.convertTilemapLayer(this.game.groundSlope, { 420 | // 2: 'FULL', 421 | // 3: 'HALF_BOTTOM_LEFT', 422 | // 4: 'HALF_BOTTOM_RIGHT', 423 | // 6: 'HALF_TOP_LEFT', 424 | // 5: 'HALF_TOP_RIGHT', 425 | // 15: 'QUARTER_BOTTOM_LEFT_LOW', 426 | // 16: 'QUARTER_BOTTOM_RIGHT_LOW', 427 | // 17: 'QUARTER_TOP_RIGHT_LOW', 428 | // 18: 'QUARTER_TOP_LEFT_LOW', 429 | // 19: 'QUARTER_BOTTOM_LEFT_HIGH', 430 | // 20: 'QUARTER_BOTTOM_RIGHT_HIGH', 431 | // 21: 'QUARTER_TOP_RIGHT_HIGH', 432 | // 22: 'QUARTER_TOP_LEFT_HIGH', 433 | // 23: 'QUARTER_LEFT_BOTTOM_HIGH', 434 | // 24: 'QUARTER_RIGHT_BOTTOM_HIGH', 435 | // 25: 'QUARTER_RIGHT_TOP_LOW', 436 | // 26: 'QUARTER_LEFT_TOP_LOW', 437 | // 27: 'QUARTER_LEFT_BOTTOM_LOW', 438 | // 28: 'QUARTER_RIGHT_BOTTOM_LOW', 439 | // 29: 'QUARTER_RIGHT_TOP_HIGH', 440 | // 30: 'QUARTER_LEFT_TOP_HIGH', 441 | // 31: 'HALF_BOTTOM', 442 | // 32: 'HALF_RIGHT', 443 | // 33: 'HALF_TOP', 444 | // 34: 'HALF_LEFT', 445 | // }); 446 | // return; 447 | 448 | this.game.mapSlope.setCollisionBetween(2, 34, true, 'collision'); 449 | 450 | // This should work, but doesn't seem to work for the slopes engine 451 | this.game.mapSlope.forEach( 452 | tile => { 453 | if (tile.index == 3 || tile.index == 4) { 454 | tile.collideDown = false; 455 | tile.collideRight = false; 456 | tile.collideLeft = false; 457 | } 458 | }, 459 | this, 460 | 0, 461 | 0, 462 | this.game.mapSlope.width, 463 | this.game.mapSlope.height, 464 | 0 465 | ); 466 | }; 467 | oneWayCollision(platform) { 468 | platform.body.checkCollision.down = false; 469 | platform.body.checkCollision.left = false; 470 | platform.body.checkCollision.right = false; 471 | scaleIt(platform); 472 | } 473 | } 474 | 475 | export default Map; 476 | 477 | function scaleIt(node) { 478 | node.x *= SCALE; 479 | node.y *= SCALE; 480 | node.scale.setTo(SCALE, SCALE); 481 | // node.width *= scale; 482 | // node.height *= scale; 483 | 484 | // if (node.body) { 485 | // node.body.width = node.width; 486 | // node.body.height = node.height; 487 | // } 488 | 489 | return node; 490 | } 491 | -------------------------------------------------------------------------------- /assets/images/tiles/level.json: -------------------------------------------------------------------------------- 1 | { "backgroundcolor":"#8d549b", 2 | "height":27, 3 | "layers":[ 4 | { 5 | "data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 31 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 32 | "height":27, 33 | "name":"collision", 34 | "opacity":1, 35 | "type":"tilelayer", 36 | "visible":true, 37 | "width":320, 38 | "x":0, 39 | "y":0 40 | }], 41 | "nextobjectid":1, 42 | "orientation":"orthogonal", 43 | "renderorder":"right-down", 44 | "tileheight":16, 45 | "tilesets":[ 46 | { 47 | "columns":16, 48 | "firstgid":1, 49 | "image":"..\/tilesheets\/ninja-tiles16.png", 50 | "imageheight":48, 51 | "imagewidth":256, 52 | "margin":0, 53 | "name":"collision", 54 | "spacing":0, 55 | "tilecount":48, 56 | "tileheight":16, 57 | "tileproperties": 58 | { 59 | "1": 60 | { 61 | "type":"FULL" 62 | }, 63 | "14": 64 | { 65 | "type":"QUARTER_BOTTOM_LEFT_LOW" 66 | }, 67 | "15": 68 | { 69 | "type":"QUARTER_BOTTOM_RIGHT_LOW" 70 | }, 71 | "16": 72 | { 73 | "type":"QUARTER_TOP_RIGHT_LOW" 74 | }, 75 | "17": 76 | { 77 | "type":"QUARTER_TOP_LEFT_LOW" 78 | }, 79 | "18": 80 | { 81 | "type":"QUARTER_BOTTOM_LEFT_HIGH" 82 | }, 83 | "19": 84 | { 85 | "type":"QUARTER_BOTTOM_RIGHT_HIGH" 86 | }, 87 | "2": 88 | { 89 | "type":"HALF_BOTTOM_LEFT" 90 | }, 91 | "20": 92 | { 93 | "type":"QUARTER_TOP_RIGHT_HIGH" 94 | }, 95 | "21": 96 | { 97 | "type":"QUARTER_TOP_LEFT_HIGH" 98 | }, 99 | "22": 100 | { 101 | "type":"QUARTER_LEFT_BOTTOM_HIGH" 102 | }, 103 | "23": 104 | { 105 | "type":"QUARTER_RIGHT_BOTTOM_HIGH" 106 | }, 107 | "24": 108 | { 109 | "type":"QUARTER_RIGHT_TOP_LOW" 110 | }, 111 | "25": 112 | { 113 | "type":"QUARTER_LEFT_TOP_LOW" 114 | }, 115 | "26": 116 | { 117 | "type":"QUARTER_LEFT_BOTTOM_LOW" 118 | }, 119 | "27": 120 | { 121 | "type":"QUARTER_RIGHT_BOTTOM_LOW" 122 | }, 123 | "28": 124 | { 125 | "type":"QUARTER_RIGHT_TOP_HIGH" 126 | }, 127 | "29": 128 | { 129 | "type":"QUARTER_LEFT_TOP_HIGH" 130 | }, 131 | "3": 132 | { 133 | "type":"HALF_BOTTOM_RIGHT" 134 | }, 135 | "30": 136 | { 137 | "type":"HALF_BOTTOM" 138 | }, 139 | "31": 140 | { 141 | "type":"HALF_RIGHT" 142 | }, 143 | "32": 144 | { 145 | "type":"HALF_TOP" 146 | }, 147 | "33": 148 | { 149 | "type":"HALF_LEFT" 150 | }, 151 | "4": 152 | { 153 | "type":"HALF_TOP_RIGHT" 154 | }, 155 | "5": 156 | { 157 | "type":"HALF_TOP_LEFT" 158 | } 159 | }, 160 | "tilepropertytypes": 161 | { 162 | "1": 163 | { 164 | "type":"string" 165 | }, 166 | "14": 167 | { 168 | "type":"string" 169 | }, 170 | "15": 171 | { 172 | "type":"string" 173 | }, 174 | "16": 175 | { 176 | "type":"string" 177 | }, 178 | "17": 179 | { 180 | "type":"string" 181 | }, 182 | "18": 183 | { 184 | "type":"string" 185 | }, 186 | "19": 187 | { 188 | "type":"string" 189 | }, 190 | "2": 191 | { 192 | "type":"string" 193 | }, 194 | "20": 195 | { 196 | "type":"string" 197 | }, 198 | "21": 199 | { 200 | "type":"string" 201 | }, 202 | "22": 203 | { 204 | "type":"string" 205 | }, 206 | "23": 207 | { 208 | "type":"string" 209 | }, 210 | "24": 211 | { 212 | "type":"string" 213 | }, 214 | "25": 215 | { 216 | "type":"string" 217 | }, 218 | "26": 219 | { 220 | "type":"string" 221 | }, 222 | "27": 223 | { 224 | "type":"string" 225 | }, 226 | "28": 227 | { 228 | "type":"string" 229 | }, 230 | "29": 231 | { 232 | "type":"string" 233 | }, 234 | "3": 235 | { 236 | "type":"string" 237 | }, 238 | "30": 239 | { 240 | "type":"string" 241 | }, 242 | "31": 243 | { 244 | "type":"string" 245 | }, 246 | "32": 247 | { 248 | "type":"string" 249 | }, 250 | "33": 251 | { 252 | "type":"string" 253 | }, 254 | "4": 255 | { 256 | "type":"string" 257 | }, 258 | "5": 259 | { 260 | "type":"string" 261 | } 262 | }, 263 | "tiles": 264 | { 265 | "2": 266 | { 267 | "objectgroup": 268 | { 269 | "color":"#000000", 270 | "draworder":"index", 271 | "height":0, 272 | "name":"", 273 | "objects":[], 274 | "opacity":1, 275 | "type":"objectgroup", 276 | "visible":true, 277 | "width":0, 278 | "x":0, 279 | "y":0 280 | } 281 | }, 282 | "3": 283 | { 284 | "objectgroup": 285 | { 286 | "draworder":"index", 287 | "height":0, 288 | "name":"", 289 | "objects":[], 290 | "opacity":1, 291 | "type":"objectgroup", 292 | "visible":true, 293 | "width":0, 294 | "x":0, 295 | "y":0 296 | } 297 | } 298 | }, 299 | "tilewidth":16 300 | }], 301 | "tilewidth":16, 302 | "version":1, 303 | "width":320 304 | } 305 | -------------------------------------------------------------------------------- /assets/images/hud/hud.json: -------------------------------------------------------------------------------- 1 | { 2 | "frames":[ 3 | { 4 | "filename":"sprite1", 5 | "frame":{ 6 | "x":114, 7 | "y":9, 8 | "w":28, 9 | "h":28 10 | }, 11 | "rotated":false, 12 | "trimmed":false, 13 | "spriteSourceSize":{ 14 | "x":0, 15 | "y":0, 16 | "w":28, 17 | "h":28 18 | }, 19 | "sourceSize":{ 20 | "w":28, 21 | "h":28 22 | } 23 | }, 24 | { 25 | "filename":"sprite2", 26 | "frame":{ 27 | "x":16, 28 | "y":15, 29 | "w":40, 30 | "h":8 31 | }, 32 | "rotated":false, 33 | "trimmed":false, 34 | "spriteSourceSize":{ 35 | "x":0, 36 | "y":0, 37 | "w":40, 38 | "h":8 39 | }, 40 | "sourceSize":{ 41 | "w":40, 42 | "h":8 43 | } 44 | }, 45 | { 46 | "filename":"sprite3", 47 | "frame":{ 48 | "x":152, 49 | "y":15, 50 | "w":24, 51 | "h":7 52 | }, 53 | "rotated":false, 54 | "trimmed":false, 55 | "spriteSourceSize":{ 56 | "x":0, 57 | "y":0, 58 | "w":24, 59 | "h":7 60 | }, 61 | "sourceSize":{ 62 | "w":24, 63 | "h":7 64 | } 65 | }, 66 | { 67 | "filename":"sprite4", 68 | "frame":{ 69 | "x":200, 70 | "y":15, 71 | "w":8, 72 | "h":8 73 | }, 74 | "rotated":false, 75 | "trimmed":false, 76 | "spriteSourceSize":{ 77 | "x":0, 78 | "y":0, 79 | "w":8, 80 | "h":8 81 | }, 82 | "sourceSize":{ 83 | "w":8, 84 | "h":8 85 | } 86 | }, 87 | { 88 | "filename":"sprite5", 89 | "frame":{ 90 | "x":96, 91 | "y":16, 92 | "w":16, 93 | "h":14 94 | }, 95 | "rotated":false, 96 | "trimmed":false, 97 | "spriteSourceSize":{ 98 | "x":0, 99 | "y":0, 100 | "w":16, 101 | "h":14 102 | }, 103 | "sourceSize":{ 104 | "w":16, 105 | "h":14 106 | } 107 | }, 108 | { 109 | "filename":"sprite6", 110 | "frame":{ 111 | "x":209, 112 | "y":16, 113 | "w":7, 114 | "h":7 115 | }, 116 | "rotated":false, 117 | "trimmed":false, 118 | "spriteSourceSize":{ 119 | "x":0, 120 | "y":0, 121 | "w":7, 122 | "h":7 123 | }, 124 | "sourceSize":{ 125 | "w":7, 126 | "h":7 127 | } 128 | }, 129 | { 130 | "filename":"sprite7", 131 | "frame":{ 132 | "x":232, 133 | "y":16, 134 | "w":8, 135 | "h":7 136 | }, 137 | "rotated":false, 138 | "trimmed":false, 139 | "spriteSourceSize":{ 140 | "x":0, 141 | "y":0, 142 | "w":8, 143 | "h":7 144 | }, 145 | "sourceSize":{ 146 | "w":8, 147 | "h":7 148 | } 149 | }, 150 | { 151 | "filename":"sprite8", 152 | "frame":{ 153 | "x":6, 154 | "y":20, 155 | "w":8, 156 | "h":8 157 | }, 158 | "rotated":false, 159 | "trimmed":false, 160 | "spriteSourceSize":{ 161 | "x":0, 162 | "y":0, 163 | "w":8, 164 | "h":8 165 | }, 166 | "sourceSize":{ 167 | "w":8, 168 | "h":8 169 | } 170 | }, 171 | { 172 | "filename":"sprite9", 173 | "frame":{ 174 | "x":72, 175 | "y":23, 176 | "w":8, 177 | "h":8 178 | }, 179 | "rotated":false, 180 | "trimmed":false, 181 | "spriteSourceSize":{ 182 | "x":0, 183 | "y":0, 184 | "w":8, 185 | "h":8 186 | }, 187 | "sourceSize":{ 188 | "w":8, 189 | "h":8 190 | } 191 | }, 192 | { 193 | "filename":"sprite10", 194 | "frame":{ 195 | "x":25, 196 | "y":24, 197 | "w":23, 198 | "h":7 199 | }, 200 | "rotated":false, 201 | "trimmed":false, 202 | "spriteSourceSize":{ 203 | "x":0, 204 | "y":0, 205 | "w":23, 206 | "h":7 207 | }, 208 | "sourceSize":{ 209 | "w":23, 210 | "h":7 211 | } 212 | }, 213 | { 214 | "filename":"sprite11", 215 | "frame":{ 216 | "x":81, 217 | "y":24, 218 | "w":7, 219 | "h":7 220 | }, 221 | "rotated":false, 222 | "trimmed":false, 223 | "spriteSourceSize":{ 224 | "x":0, 225 | "y":0, 226 | "w":7, 227 | "h":7 228 | }, 229 | "sourceSize":{ 230 | "w":7, 231 | "h":7 232 | } 233 | }, 234 | { 235 | "filename":"sprite12", 236 | "frame":{ 237 | "x":130, 238 | "y":24, 239 | "w":47, 240 | "h":64 241 | }, 242 | "rotated":false, 243 | "trimmed":false, 244 | "spriteSourceSize":{ 245 | "x":0, 246 | "y":0, 247 | "w":47, 248 | "h":64 249 | }, 250 | "sourceSize":{ 251 | "w":47, 252 | "h":64 253 | } 254 | }, 255 | { 256 | "filename":"sprite13", 257 | "frame":{ 258 | "x":184, 259 | "y":24, 260 | "w":56, 261 | "h":7 262 | }, 263 | "rotated":false, 264 | "trimmed":false, 265 | "spriteSourceSize":{ 266 | "x":0, 267 | "y":0, 268 | "w":56, 269 | "h":7 270 | }, 271 | "sourceSize":{ 272 | "w":56, 273 | "h":7 274 | } 275 | }, 276 | { 277 | "filename":"sprite14", 278 | "frame":{ 279 | "x":4, 280 | "y":28, 281 | "w":8, 282 | "h":15 283 | }, 284 | "rotated":false, 285 | "trimmed":false, 286 | "spriteSourceSize":{ 287 | "x":0, 288 | "y":0, 289 | "w":8, 290 | "h":15 291 | }, 292 | "sourceSize":{ 293 | "w":8, 294 | "h":15 295 | } 296 | }, 297 | { 298 | "filename":"sprite15", 299 | "frame":{ 300 | "x":98, 301 | "y":33, 302 | "w":8, 303 | "h":13 304 | }, 305 | "rotated":false, 306 | "trimmed":false, 307 | "spriteSourceSize":{ 308 | "x":0, 309 | "y":0, 310 | "w":8, 311 | "h":13 312 | }, 313 | "sourceSize":{ 314 | "w":8, 315 | "h":13 316 | } 317 | }, 318 | { 319 | "filename":"sprite16", 320 | "frame":{ 321 | "x":194, 322 | "y":35, 323 | "w":5, 324 | "h":32 325 | }, 326 | "rotated":false, 327 | "trimmed":false, 328 | "spriteSourceSize":{ 329 | "x":0, 330 | "y":0, 331 | "w":5, 332 | "h":32 333 | }, 334 | "sourceSize":{ 335 | "w":5, 336 | "h":32 337 | } 338 | }, 339 | { 340 | "filename":"sprite17", 341 | "frame":{ 342 | "x":2, 343 | "y":47, 344 | "w":40, 345 | "h":8 346 | }, 347 | "rotated":false, 348 | "trimmed":false, 349 | "spriteSourceSize":{ 350 | "x":0, 351 | "y":0, 352 | "w":40, 353 | "h":8 354 | }, 355 | "sourceSize":{ 356 | "w":40, 357 | "h":8 358 | } 359 | }, 360 | { 361 | "filename":"sprite18", 362 | "frame":{ 363 | "x":61, 364 | "y":49, 365 | "w":8, 366 | "h":14 367 | }, 368 | "rotated":false, 369 | "trimmed":false, 370 | "spriteSourceSize":{ 371 | "x":0, 372 | "y":0, 373 | "w":8, 374 | "h":14 375 | }, 376 | "sourceSize":{ 377 | "w":8, 378 | "h":14 379 | } 380 | }, 381 | { 382 | "filename":"sprite19", 383 | "frame":{ 384 | "x":70, 385 | "y":49, 386 | "w":5, 387 | "h":14 388 | }, 389 | "rotated":false, 390 | "trimmed":false, 391 | "spriteSourceSize":{ 392 | "x":0, 393 | "y":0, 394 | "w":5, 395 | "h":14 396 | }, 397 | "sourceSize":{ 398 | "w":5, 399 | "h":14 400 | } 401 | }, 402 | { 403 | "filename":"sprite20", 404 | "frame":{ 405 | "x":76, 406 | "y":49, 407 | "w":8, 408 | "h":14 409 | }, 410 | "rotated":false, 411 | "trimmed":false, 412 | "spriteSourceSize":{ 413 | "x":0, 414 | "y":0, 415 | "w":8, 416 | "h":14 417 | }, 418 | "sourceSize":{ 419 | "w":8, 420 | "h":14 421 | } 422 | }, 423 | { 424 | "filename":"sprite21", 425 | "frame":{ 426 | "x":85, 427 | "y":49, 428 | "w":8, 429 | "h":14 430 | }, 431 | "rotated":false, 432 | "trimmed":false, 433 | "spriteSourceSize":{ 434 | "x":0, 435 | "y":0, 436 | "w":8, 437 | "h":14 438 | }, 439 | "sourceSize":{ 440 | "w":8, 441 | "h":14 442 | } 443 | }, 444 | { 445 | "filename":"sprite22", 446 | "frame":{ 447 | "x":94, 448 | "y":49, 449 | "w":8, 450 | "h":14 451 | }, 452 | "rotated":false, 453 | "trimmed":false, 454 | "spriteSourceSize":{ 455 | "x":0, 456 | "y":0, 457 | "w":8, 458 | "h":14 459 | }, 460 | "sourceSize":{ 461 | "w":8, 462 | "h":14 463 | } 464 | }, 465 | { 466 | "filename":"sprite23", 467 | "frame":{ 468 | "x":103, 469 | "y":49, 470 | "w":8, 471 | "h":14 472 | }, 473 | "rotated":false, 474 | "trimmed":false, 475 | "spriteSourceSize":{ 476 | "x":0, 477 | "y":0, 478 | "w":8, 479 | "h":14 480 | }, 481 | "sourceSize":{ 482 | "w":8, 483 | "h":14 484 | } 485 | }, 486 | { 487 | "filename":"sprite24", 488 | "frame":{ 489 | "x":112, 490 | "y":49, 491 | "w":8, 492 | "h":14 493 | }, 494 | "rotated":false, 495 | "trimmed":false, 496 | "spriteSourceSize":{ 497 | "x":0, 498 | "y":0, 499 | "w":8, 500 | "h":14 501 | }, 502 | "sourceSize":{ 503 | "w":8, 504 | "h":14 505 | } 506 | }, 507 | { 508 | "filename":"sprite25", 509 | "frame":{ 510 | "x":121, 511 | "y":49, 512 | "w":8, 513 | "h":14 514 | }, 515 | "rotated":false, 516 | "trimmed":false, 517 | "spriteSourceSize":{ 518 | "x":0, 519 | "y":0, 520 | "w":8, 521 | "h":14 522 | }, 523 | "sourceSize":{ 524 | "w":8, 525 | "h":14 526 | } 527 | }, 528 | { 529 | "filename":"sprite26", 530 | "frame":{ 531 | "x":2, 532 | "y":56, 533 | "w":18, 534 | "h":8 535 | }, 536 | "rotated":false, 537 | "trimmed":false, 538 | "spriteSourceSize":{ 539 | "x":0, 540 | "y":0, 541 | "w":18, 542 | "h":8 543 | }, 544 | "sourceSize":{ 545 | "w":18, 546 | "h":8 547 | } 548 | }, 549 | { 550 | "filename":"sprite27", 551 | "frame":{ 552 | "x":21, 553 | "y":56, 554 | "w":5, 555 | "h":8 556 | }, 557 | "rotated":false, 558 | "trimmed":false, 559 | "spriteSourceSize":{ 560 | "x":0, 561 | "y":0, 562 | "w":5, 563 | "h":8 564 | }, 565 | "sourceSize":{ 566 | "w":5, 567 | "h":8 568 | } 569 | }, 570 | { 571 | "filename":"sprite28", 572 | "frame":{ 573 | "x":27, 574 | "y":56, 575 | "w":9, 576 | "h":8 577 | }, 578 | "rotated":false, 579 | "trimmed":false, 580 | "spriteSourceSize":{ 581 | "x":0, 582 | "y":0, 583 | "w":9, 584 | "h":8 585 | }, 586 | "sourceSize":{ 587 | "w":9, 588 | "h":8 589 | } 590 | }, 591 | { 592 | "filename":"sprite29", 593 | "frame":{ 594 | "x":37, 595 | "y":56, 596 | "w":5, 597 | "h":8 598 | }, 599 | "rotated":false, 600 | "trimmed":false, 601 | "spriteSourceSize":{ 602 | "x":0, 603 | "y":0, 604 | "w":5, 605 | "h":8 606 | }, 607 | "sourceSize":{ 608 | "w":5, 609 | "h":8 610 | } 611 | }, 612 | { 613 | "filename":"sprite30", 614 | "frame":{ 615 | "x":178, 616 | "y":71, 617 | "w":5, 618 | "h":7 619 | }, 620 | "rotated":false, 621 | "trimmed":false, 622 | "spriteSourceSize":{ 623 | "x":0, 624 | "y":0, 625 | "w":5, 626 | "h":7 627 | }, 628 | "sourceSize":{ 629 | "w":5, 630 | "h":7 631 | } 632 | }, 633 | { 634 | "filename":"sprite31", 635 | "frame":{ 636 | "x":184, 637 | "y":71, 638 | "w":8, 639 | "h":7 640 | }, 641 | "rotated":false, 642 | "trimmed":false, 643 | "spriteSourceSize":{ 644 | "x":0, 645 | "y":0, 646 | "w":8, 647 | "h":7 648 | }, 649 | "sourceSize":{ 650 | "w":8, 651 | "h":7 652 | } 653 | }, 654 | { 655 | "filename":"sprite32", 656 | "frame":{ 657 | "x":193, 658 | "y":71, 659 | "w":8, 660 | "h":7 661 | }, 662 | "rotated":false, 663 | "trimmed":false, 664 | "spriteSourceSize":{ 665 | "x":0, 666 | "y":0, 667 | "w":8, 668 | "h":7 669 | }, 670 | "sourceSize":{ 671 | "w":8, 672 | "h":7 673 | } 674 | }, 675 | { 676 | "filename":"sprite33", 677 | "frame":{ 678 | "x":202, 679 | "y":71, 680 | "w":8, 681 | "h":7 682 | }, 683 | "rotated":false, 684 | "trimmed":false, 685 | "spriteSourceSize":{ 686 | "x":0, 687 | "y":0, 688 | "w":8, 689 | "h":7 690 | }, 691 | "sourceSize":{ 692 | "w":8, 693 | "h":7 694 | } 695 | }, 696 | { 697 | "filename":"sprite34", 698 | "frame":{ 699 | "x":211, 700 | "y":71, 701 | "w":8, 702 | "h":7 703 | }, 704 | "rotated":false, 705 | "trimmed":false, 706 | "spriteSourceSize":{ 707 | "x":0, 708 | "y":0, 709 | "w":8, 710 | "h":7 711 | }, 712 | "sourceSize":{ 713 | "w":8, 714 | "h":7 715 | } 716 | }, 717 | { 718 | "filename":"sprite35", 719 | "frame":{ 720 | "x":220, 721 | "y":71, 722 | "w":8, 723 | "h":7 724 | }, 725 | "rotated":false, 726 | "trimmed":false, 727 | "spriteSourceSize":{ 728 | "x":0, 729 | "y":0, 730 | "w":8, 731 | "h":7 732 | }, 733 | "sourceSize":{ 734 | "w":8, 735 | "h":7 736 | } 737 | }, 738 | { 739 | "filename":"sprite36", 740 | "frame":{ 741 | "x":229, 742 | "y":71, 743 | "w":8, 744 | "h":7 745 | }, 746 | "rotated":false, 747 | "trimmed":false, 748 | "spriteSourceSize":{ 749 | "x":0, 750 | "y":0, 751 | "w":8, 752 | "h":7 753 | }, 754 | "sourceSize":{ 755 | "w":8, 756 | "h":7 757 | } 758 | }, 759 | { 760 | "filename":"sprite37", 761 | "frame":{ 762 | "x":238, 763 | "y":71, 764 | "w":8, 765 | "h":7 766 | }, 767 | "rotated":false, 768 | "trimmed":false, 769 | "spriteSourceSize":{ 770 | "x":0, 771 | "y":0, 772 | "w":8, 773 | "h":7 774 | }, 775 | "sourceSize":{ 776 | "w":8, 777 | "h":7 778 | } 779 | }, 780 | { 781 | "filename":"sprite38", 782 | "frame":{ 783 | "x":247, 784 | "y":71, 785 | "w":8, 786 | "h":7 787 | }, 788 | "rotated":false, 789 | "trimmed":false, 790 | "spriteSourceSize":{ 791 | "x":0, 792 | "y":0, 793 | "w":8, 794 | "h":7 795 | }, 796 | "sourceSize":{ 797 | "w":8, 798 | "h":7 799 | } 800 | }, 801 | { 802 | "filename":"sprite39", 803 | "frame":{ 804 | "x":72, 805 | "y":72, 806 | "w":1, 807 | "h":1 808 | }, 809 | "rotated":false, 810 | "trimmed":false, 811 | "spriteSourceSize":{ 812 | "x":0, 813 | "y":0, 814 | "w":1, 815 | "h":1 816 | }, 817 | "sourceSize":{ 818 | "w":1, 819 | "h":1 820 | } 821 | }, 822 | { 823 | "filename":"sprite40", 824 | "frame":{ 825 | "x":89, 826 | "y":72, 827 | "w":1, 828 | "h":1 829 | }, 830 | "rotated":false, 831 | "trimmed":false, 832 | "spriteSourceSize":{ 833 | "x":0, 834 | "y":0, 835 | "w":1, 836 | "h":1 837 | }, 838 | "sourceSize":{ 839 | "w":1, 840 | "h":1 841 | } 842 | }, 843 | { 844 | "filename":"sprite41", 845 | "frame":{ 846 | "x":92, 847 | "y":72, 848 | "w":1, 849 | "h":1 850 | }, 851 | "rotated":false, 852 | "trimmed":false, 853 | "spriteSourceSize":{ 854 | "x":0, 855 | "y":0, 856 | "w":1, 857 | "h":1 858 | }, 859 | "sourceSize":{ 860 | "w":1, 861 | "h":1 862 | } 863 | }, 864 | { 865 | "filename":"sprite42", 866 | "frame":{ 867 | "x":109, 868 | "y":72, 869 | "w":1, 870 | "h":1 871 | }, 872 | "rotated":false, 873 | "trimmed":false, 874 | "spriteSourceSize":{ 875 | "x":0, 876 | "y":0, 877 | "w":1, 878 | "h":1 879 | }, 880 | "sourceSize":{ 881 | "w":1, 882 | "h":1 883 | } 884 | }, 885 | { 886 | "filename":"sprite43", 887 | "frame":{ 888 | "x":112, 889 | "y":72, 890 | "w":1, 891 | "h":1 892 | }, 893 | "rotated":false, 894 | "trimmed":false, 895 | "spriteSourceSize":{ 896 | "x":0, 897 | "y":0, 898 | "w":1, 899 | "h":1 900 | }, 901 | "sourceSize":{ 902 | "w":1, 903 | "h":1 904 | } 905 | }, 906 | { 907 | "filename":"sprite44", 908 | "frame":{ 909 | "x":129, 910 | "y":72, 911 | "w":1, 912 | "h":1 913 | }, 914 | "rotated":false, 915 | "trimmed":false, 916 | "spriteSourceSize":{ 917 | "x":0, 918 | "y":0, 919 | "w":1, 920 | "h":1 921 | }, 922 | "sourceSize":{ 923 | "w":1, 924 | "h":1 925 | } 926 | }, 927 | { 928 | "filename":"sprite45", 929 | "frame":{ 930 | "x":73, 931 | "y":73, 932 | "w":16, 933 | "h":16 934 | }, 935 | "rotated":false, 936 | "trimmed":false, 937 | "spriteSourceSize":{ 938 | "x":0, 939 | "y":0, 940 | "w":16, 941 | "h":16 942 | }, 943 | "sourceSize":{ 944 | "w":16, 945 | "h":16 946 | } 947 | }, 948 | { 949 | "filename":"sprite46", 950 | "frame":{ 951 | "x":92, 952 | "y":73, 953 | "w":17, 954 | "h":17 955 | }, 956 | "rotated":false, 957 | "trimmed":false, 958 | "spriteSourceSize":{ 959 | "x":0, 960 | "y":0, 961 | "w":17, 962 | "h":17 963 | }, 964 | "sourceSize":{ 965 | "w":17, 966 | "h":17 967 | } 968 | }, 969 | { 970 | "filename":"sprite47", 971 | "frame":{ 972 | "x":112, 973 | "y":73, 974 | "w":17, 975 | "h":17 976 | }, 977 | "rotated":false, 978 | "trimmed":false, 979 | "spriteSourceSize":{ 980 | "x":0, 981 | "y":0, 982 | "w":17, 983 | "h":17 984 | }, 985 | "sourceSize":{ 986 | "w":17, 987 | "h":17 988 | } 989 | }, 990 | { 991 | "filename":"sprite48", 992 | "frame":{ 993 | "x":178, 994 | "y":81, 995 | "w":5, 996 | "h":7 997 | }, 998 | "rotated":false, 999 | "trimmed":false, 1000 | "spriteSourceSize":{ 1001 | "x":0, 1002 | "y":0, 1003 | "w":5, 1004 | "h":7 1005 | }, 1006 | "sourceSize":{ 1007 | "w":5, 1008 | "h":7 1009 | } 1010 | }, 1011 | { 1012 | "filename":"sprite49", 1013 | "frame":{ 1014 | "x":184, 1015 | "y":81, 1016 | "w":8, 1017 | "h":7 1018 | }, 1019 | "rotated":false, 1020 | "trimmed":false, 1021 | "spriteSourceSize":{ 1022 | "x":0, 1023 | "y":0, 1024 | "w":8, 1025 | "h":7 1026 | }, 1027 | "sourceSize":{ 1028 | "w":8, 1029 | "h":7 1030 | } 1031 | }, 1032 | { 1033 | "filename":"sprite50", 1034 | "frame":{ 1035 | "x":193, 1036 | "y":81, 1037 | "w":8, 1038 | "h":7 1039 | }, 1040 | "rotated":false, 1041 | "trimmed":false, 1042 | "spriteSourceSize":{ 1043 | "x":0, 1044 | "y":0, 1045 | "w":8, 1046 | "h":7 1047 | }, 1048 | "sourceSize":{ 1049 | "w":8, 1050 | "h":7 1051 | } 1052 | }, 1053 | { 1054 | "filename":"sprite51", 1055 | "frame":{ 1056 | "x":202, 1057 | "y":81, 1058 | "w":8, 1059 | "h":7 1060 | }, 1061 | "rotated":false, 1062 | "trimmed":false, 1063 | "spriteSourceSize":{ 1064 | "x":0, 1065 | "y":0, 1066 | "w":8, 1067 | "h":7 1068 | }, 1069 | "sourceSize":{ 1070 | "w":8, 1071 | "h":7 1072 | } 1073 | }, 1074 | { 1075 | "filename":"sprite52", 1076 | "frame":{ 1077 | "x":211, 1078 | "y":81, 1079 | "w":8, 1080 | "h":7 1081 | }, 1082 | "rotated":false, 1083 | "trimmed":false, 1084 | "spriteSourceSize":{ 1085 | "x":0, 1086 | "y":0, 1087 | "w":8, 1088 | "h":7 1089 | }, 1090 | "sourceSize":{ 1091 | "w":8, 1092 | "h":7 1093 | } 1094 | }, 1095 | { 1096 | "filename":"sprite53", 1097 | "frame":{ 1098 | "x":220, 1099 | "y":81, 1100 | "w":8, 1101 | "h":7 1102 | }, 1103 | "rotated":false, 1104 | "trimmed":false, 1105 | "spriteSourceSize":{ 1106 | "x":0, 1107 | "y":0, 1108 | "w":8, 1109 | "h":7 1110 | }, 1111 | "sourceSize":{ 1112 | "w":8, 1113 | "h":7 1114 | } 1115 | }, 1116 | { 1117 | "filename":"sprite54", 1118 | "frame":{ 1119 | "x":229, 1120 | "y":81, 1121 | "w":8, 1122 | "h":7 1123 | }, 1124 | "rotated":false, 1125 | "trimmed":false, 1126 | "spriteSourceSize":{ 1127 | "x":0, 1128 | "y":0, 1129 | "w":8, 1130 | "h":7 1131 | }, 1132 | "sourceSize":{ 1133 | "w":8, 1134 | "h":7 1135 | } 1136 | }, 1137 | { 1138 | "filename":"sprite55", 1139 | "frame":{ 1140 | "x":238, 1141 | "y":81, 1142 | "w":8, 1143 | "h":7 1144 | }, 1145 | "rotated":false, 1146 | "trimmed":false, 1147 | "spriteSourceSize":{ 1148 | "x":0, 1149 | "y":0, 1150 | "w":8, 1151 | "h":7 1152 | }, 1153 | "sourceSize":{ 1154 | "w":8, 1155 | "h":7 1156 | } 1157 | }, 1158 | { 1159 | "filename":"sprite56", 1160 | "frame":{ 1161 | "x":247, 1162 | "y":81, 1163 | "w":8, 1164 | "h":7 1165 | }, 1166 | "rotated":false, 1167 | "trimmed":false, 1168 | "spriteSourceSize":{ 1169 | "x":0, 1170 | "y":0, 1171 | "w":8, 1172 | "h":7 1173 | }, 1174 | "sourceSize":{ 1175 | "w":8, 1176 | "h":7 1177 | } 1178 | }, 1179 | { 1180 | "filename":"sprite57", 1181 | "frame":{ 1182 | "x":1, 1183 | "y":88, 1184 | "w":22, 1185 | "h":49 1186 | }, 1187 | "rotated":false, 1188 | "trimmed":false, 1189 | "spriteSourceSize":{ 1190 | "x":0, 1191 | "y":0, 1192 | "w":22, 1193 | "h":49 1194 | }, 1195 | "sourceSize":{ 1196 | "w":22, 1197 | "h":49 1198 | } 1199 | }, 1200 | { 1201 | "filename":"sprite58", 1202 | "frame":{ 1203 | "x":72, 1204 | "y":89, 1205 | "w":1, 1206 | "h":1 1207 | }, 1208 | "rotated":false, 1209 | "trimmed":false, 1210 | "spriteSourceSize":{ 1211 | "x":0, 1212 | "y":0, 1213 | "w":1, 1214 | "h":1 1215 | }, 1216 | "sourceSize":{ 1217 | "w":1, 1218 | "h":1 1219 | } 1220 | }, 1221 | { 1222 | "filename":"sprite59", 1223 | "frame":{ 1224 | "x":89, 1225 | "y":89, 1226 | "w":1, 1227 | "h":1 1228 | }, 1229 | "rotated":false, 1230 | "trimmed":false, 1231 | "spriteSourceSize":{ 1232 | "x":0, 1233 | "y":0, 1234 | "w":1, 1235 | "h":1 1236 | }, 1237 | "sourceSize":{ 1238 | "w":1, 1239 | "h":1 1240 | } 1241 | }, 1242 | { 1243 | "filename":"sprite60", 1244 | "frame":{ 1245 | "x":109, 1246 | "y":89, 1247 | "w":1, 1248 | "h":1 1249 | }, 1250 | "rotated":false, 1251 | "trimmed":false, 1252 | "spriteSourceSize":{ 1253 | "x":0, 1254 | "y":0, 1255 | "w":1, 1256 | "h":1 1257 | }, 1258 | "sourceSize":{ 1259 | "w":1, 1260 | "h":1 1261 | } 1262 | }, 1263 | { 1264 | "filename":"sprite61", 1265 | "frame":{ 1266 | "x":129, 1267 | "y":89, 1268 | "w":1, 1269 | "h":1 1270 | }, 1271 | "rotated":false, 1272 | "trimmed":false, 1273 | "spriteSourceSize":{ 1274 | "x":0, 1275 | "y":0, 1276 | "w":1, 1277 | "h":1 1278 | }, 1279 | "sourceSize":{ 1280 | "w":1, 1281 | "h":1 1282 | } 1283 | }, 1284 | { 1285 | "filename":"sprite62", 1286 | "frame":{ 1287 | "x":31, 1288 | "y":106, 1289 | "w":138, 1290 | "h":26 1291 | }, 1292 | "rotated":false, 1293 | "trimmed":false, 1294 | "spriteSourceSize":{ 1295 | "x":0, 1296 | "y":0, 1297 | "w":138, 1298 | "h":26 1299 | }, 1300 | "sourceSize":{ 1301 | "w":138, 1302 | "h":26 1303 | } 1304 | } 1305 | ], 1306 | "meta":{ 1307 | "app":"https://www.leshylabs.com/apps/sstool/", 1308 | "version":"Leshy SpriteSheet Tool v0.8.4", 1309 | "image":"spritesheet.png", 1310 | "size":{ 1311 | "w":256, 1312 | "h":137 1313 | }, 1314 | "scale":1 1315 | } 1316 | } 1317 | -------------------------------------------------------------------------------- /assets/images/background/background-objects.json: -------------------------------------------------------------------------------- 1 | { 2 | "frames":[ 3 | { 4 | "filename":"sprite1", 5 | "frame":{ 6 | "x":0, 7 | "y":0, 8 | "w":122, 9 | "h":55 10 | }, 11 | "rotated":false, 12 | "trimmed":false, 13 | "spriteSourceSize":{ 14 | "x":0, 15 | "y":0, 16 | "w":122, 17 | "h":55 18 | }, 19 | "sourceSize":{ 20 | "w":122, 21 | "h":55 22 | } 23 | }, 24 | { 25 | "filename":"sprite2", 26 | "frame":{ 27 | "x":251, 28 | "y":0, 29 | "w":83, 30 | "h":26 31 | }, 32 | "rotated":false, 33 | "trimmed":false, 34 | "spriteSourceSize":{ 35 | "x":0, 36 | "y":0, 37 | "w":83, 38 | "h":26 39 | }, 40 | "sourceSize":{ 41 | "w":83, 42 | "h":26 43 | } 44 | }, 45 | { 46 | "filename":"sprite3", 47 | "frame":{ 48 | "x":195, 49 | "y":32, 50 | "w":208, 51 | "h":34 52 | }, 53 | "rotated":false, 54 | "trimmed":false, 55 | "spriteSourceSize":{ 56 | "x":0, 57 | "y":0, 58 | "w":208, 59 | "h":34 60 | }, 61 | "sourceSize":{ 62 | "w":208, 63 | "h":34 64 | } 65 | }, 66 | { 67 | "filename":"sprite4", 68 | "frame":{ 69 | "x":388, 70 | "y":89, 71 | "w":13, 72 | "h":32 73 | }, 74 | "rotated":false, 75 | "trimmed":false, 76 | "spriteSourceSize":{ 77 | "x":0, 78 | "y":0, 79 | "w":13, 80 | "h":32 81 | }, 82 | "sourceSize":{ 83 | "w":13, 84 | "h":32 85 | } 86 | }, 87 | { 88 | "filename":"sprite5", 89 | "frame":{ 90 | "x":402, 91 | "y":89, 92 | "w":159, 93 | "h":32 94 | }, 95 | "rotated":false, 96 | "trimmed":false, 97 | "spriteSourceSize":{ 98 | "x":0, 99 | "y":0, 100 | "w":159, 101 | "h":32 102 | }, 103 | "sourceSize":{ 104 | "w":159, 105 | "h":32 106 | } 107 | }, 108 | { 109 | "filename":"sprite6", 110 | "frame":{ 111 | "x":562, 112 | "y":89, 113 | "w":13, 114 | "h":32 115 | }, 116 | "rotated":false, 117 | "trimmed":false, 118 | "spriteSourceSize":{ 119 | "x":0, 120 | "y":0, 121 | "w":13, 122 | "h":32 123 | }, 124 | "sourceSize":{ 125 | "w":13, 126 | "h":32 127 | } 128 | }, 129 | { 130 | "filename":"sprite7", 131 | "frame":{ 132 | "x":1, 133 | "y":100, 134 | "w":256, 135 | "h":15 136 | }, 137 | "rotated":false, 138 | "trimmed":false, 139 | "spriteSourceSize":{ 140 | "x":0, 141 | "y":0, 142 | "w":256, 143 | "h":15 144 | }, 145 | "sourceSize":{ 146 | "w":256, 147 | "h":15 148 | } 149 | }, 150 | { 151 | "filename":"sprite8", 152 | "frame":{ 153 | "x":0, 154 | "y":122, 155 | "w":24, 156 | "h":79 157 | }, 158 | "rotated":false, 159 | "trimmed":false, 160 | "spriteSourceSize":{ 161 | "x":0, 162 | "y":0, 163 | "w":24, 164 | "h":79 165 | }, 166 | "sourceSize":{ 167 | "w":24, 168 | "h":79 169 | } 170 | }, 171 | { 172 | "filename":"sprite9", 173 | "frame":{ 174 | "x":25, 175 | "y":122, 176 | "w":64, 177 | "h":79 178 | }, 179 | "rotated":false, 180 | "trimmed":false, 181 | "spriteSourceSize":{ 182 | "x":0, 183 | "y":0, 184 | "w":64, 185 | "h":79 186 | }, 187 | "sourceSize":{ 188 | "w":64, 189 | "h":79 190 | } 191 | }, 192 | { 193 | "filename":"sprite10", 194 | "frame":{ 195 | "x":90, 196 | "y":122, 197 | "w":24, 198 | "h":79 199 | }, 200 | "rotated":false, 201 | "trimmed":false, 202 | "spriteSourceSize":{ 203 | "x":0, 204 | "y":0, 205 | "w":24, 206 | "h":79 207 | }, 208 | "sourceSize":{ 209 | "w":24, 210 | "h":79 211 | } 212 | }, 213 | { 214 | "filename":"sprite11", 215 | "frame":{ 216 | "x":126, 217 | "y":124, 218 | "w":48, 219 | "h":32 220 | }, 221 | "rotated":false, 222 | "trimmed":false, 223 | "spriteSourceSize":{ 224 | "x":0, 225 | "y":0, 226 | "w":48, 227 | "h":32 228 | }, 229 | "sourceSize":{ 230 | "w":48, 231 | "h":32 232 | } 233 | }, 234 | { 235 | "filename":"sprite12", 236 | "frame":{ 237 | "x":267, 238 | "y":134, 239 | "w":256, 240 | "h":160 241 | }, 242 | "rotated":false, 243 | "trimmed":false, 244 | "spriteSourceSize":{ 245 | "x":0, 246 | "y":0, 247 | "w":256, 248 | "h":160 249 | }, 250 | "sourceSize":{ 251 | "w":256, 252 | "h":160 253 | } 254 | }, 255 | { 256 | "filename":"sprite13", 257 | "frame":{ 258 | "x":523, 259 | "y":141, 260 | "w":48, 261 | "h":54 262 | }, 263 | "rotated":false, 264 | "trimmed":false, 265 | "spriteSourceSize":{ 266 | "x":0, 267 | "y":0, 268 | "w":48, 269 | "h":54 270 | }, 271 | "sourceSize":{ 272 | "w":48, 273 | "h":54 274 | } 275 | }, 276 | { 277 | "filename":"sprite14", 278 | "frame":{ 279 | "x":543, 280 | "y":194, 281 | "w":2, 282 | "h":1 283 | }, 284 | "rotated":false, 285 | "trimmed":false, 286 | "spriteSourceSize":{ 287 | "x":0, 288 | "y":0, 289 | "w":2, 290 | "h":1 291 | }, 292 | "sourceSize":{ 293 | "w":2, 294 | "h":1 295 | } 296 | }, 297 | { 298 | "filename":"sprite15", 299 | "frame":{ 300 | "x":549, 301 | "y":194, 302 | "w":2, 303 | "h":1 304 | }, 305 | "rotated":false, 306 | "trimmed":false, 307 | "spriteSourceSize":{ 308 | "x":0, 309 | "y":0, 310 | "w":2, 311 | "h":1 312 | }, 313 | "sourceSize":{ 314 | "w":2, 315 | "h":1 316 | } 317 | }, 318 | { 319 | "filename":"sprite16", 320 | "frame":{ 321 | "x":530, 322 | "y":195, 323 | "w":2, 324 | "h":1 325 | }, 326 | "rotated":false, 327 | "trimmed":false, 328 | "spriteSourceSize":{ 329 | "x":0, 330 | "y":0, 331 | "w":2, 332 | "h":1 333 | }, 334 | "sourceSize":{ 335 | "w":2, 336 | "h":1 337 | } 338 | }, 339 | { 340 | "filename":"sprite17", 341 | "frame":{ 342 | "x":562, 343 | "y":195, 344 | "w":1, 345 | "h":1 346 | }, 347 | "rotated":false, 348 | "trimmed":false, 349 | "spriteSourceSize":{ 350 | "x":0, 351 | "y":0, 352 | "w":1, 353 | "h":1 354 | }, 355 | "sourceSize":{ 356 | "w":1, 357 | "h":1 358 | } 359 | }, 360 | { 361 | "filename":"sprite18", 362 | "frame":{ 363 | "x":531, 364 | "y":206, 365 | "w":32, 366 | "h":32 367 | }, 368 | "rotated":false, 369 | "trimmed":false, 370 | "spriteSourceSize":{ 371 | "x":0, 372 | "y":0, 373 | "w":32, 374 | "h":32 375 | }, 376 | "sourceSize":{ 377 | "w":32, 378 | "h":32 379 | } 380 | }, 381 | { 382 | "filename":"sprite19", 383 | "frame":{ 384 | "x":7, 385 | "y":216, 386 | "w":144, 387 | "h":80 388 | }, 389 | "rotated":false, 390 | "trimmed":false, 391 | "spriteSourceSize":{ 392 | "x":0, 393 | "y":0, 394 | "w":144, 395 | "h":80 396 | }, 397 | "sourceSize":{ 398 | "w":144, 399 | "h":80 400 | } 401 | }, 402 | { 403 | "filename":"sprite20", 404 | "frame":{ 405 | "x":159, 406 | "y":239, 407 | "w":96, 408 | "h":56 409 | }, 410 | "rotated":false, 411 | "trimmed":false, 412 | "spriteSourceSize":{ 413 | "x":0, 414 | "y":0, 415 | "w":96, 416 | "h":56 417 | }, 418 | "sourceSize":{ 419 | "w":96, 420 | "h":56 421 | } 422 | }, 423 | { 424 | "filename":"sprite21", 425 | "frame":{ 426 | "x":464, 427 | "y":302, 428 | "w":110, 429 | "h":24 430 | }, 431 | "rotated":false, 432 | "trimmed":false, 433 | "spriteSourceSize":{ 434 | "x":0, 435 | "y":0, 436 | "w":110, 437 | "h":24 438 | }, 439 | "sourceSize":{ 440 | "w":110, 441 | "h":24 442 | } 443 | }, 444 | { 445 | "filename":"sprite22", 446 | "frame":{ 447 | "x":302, 448 | "y":310, 449 | "w":142, 450 | "h":128 451 | }, 452 | "rotated":false, 453 | "trimmed":false, 454 | "spriteSourceSize":{ 455 | "x":0, 456 | "y":0, 457 | "w":142, 458 | "h":128 459 | }, 460 | "sourceSize":{ 461 | "w":142, 462 | "h":128 463 | } 464 | }, 465 | { 466 | "filename":"sprite23", 467 | "frame":{ 468 | "x":4, 469 | "y":311, 470 | "w":97, 471 | "h":128 472 | }, 473 | "rotated":false, 474 | "trimmed":false, 475 | "spriteSourceSize":{ 476 | "x":0, 477 | "y":0, 478 | "w":97, 479 | "h":128 480 | }, 481 | "sourceSize":{ 482 | "w":97, 483 | "h":128 484 | } 485 | }, 486 | { 487 | "filename":"sprite24", 488 | "frame":{ 489 | "x":112, 490 | "y":341, 491 | "w":100, 492 | "h":52 493 | }, 494 | "rotated":false, 495 | "trimmed":false, 496 | "spriteSourceSize":{ 497 | "x":0, 498 | "y":0, 499 | "w":100, 500 | "h":52 501 | }, 502 | "sourceSize":{ 503 | "w":100, 504 | "h":52 505 | } 506 | }, 507 | { 508 | "filename":"sprite25", 509 | "frame":{ 510 | "x":509, 511 | "y":343, 512 | "w":73, 513 | "h":43 514 | }, 515 | "rotated":false, 516 | "trimmed":false, 517 | "spriteSourceSize":{ 518 | "x":0, 519 | "y":0, 520 | "w":73, 521 | "h":43 522 | }, 523 | "sourceSize":{ 524 | "w":73, 525 | "h":43 526 | } 527 | }, 528 | { 529 | "filename":"sprite26", 530 | "frame":{ 531 | "x":280, 532 | "y":352, 533 | "w":16, 534 | "h":33 535 | }, 536 | "rotated":false, 537 | "trimmed":false, 538 | "spriteSourceSize":{ 539 | "x":0, 540 | "y":0, 541 | "w":16, 542 | "h":33 543 | }, 544 | "sourceSize":{ 545 | "w":16, 546 | "h":33 547 | } 548 | }, 549 | { 550 | "filename":"sprite27", 551 | "frame":{ 552 | "x":455, 553 | "y":387, 554 | "w":113, 555 | "h":53 556 | }, 557 | "rotated":false, 558 | "trimmed":false, 559 | "spriteSourceSize":{ 560 | "x":0, 561 | "y":0, 562 | "w":113, 563 | "h":53 564 | }, 565 | "sourceSize":{ 566 | "w":113, 567 | "h":53 568 | } 569 | }, 570 | { 571 | "filename":"sprite28", 572 | "frame":{ 573 | "x":265, 574 | "y":389, 575 | "w":32, 576 | "h":48 577 | }, 578 | "rotated":false, 579 | "trimmed":false, 580 | "spriteSourceSize":{ 581 | "x":0, 582 | "y":0, 583 | "w":32, 584 | "h":48 585 | }, 586 | "sourceSize":{ 587 | "w":32, 588 | "h":48 589 | } 590 | }, 591 | { 592 | "filename":"sprite29", 593 | "frame":{ 594 | "x":117, 595 | "y":394, 596 | "w":140, 597 | "h":44 598 | }, 599 | "rotated":false, 600 | "trimmed":false, 601 | "spriteSourceSize":{ 602 | "x":0, 603 | "y":0, 604 | "w":140, 605 | "h":44 606 | }, 607 | "sourceSize":{ 608 | "w":140, 609 | "h":44 610 | } 611 | }, 612 | { 613 | "filename":"sprite30", 614 | "frame":{ 615 | "x":5, 616 | "y":443, 617 | "w":192, 618 | "h":43 619 | }, 620 | "rotated":false, 621 | "trimmed":false, 622 | "spriteSourceSize":{ 623 | "x":0, 624 | "y":0, 625 | "w":192, 626 | "h":43 627 | }, 628 | "sourceSize":{ 629 | "w":192, 630 | "h":43 631 | } 632 | }, 633 | { 634 | "filename":"sprite31", 635 | "frame":{ 636 | "x":552, 637 | "y":450, 638 | "w":8, 639 | "h":64 640 | }, 641 | "rotated":false, 642 | "trimmed":false, 643 | "spriteSourceSize":{ 644 | "x":0, 645 | "y":0, 646 | "w":8, 647 | "h":64 648 | }, 649 | "sourceSize":{ 650 | "w":8, 651 | "h":64 652 | } 653 | }, 654 | { 655 | "filename":"sprite32", 656 | "frame":{ 657 | "x":576, 658 | "y":450, 659 | "w":8, 660 | "h":64 661 | }, 662 | "rotated":false, 663 | "trimmed":false, 664 | "spriteSourceSize":{ 665 | "x":0, 666 | "y":0, 667 | "w":8, 668 | "h":64 669 | }, 670 | "sourceSize":{ 671 | "w":8, 672 | "h":64 673 | } 674 | }, 675 | { 676 | "filename":"sprite33 - Double Skinny Pipes", 677 | "frame":{ 678 | "x":507, 679 | "y":452, 680 | "w":32, 681 | "h":64 682 | }, 683 | "rotated":false, 684 | "trimmed":false, 685 | "spriteSourceSize":{ 686 | "x":0, 687 | "y":0, 688 | "w":32, 689 | "h":64 690 | }, 691 | "sourceSize":{ 692 | "w":32, 693 | "h":64 694 | } 695 | }, 696 | { 697 | "filename":"sprite34", 698 | "frame":{ 699 | "x":429, 700 | "y":475, 701 | "w":14, 702 | "h":16 703 | }, 704 | "rotated":false, 705 | "trimmed":false, 706 | "spriteSourceSize":{ 707 | "x":0, 708 | "y":0, 709 | "w":14, 710 | "h":16 711 | }, 712 | "sourceSize":{ 713 | "w":14, 714 | "h":16 715 | } 716 | }, 717 | { 718 | "filename":"sprite35", 719 | "frame":{ 720 | "x":405, 721 | "y":479, 722 | "w":14, 723 | "h":13 724 | }, 725 | "rotated":false, 726 | "trimmed":false, 727 | "spriteSourceSize":{ 728 | "x":0, 729 | "y":0, 730 | "w":14, 731 | "h":13 732 | }, 733 | "sourceSize":{ 734 | "w":14, 735 | "h":13 736 | } 737 | }, 738 | { 739 | "filename":"sprite36", 740 | "frame":{ 741 | "x":451, 742 | "y":479, 743 | "w":14, 744 | "h":13 745 | }, 746 | "rotated":false, 747 | "trimmed":false, 748 | "spriteSourceSize":{ 749 | "x":0, 750 | "y":0, 751 | "w":14, 752 | "h":13 753 | }, 754 | "sourceSize":{ 755 | "w":14, 756 | "h":13 757 | } 758 | }, 759 | { 760 | "filename":"sprite37", 761 | "frame":{ 762 | "x":207, 763 | "y":482, 764 | "w":6, 765 | "h":9 766 | }, 767 | "rotated":false, 768 | "trimmed":false, 769 | "spriteSourceSize":{ 770 | "x":0, 771 | "y":0, 772 | "w":6, 773 | "h":9 774 | }, 775 | "sourceSize":{ 776 | "w":6, 777 | "h":9 778 | } 779 | }, 780 | { 781 | "filename":"sprite38", 782 | "frame":{ 783 | "x":214, 784 | "y":482, 785 | "w":68, 786 | "h":9 787 | }, 788 | "rotated":false, 789 | "trimmed":false, 790 | "spriteSourceSize":{ 791 | "x":0, 792 | "y":0, 793 | "w":68, 794 | "h":9 795 | }, 796 | "sourceSize":{ 797 | "w":68, 798 | "h":9 799 | } 800 | }, 801 | { 802 | "filename":"sprite39", 803 | "frame":{ 804 | "x":283, 805 | "y":482, 806 | "w":6, 807 | "h":9 808 | }, 809 | "rotated":false, 810 | "trimmed":false, 811 | "spriteSourceSize":{ 812 | "x":0, 813 | "y":0, 814 | "w":6, 815 | "h":9 816 | }, 817 | "sourceSize":{ 818 | "w":6, 819 | "h":9 820 | } 821 | }, 822 | { 823 | "filename":"sprite40", 824 | "frame":{ 825 | "x":325, 826 | "y":487, 827 | "w":32, 828 | "h":32 829 | }, 830 | "rotated":false, 831 | "trimmed":false, 832 | "spriteSourceSize":{ 833 | "x":0, 834 | "y":0, 835 | "w":32, 836 | "h":32 837 | }, 838 | "sourceSize":{ 839 | "w":32, 840 | "h":32 841 | } 842 | }, 843 | { 844 | "filename":"sprite41", 845 | "frame":{ 846 | "x":207, 847 | "y":492, 848 | "w":6, 849 | "h":15 850 | }, 851 | "rotated":false, 852 | "trimmed":false, 853 | "spriteSourceSize":{ 854 | "x":0, 855 | "y":0, 856 | "w":6, 857 | "h":15 858 | }, 859 | "sourceSize":{ 860 | "w":6, 861 | "h":15 862 | } 863 | }, 864 | { 865 | "filename":"sprite42", 866 | "frame":{ 867 | "x":214, 868 | "y":492, 869 | "w":68, 870 | "h":15 871 | }, 872 | "rotated":false, 873 | "trimmed":false, 874 | "spriteSourceSize":{ 875 | "x":0, 876 | "y":0, 877 | "w":68, 878 | "h":15 879 | }, 880 | "sourceSize":{ 881 | "w":68, 882 | "h":15 883 | } 884 | }, 885 | { 886 | "filename":"sprite43", 887 | "frame":{ 888 | "x":283, 889 | "y":492, 890 | "w":6, 891 | "h":15 892 | }, 893 | "rotated":false, 894 | "trimmed":false, 895 | "spriteSourceSize":{ 896 | "x":0, 897 | "y":0, 898 | "w":6, 899 | "h":15 900 | }, 901 | "sourceSize":{ 902 | "w":6, 903 | "h":15 904 | } 905 | }, 906 | { 907 | "filename":"sprite44", 908 | "frame":{ 909 | "x":4, 910 | "y":495, 911 | "w":14, 912 | "h":43 913 | }, 914 | "rotated":false, 915 | "trimmed":false, 916 | "spriteSourceSize":{ 917 | "x":0, 918 | "y":0, 919 | "w":14, 920 | "h":43 921 | }, 922 | "sourceSize":{ 923 | "w":14, 924 | "h":43 925 | } 926 | }, 927 | { 928 | "filename":"sprite45", 929 | "frame":{ 930 | "x":19, 931 | "y":495, 932 | "w":131, 933 | "h":43 934 | }, 935 | "rotated":false, 936 | "trimmed":false, 937 | "spriteSourceSize":{ 938 | "x":0, 939 | "y":0, 940 | "w":131, 941 | "h":43 942 | }, 943 | "sourceSize":{ 944 | "w":131, 945 | "h":43 946 | } 947 | }, 948 | { 949 | "filename":"sprite46", 950 | "frame":{ 951 | "x":151, 952 | "y":495, 953 | "w":15, 954 | "h":8 955 | }, 956 | "rotated":false, 957 | "trimmed":false, 958 | "spriteSourceSize":{ 959 | "x":0, 960 | "y":0, 961 | "w":15, 962 | "h":8 963 | }, 964 | "sourceSize":{ 965 | "w":15, 966 | "h":8 967 | } 968 | }, 969 | { 970 | "filename":"sprite47", 971 | "frame":{ 972 | "x":151, 973 | "y":504, 974 | "w":15, 975 | "h":24 976 | }, 977 | "rotated":false, 978 | "trimmed":false, 979 | "spriteSourceSize":{ 980 | "x":0, 981 | "y":0, 982 | "w":15, 983 | "h":24 984 | }, 985 | "sourceSize":{ 986 | "w":15, 987 | "h":24 988 | } 989 | }, 990 | { 991 | "filename":"sprite48", 992 | "frame":{ 993 | "x":444, 994 | "y":505, 995 | "w":24, 996 | "h":24 997 | }, 998 | "rotated":false, 999 | "trimmed":false, 1000 | "spriteSourceSize":{ 1001 | "x":0, 1002 | "y":0, 1003 | "w":24, 1004 | "h":24 1005 | }, 1006 | "sourceSize":{ 1007 | "w":24, 1008 | "h":24 1009 | } 1010 | }, 1011 | { 1012 | "filename":"sprite49", 1013 | "frame":{ 1014 | "x":396, 1015 | "y":506, 1016 | "w":32, 1017 | "h":32 1018 | }, 1019 | "rotated":false, 1020 | "trimmed":false, 1021 | "spriteSourceSize":{ 1022 | "x":0, 1023 | "y":0, 1024 | "w":32, 1025 | "h":32 1026 | }, 1027 | "sourceSize":{ 1028 | "w":32, 1029 | "h":32 1030 | } 1031 | }, 1032 | { 1033 | "filename":"sprite50", 1034 | "frame":{ 1035 | "x":207, 1036 | "y":515, 1037 | "w":6, 1038 | "h":9 1039 | }, 1040 | "rotated":false, 1041 | "trimmed":false, 1042 | "spriteSourceSize":{ 1043 | "x":0, 1044 | "y":0, 1045 | "w":6, 1046 | "h":9 1047 | }, 1048 | "sourceSize":{ 1049 | "w":6, 1050 | "h":9 1051 | } 1052 | }, 1053 | { 1054 | "filename":"sprite51", 1055 | "frame":{ 1056 | "x":214, 1057 | "y":515, 1058 | "w":68, 1059 | "h":9 1060 | }, 1061 | "rotated":false, 1062 | "trimmed":false, 1063 | "spriteSourceSize":{ 1064 | "x":0, 1065 | "y":0, 1066 | "w":68, 1067 | "h":9 1068 | }, 1069 | "sourceSize":{ 1070 | "w":68, 1071 | "h":9 1072 | } 1073 | }, 1074 | { 1075 | "filename":"sprite52", 1076 | "frame":{ 1077 | "x":283, 1078 | "y":515, 1079 | "w":6, 1080 | "h":9 1081 | }, 1082 | "rotated":false, 1083 | "trimmed":false, 1084 | "spriteSourceSize":{ 1085 | "x":0, 1086 | "y":0, 1087 | "w":6, 1088 | "h":9 1089 | }, 1090 | "sourceSize":{ 1091 | "w":6, 1092 | "h":9 1093 | } 1094 | }, 1095 | { 1096 | "filename":"sprite53", 1097 | "frame":{ 1098 | "x":560, 1099 | "y":520, 1100 | "w":18, 1101 | "h":3 1102 | }, 1103 | "rotated":false, 1104 | "trimmed":false, 1105 | "spriteSourceSize":{ 1106 | "x":0, 1107 | "y":0, 1108 | "w":18, 1109 | "h":3 1110 | }, 1111 | "sourceSize":{ 1112 | "w":18, 1113 | "h":3 1114 | } 1115 | }, 1116 | { 1117 | "filename":"sprite54", 1118 | "frame":{ 1119 | "x":469, 1120 | "y":523, 1121 | "w":7, 1122 | "h":6 1123 | }, 1124 | "rotated":false, 1125 | "trimmed":false, 1126 | "spriteSourceSize":{ 1127 | "x":0, 1128 | "y":0, 1129 | "w":7, 1130 | "h":6 1131 | }, 1132 | "sourceSize":{ 1133 | "w":7, 1134 | "h":6 1135 | } 1136 | }, 1137 | { 1138 | "filename":"sprite55", 1139 | "frame":{ 1140 | "x":207, 1141 | "y":525, 1142 | "w":6, 1143 | "h":15 1144 | }, 1145 | "rotated":false, 1146 | "trimmed":false, 1147 | "spriteSourceSize":{ 1148 | "x":0, 1149 | "y":0, 1150 | "w":6, 1151 | "h":15 1152 | }, 1153 | "sourceSize":{ 1154 | "w":6, 1155 | "h":15 1156 | } 1157 | }, 1158 | { 1159 | "filename":"sprite56", 1160 | "frame":{ 1161 | "x":214, 1162 | "y":525, 1163 | "w":68, 1164 | "h":15 1165 | }, 1166 | "rotated":false, 1167 | "trimmed":false, 1168 | "spriteSourceSize":{ 1169 | "x":0, 1170 | "y":0, 1171 | "w":68, 1172 | "h":15 1173 | }, 1174 | "sourceSize":{ 1175 | "w":68, 1176 | "h":15 1177 | } 1178 | }, 1179 | { 1180 | "filename":"sprite57", 1181 | "frame":{ 1182 | "x":283, 1183 | "y":525, 1184 | "w":6, 1185 | "h":15 1186 | }, 1187 | "rotated":false, 1188 | "trimmed":false, 1189 | "spriteSourceSize":{ 1190 | "x":0, 1191 | "y":0, 1192 | "w":6, 1193 | "h":15 1194 | }, 1195 | "sourceSize":{ 1196 | "w":6, 1197 | "h":15 1198 | } 1199 | }, 1200 | { 1201 | "filename":"sprite58", 1202 | "frame":{ 1203 | "x":496, 1204 | "y":526, 1205 | "w":16, 1206 | "h":25 1207 | }, 1208 | "rotated":false, 1209 | "trimmed":false, 1210 | "spriteSourceSize":{ 1211 | "x":0, 1212 | "y":0, 1213 | "w":16, 1214 | "h":25 1215 | }, 1216 | "sourceSize":{ 1217 | "w":16, 1218 | "h":25 1219 | } 1220 | }, 1221 | { 1222 | "filename":"sprite59", 1223 | "frame":{ 1224 | "x":151, 1225 | "y":529, 1226 | "w":15, 1227 | "h":11 1228 | }, 1229 | "rotated":false, 1230 | "trimmed":false, 1231 | "spriteSourceSize":{ 1232 | "x":0, 1233 | "y":0, 1234 | "w":15, 1235 | "h":11 1236 | }, 1237 | "sourceSize":{ 1238 | "w":15, 1239 | "h":11 1240 | } 1241 | }, 1242 | { 1243 | "filename":"sprite60", 1244 | "frame":{ 1245 | "x":167, 1246 | "y":529, 1247 | "w":25, 1248 | "h":11 1249 | }, 1250 | "rotated":false, 1251 | "trimmed":false, 1252 | "spriteSourceSize":{ 1253 | "x":0, 1254 | "y":0, 1255 | "w":25, 1256 | "h":11 1257 | }, 1258 | "sourceSize":{ 1259 | "w":25, 1260 | "h":11 1261 | } 1262 | }, 1263 | { 1264 | "filename":"sprite61", 1265 | "frame":{ 1266 | "x":193, 1267 | "y":529, 1268 | "w":7, 1269 | "h":11 1270 | }, 1271 | "rotated":false, 1272 | "trimmed":false, 1273 | "spriteSourceSize":{ 1274 | "x":0, 1275 | "y":0, 1276 | "w":7, 1277 | "h":11 1278 | }, 1279 | "sourceSize":{ 1280 | "w":7, 1281 | "h":11 1282 | } 1283 | }, 1284 | { 1285 | "filename":"sprite62", 1286 | "frame":{ 1287 | "x":321, 1288 | "y":532, 1289 | "w":64, 1290 | "h":16 1291 | }, 1292 | "rotated":false, 1293 | "trimmed":false, 1294 | "spriteSourceSize":{ 1295 | "x":0, 1296 | "y":0, 1297 | "w":64, 1298 | "h":16 1299 | }, 1300 | "sourceSize":{ 1301 | "w":64, 1302 | "h":16 1303 | } 1304 | }, 1305 | { 1306 | "filename":"sprite63", 1307 | "frame":{ 1308 | "x":562, 1309 | "y":534, 1310 | "w":16, 1311 | "h":16 1312 | }, 1313 | "rotated":false, 1314 | "trimmed":false, 1315 | "spriteSourceSize":{ 1316 | "x":0, 1317 | "y":0, 1318 | "w":16, 1319 | "h":16 1320 | }, 1321 | "sourceSize":{ 1322 | "w":16, 1323 | "h":16 1324 | } 1325 | }, 1326 | { 1327 | "filename":"sprite64", 1328 | "frame":{ 1329 | "x":469, 1330 | "y":535, 1331 | "w":16, 1332 | "h":16 1333 | }, 1334 | "rotated":false, 1335 | "trimmed":false, 1336 | "spriteSourceSize":{ 1337 | "x":0, 1338 | "y":0, 1339 | "w":16, 1340 | "h":16 1341 | }, 1342 | "sourceSize":{ 1343 | "w":16, 1344 | "h":16 1345 | } 1346 | }, 1347 | { 1348 | "filename":"sprite65", 1349 | "frame":{ 1350 | "x":396, 1351 | "y":545, 1352 | "w":32, 1353 | "h":32 1354 | }, 1355 | "rotated":false, 1356 | "trimmed":true, 1357 | "spriteSourceSize":{ 1358 | "x":0, 1359 | "y":0, 1360 | "w":32, 1361 | "h":32 1362 | }, 1363 | "sourceSize":{ 1364 | "w":32, 1365 | "h":32 1366 | } 1367 | }, 1368 | { 1369 | "filename":"sprite66", 1370 | "frame":{ 1371 | "x":432, 1372 | "y":545, 1373 | "w":32, 1374 | "h":32 1375 | }, 1376 | "rotated":false, 1377 | "trimmed":false, 1378 | "spriteSourceSize":{ 1379 | "x":0, 1380 | "y":0, 1381 | "w":32, 1382 | "h":32 1383 | }, 1384 | "sourceSize":{ 1385 | "w":32, 1386 | "h":32 1387 | } 1388 | }, 1389 | { 1390 | "filename":"sprite67", 1391 | "frame":{ 1392 | "x":1, 1393 | "y":548, 1394 | "w":256, 1395 | "h":30 1396 | }, 1397 | "rotated":false, 1398 | "trimmed":false, 1399 | "spriteSourceSize":{ 1400 | "x":0, 1401 | "y":0, 1402 | "w":256, 1403 | "h":30 1404 | }, 1405 | "sourceSize":{ 1406 | "w":256, 1407 | "h":30 1408 | } 1409 | }, 1410 | { 1411 | "filename":"sprite68", 1412 | "frame":{ 1413 | "x":469, 1414 | "y":555, 1415 | "w":16, 1416 | "h":16 1417 | }, 1418 | "rotated":false, 1419 | "trimmed":false, 1420 | "spriteSourceSize":{ 1421 | "x":0, 1422 | "y":0, 1423 | "w":16, 1424 | "h":16 1425 | }, 1426 | "sourceSize":{ 1427 | "w":16, 1428 | "h":16 1429 | } 1430 | }, 1431 | { 1432 | "filename":"sprite69", 1433 | "frame":{ 1434 | "x":492, 1435 | "y":555, 1436 | "w":16, 1437 | "h":16 1438 | }, 1439 | "rotated":false, 1440 | "trimmed":false, 1441 | "spriteSourceSize":{ 1442 | "x":0, 1443 | "y":0, 1444 | "w":16, 1445 | "h":16 1446 | }, 1447 | "sourceSize":{ 1448 | "w":16, 1449 | "h":16 1450 | } 1451 | }, 1452 | { 1453 | "filename":"sprite70", 1454 | "frame":{ 1455 | "x":516, 1456 | "y":555, 1457 | "w":16, 1458 | "h":16 1459 | }, 1460 | "rotated":false, 1461 | "trimmed":false, 1462 | "spriteSourceSize":{ 1463 | "x":0, 1464 | "y":0, 1465 | "w":16, 1466 | "h":16 1467 | }, 1468 | "sourceSize":{ 1469 | "w":16, 1470 | "h":16 1471 | } 1472 | }, 1473 | { 1474 | "filename":"sprite71", 1475 | "frame":{ 1476 | "x":539, 1477 | "y":555, 1478 | "w":16, 1479 | "h":16 1480 | }, 1481 | "rotated":false, 1482 | "trimmed":false, 1483 | "spriteSourceSize":{ 1484 | "x":0, 1485 | "y":0, 1486 | "w":16, 1487 | "h":16 1488 | }, 1489 | "sourceSize":{ 1490 | "w":16, 1491 | "h":16 1492 | } 1493 | }, 1494 | { 1495 | "filename":"sprite72", 1496 | "frame":{ 1497 | "x":562, 1498 | "y":555, 1499 | "w":16, 1500 | "h":16 1501 | }, 1502 | "rotated":false, 1503 | "trimmed":false, 1504 | "spriteSourceSize":{ 1505 | "x":0, 1506 | "y":0, 1507 | "w":16, 1508 | "h":16 1509 | }, 1510 | "sourceSize":{ 1511 | "w":16, 1512 | "h":16 1513 | } 1514 | }, 1515 | { 1516 | "filename":"sprite73 - Bush Large", 1517 | "frame":{ 1518 | "x":266, 1519 | "y":560, 1520 | "w":64, 1521 | "h":16 1522 | }, 1523 | "rotated":false, 1524 | "trimmed":false, 1525 | "spriteSourceSize":{ 1526 | "x":0, 1527 | "y":0, 1528 | "w":64, 1529 | "h":16 1530 | }, 1531 | "sourceSize":{ 1532 | "w":64, 1533 | "h":16 1534 | } 1535 | }, 1536 | { 1537 | "filename":"sprite74 - Bush Small", 1538 | "frame":{ 1539 | "x":340, 1540 | "y":560, 1541 | "w":48, 1542 | "h":16 1543 | }, 1544 | "rotated":false, 1545 | "trimmed":false, 1546 | "spriteSourceSize":{ 1547 | "x":0, 1548 | "y":0, 1549 | "w":48, 1550 | "h":16 1551 | }, 1552 | "sourceSize":{ 1553 | "w":48, 1554 | "h":16 1555 | } 1556 | } 1557 | ], 1558 | "meta":{ 1559 | "app":"https://www.leshylabs.com/apps/sstool/", 1560 | "version":"Leshy SpriteSheet Tool v0.8.4", 1561 | "image":"spritesheet.png", 1562 | "size":{ 1563 | "w":584, 1564 | "h":578 1565 | }, 1566 | "scale":1 1567 | } 1568 | } 1569 | --------------------------------------------------------------------------------