mirror of
https://github.com/wassname/phaser.git
synced 2026-08-11 11:23:06 +08:00
Loads of new examples, some more bug fixes, all of them work beautifully
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
function create() {
|
||||
|
||||
//We increase the size of our game world
|
||||
game.world.setBounds(2000, 2000);
|
||||
game.world.setBounds(0,0,2000, 2000);
|
||||
|
||||
for (var i = 0; i < 1000; i++)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var speed=4;
|
||||
|
||||
function preload() {
|
||||
game.world.setBounds(1280, 600);
|
||||
game.world.setBounds(0,0,1280, 600);
|
||||
game.load.image('ground', 'assets/tests/ground-2x.png');
|
||||
game.load.image('river', 'assets/tests/river-2x.png');
|
||||
game.load.image('sky', 'assets/tests/sky-2x.png');
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
function create() {
|
||||
// background images
|
||||
game.add.sprite(0, 0, 'sky');
|
||||
game.add.tileSprite(0, 0,1280,600, 'sky');
|
||||
game.add.sprite(0, 360, 'ground');
|
||||
game.add.sprite(0, 400, 'river');
|
||||
game.add.sprite(200, 120, 'cloud0');
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var speed=4;
|
||||
|
||||
function preload() {
|
||||
game.world.setBounds(1280, 600);
|
||||
game.world.setBounds(0,0,1280, 600);
|
||||
game.load.image('ground', 'assets/tests/ground-2x.png');
|
||||
game.load.image('river', 'assets/tests/river-2x.png');
|
||||
game.load.image('sky', 'assets/tests/sky-2x.png');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$title = "Test Title";
|
||||
$title = "Using pixel perfect plus scrolling background";
|
||||
require('../head.php');
|
||||
?>
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
function create() {
|
||||
|
||||
// Make our world big ...
|
||||
game.world.setBounds(4000, 2000);
|
||||
game.world.setBounds(0,0,4000, 2000);
|
||||
|
||||
// Scrolling background
|
||||
s = game.add.tileSprite(0, 0, 800, 600, 'stars');
|
||||
s = game.add.tileSprite(0, 0, 4000, 600, 'stars');
|
||||
|
||||
b = game.add.sprite(200, 200, 'mummy');
|
||||
b.anchor.setTo(0.5, 0.5);
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$title = "Test Title";
|
||||
$title = "Enabling pixel perfect hit detection on a spritesheet";
|
||||
require('../head.php');
|
||||
?>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
|
||||
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
|
||||
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, render: render });
|
||||
|
||||
function preload() {
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
console.log('out');
|
||||
}
|
||||
|
||||
function update() {
|
||||
// b.angle += 0.1;
|
||||
}
|
||||
|
||||
function render() {
|
||||
|
||||
game.debug.renderSpriteInputInfo(b, 32, 32);
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$title = "Test Title";
|
||||
$title = "Enabling pixel perfect hit detection";
|
||||
require('../head.php');
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user