This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Automatically add and update time stamps in your files. | |
On file open, will replace [timeStamp] with the current date and time. | |
Currently looks for two instances of this (example below). | |
To use, place the text [timeStamp] in your template file where you want it. | |
ex. | |
// CREATED: timeStamp | |
// MODIFIED: timeStamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Automatically add and update time stamps in your files. | |
On file open, will replace [timeStamp] with the current date and time. | |
Currently looks for two instances of this (example below). | |
To use, place the text [timeStamp] in your template file where you want it. | |
ex. | |
// CREATED: timeStamp | |
// MODIFIED: timeStamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var starSprite : Sprite; | |
var numberOfStars : Int = 300; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override function ready() { | |
for(i in 0...numberOfStars) { | |
starSprite = new Sprite({ | |
name : 'star'+i, | |
size : new Vector(16, 16), | |
rotation_z : 45.0, | |
color : new Color().rgb(0xffffff), | |
pos : new Vector(Std.random(Std.int(Luxe.screen.w)), Std.random(Std.int(Luxe.screen.h))) | |
}); //starSprite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import luxe.Component; | |
import luxe.Sprite; | |
import luxe.Color; | |
import luxe.Vector; | |
import luxe.utils.Maths; | |
class StarComponent extends Component { | |
var sprite : Sprite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import luxe.Component; | |
import luxe.Sprite; | |
import luxe.Color; | |
import luxe.Vector; | |
import luxe.tween.Actuate; | |
class ColorRollComponent extends Component { | |
var sprite : Sprite; | |
var rad : Float = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import luxe.Component; | |
import luxe.Sprite; | |
import luxe.Color; | |
import luxe.Vector; | |
import luxe.tween.Actuate; | |
class ColorTweenComponent extends Component { | |
var sprite : Sprite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:base { | |
center-x: screen.center-x; | |
center-y: screen.center-y; | |
w: <= screen.w * 0.6; | |
h: <= screen.h * 0.6; | |
w: >= 280; | |
w: <= 500; | |
h: >= 160; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// finally some collision checks!! | |
var shipHitResults : Array<CollisionData> = Collision.testShapes(shipCollider, StateGamePlay.asteroidColliderPool); | |
if(shipHitResults.length > 0) { | |
shipHitCount++; | |
trace("ship hit " + shipHitCount); | |
} | |
var flameHitResults : Array<CollisionData> = Collision.testShapes(engineDamageFlameCollider, StateGamePlay.asteroidColliderPool); | |
if(flameHitResults.length > 0) { | |
for(hit in flameHitResults) { | |
for(asteroid in StateGamePlay.asteroidPool) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flameHitResults : Array<CollisionData> = Collision.testShapes(engineDamageFlameCollider, StateGamePlay.asteroidColliderPool); | |
if(flameHitResults.length > 0) { | |
for(hit in flameHitResults) { | |
for(asteroid in StateGamePlay.asteroidPool) { | |
if(hit.shape2.name == asteroid.name) { | |
asteroid.destroy(); | |
asteroid = null; | |
StateGamePlay.asteroidColliderPool.splice(StateGamePlay.asteroidColliderPool.indexOf(hit.shape2), 1); | |
hit.shape2.destroy(); | |
} |
OlderNewer