mirror of
https://github.com/wassname/phaser.git
synced 2026-07-23 13:00:41 +08:00
Github Bug Fixes
This commit is contained in:
@@ -96,6 +96,10 @@
|
||||
<TypeScriptCompile Include="sprites\dynamic texture 1.ts" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="tweens\properties.js">
|
||||
<DependentUpon>properties.ts</DependentUpon>
|
||||
</Content>
|
||||
<TypeScriptCompile Include="tweens\properties.ts" />
|
||||
<TypeScriptCompile Include="misc\screen grab.ts" />
|
||||
<Content Include="misc\screen grab.js">
|
||||
<DependentUpon>screen grab.ts</DependentUpon>
|
||||
|
||||
+5
-4
@@ -8486,6 +8486,7 @@ var Phaser;
|
||||
this.onStart.dispatch(this._object);
|
||||
this._startTime = this._game.time.now + this._delayTime;
|
||||
for(var property in this._valuesEnd) {
|
||||
console.log(typeof property);
|
||||
// This prevents the interpolation of null values or of non-existing properties
|
||||
if(this._object[property] === null || !(property in this._object)) {
|
||||
throw Error('Phaser.Tween interpolation of null value of non-existing property');
|
||||
@@ -10509,13 +10510,13 @@ var Phaser;
|
||||
this.y = Y;
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
this.minParticleSpeed = new Phaser.Point(-100, -100);
|
||||
this.maxParticleSpeed = new Phaser.Point(100, 100);
|
||||
this.minParticleSpeed = new Phaser.MicroPoint(-100, -100);
|
||||
this.maxParticleSpeed = new Phaser.MicroPoint(100, 100);
|
||||
this.minRotation = -360;
|
||||
this.maxRotation = 360;
|
||||
this.gravity = 0;
|
||||
this.particleClass = null;
|
||||
this.particleDrag = new Phaser.Point();
|
||||
this.particleDrag = new Phaser.MicroPoint();
|
||||
this.frequency = 0.1;
|
||||
this.lifespan = 3;
|
||||
this.bounce = 0;
|
||||
@@ -10523,7 +10524,7 @@ var Phaser;
|
||||
this._counter = 0;
|
||||
this._explode = true;
|
||||
this.on = false;
|
||||
this._point = new Phaser.Point();
|
||||
this._point = new Phaser.MicroPoint();
|
||||
}
|
||||
Emitter.prototype.destroy = /**
|
||||
* Clean up memory.
|
||||
|
||||
@@ -27,10 +27,9 @@
|
||||
]);
|
||||
emitter = myGame.createEmitter(32, 80);
|
||||
emitter.width = 700;
|
||||
emitter.makeParticles('melon', 100, 0, false, 1);
|
||||
emitter.makeParticles('melon', 100, 0, false, 0);
|
||||
emitter.gravity = 200;
|
||||
emitter.bounce = 0.8;
|
||||
//emitter.setRotation(0, 0);
|
||||
emitter.start(false, 10, 0.1);
|
||||
car = myGame.createSprite(250, 64, 'ufo');
|
||||
car.renderRotation = false;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
emitter = myGame.createEmitter(32, 80);
|
||||
emitter.width = 700;
|
||||
emitter.makeParticles('melon', 100, 0, false, 1);
|
||||
emitter.makeParticles('melon', 100, 0, false, 0);
|
||||
emitter.gravity = 200;
|
||||
emitter.bounce = 0.8;
|
||||
emitter.start(false, 10, 0.1);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/// <reference path="../../Phaser/Game.ts" />
|
||||
(function () {
|
||||
var myGame = new Phaser.Game(this, 'game', 800, 600, init, create);
|
||||
function init() {
|
||||
myGame.loader.addImageFile('atari', 'assets/sprites/atari130xe.png');
|
||||
myGame.loader.load();
|
||||
}
|
||||
var atari;
|
||||
function create() {
|
||||
atari = myGame.createSprite(300, 0, 'atari');
|
||||
startBounceTween();
|
||||
}
|
||||
function startBounceTween() {
|
||||
atari.y = 0;
|
||||
var bounce = myGame.createTween(atari);
|
||||
bounce.to({
|
||||
x: 2
|
||||
}, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.Out);
|
||||
bounce.onComplete.add(startBounceTween, this);
|
||||
bounce.start();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,36 @@
|
||||
/// <reference path="../../Phaser/Game.ts" />
|
||||
|
||||
(function () {
|
||||
|
||||
var myGame = new Phaser.Game(this, 'game', 800, 600, init, create);
|
||||
|
||||
function init() {
|
||||
|
||||
myGame.loader.addImageFile('atari', 'assets/sprites/atari130xe.png');
|
||||
|
||||
myGame.loader.load();
|
||||
|
||||
}
|
||||
|
||||
var atari: Phaser.Sprite;
|
||||
|
||||
function create() {
|
||||
|
||||
atari = myGame.createSprite(300, 0, 'atari');
|
||||
|
||||
startBounceTween();
|
||||
}
|
||||
|
||||
function startBounceTween() {
|
||||
|
||||
atari.y = 0;
|
||||
|
||||
var bounce: Phaser.Tween = myGame.createTween(atari);
|
||||
|
||||
bounce.to({ x: 2 }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.Out);
|
||||
bounce.onComplete.add(startBounceTween, this);
|
||||
bounce.start();
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user