25 lines
331 B
Haxe
25 lines
331 B
Haxe
package lnx;
|
|
|
|
class PinTrait extends iron.Trait {
|
|
|
|
public static var pinsRemoved = 0;
|
|
|
|
public function new() {
|
|
super();
|
|
|
|
pinsRemoved = 0;
|
|
|
|
notifyOnUpdate(function() {
|
|
|
|
if (object.transform.loc.z < - 20) {
|
|
object.remove();
|
|
|
|
if (++pinsRemoved >= 10) {
|
|
leenkx.system.Event.send("exit");
|
|
}
|
|
}
|
|
|
|
});
|
|
}
|
|
}
|