Skip to content

Commit a7230aa

Browse files
committed
Sprite.loadTexture added.
1 parent f10f932 commit a7230aa

16 files changed

Lines changed: 2155 additions & 2383 deletions

File tree

Docs/Screen Shots/phaser_tanks.png

335 KB
Loading

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Version 1.0.7 (in progress in the dev branch)
112112
* Fixed the RandomDataGenerator.sow method so if you give in the same seed you'll now get the same results (thanks Hsaka)
113113
* World.randomX/Y now works with negative World.bounds values.
114114
* Added killOnComplete parameter to Animation.play. Really useful in situations where you want a Sprite to animate once then kill itself on complete, like an explosion effect.
115-
115+
* Added Sprite.loadTexture(key, frame) which allows you to load a new texture set into an existing sprite rather than having to create a new sprite.
116116

117117

118118
* TODO: look at Sprite.crop (http://www.html5gamedevs.com/topic/1617-error-in-spritecrop/)

build/build.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,25 @@
2626
// echo $filename . "\n";
2727

2828
// Read the file in
29-
$source = file_get_contents($line);
30-
31-
if ($filename == 'Intro.js')
29+
if (file_exists($line))
3230
{
33-
// Built at: {buildDate}
34-
$source = str_replace('{buildDate}', date('r'), $source);
31+
$source = file_get_contents($line);
32+
33+
if ($filename == 'Intro.js')
34+
{
35+
// Built at: {buildDate}
36+
$source = str_replace('{buildDate}', date('r'), $source);
3537

36-
// {version}
37-
$source = str_replace('{version}', $version, $source);
38+
// {version}
39+
$source = str_replace('{version}', $version, $source);
3840

39-
// Set the header
40-
$header = $source;
41-
42-
} else {
43-
$output .= $source . "\n";
41+
// Set the header
42+
$header = $source;
43+
}
44+
else
45+
{
46+
$output .= $source . "\n";
47+
}
4448
}
4549
}
4650
}

0 commit comments

Comments
 (0)