mirror of
https://github.com/wassname/phaser.git
synced 2026-08-12 12:20:38 +08:00
AnimationManager done and in, need to fix texture update bug, otherwise finished.
This commit is contained in:
@@ -51,6 +51,8 @@
|
||||
<script src="../src/core/Stage.js"></script>
|
||||
<script src="../src/core/World.js"></script>
|
||||
<script src="../src/core/Game.js"></script>
|
||||
<script src="../src/gameobjects/GameObjectFactory.js"></script>
|
||||
<script src="../src/gameobjects/Sprite.js"></script>
|
||||
<script src="../src/system/Canvas.js"></script>
|
||||
<script src="../src/system/Device.js"></script>
|
||||
<script src="../src/system/RequestAnimationFrame.js"></script>
|
||||
@@ -64,6 +66,7 @@
|
||||
<script src="../src/tween/Tween.js"></script>
|
||||
<script src="../src/tween/Easing.js"></script>
|
||||
<script src="../src/time/Time.js"></script>
|
||||
<script src="../src/animation/AnimationManager.js"></script>
|
||||
<script src="../src/animation/Animation.js"></script>
|
||||
<script src="../src/animation/Frame.js"></script>
|
||||
<script src="../src/animation/FrameData.js"></script>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>phaser.js - a new beginning</title>
|
||||
<?php
|
||||
require('js.php');
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function () {
|
||||
|
||||
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
|
||||
|
||||
var bunny;
|
||||
|
||||
function preload() {
|
||||
game.load.image('mushroom', 'assets/sprites/mushroom2.png');
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
||||
var test = new Phaser.Sprite(game, 0, 0, 'mushroom');
|
||||
|
||||
test.x = 200;
|
||||
|
||||
game.world.add(test);
|
||||
|
||||
console.log(test.alpha);
|
||||
|
||||
}
|
||||
|
||||
function update() {
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>phaser.js - a new beginning</title>
|
||||
<?php
|
||||
require('js.php');
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function () {
|
||||
|
||||
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
|
||||
|
||||
var bunny;
|
||||
|
||||
function preload() {
|
||||
game.load.spritesheet('ms', 'assets/sprites/metalslug_mummy37x45.png', 37, 45);
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
||||
bunny = new Phaser.Sprite(game, 0, 0, 'ms', 10);
|
||||
|
||||
game.world.add(bunny);
|
||||
|
||||
}
|
||||
|
||||
function update() {
|
||||
bunny.postUpdate();
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user