Star.js 633 B

123456789101112131415161718
  1. var Stars = require("./Stars");
  2. var __extends = (this && this.__extends) || function (d, b) {for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];function __() { this.constructor = d; };__.prototype = b.prototype;d.prototype = new __();};
  3. var Star = (function(_super) {
  4. __extends(Star, _super);
  5. function Star () {
  6. Atomic.JSComponent.call(this);
  7. this.speed = 1;
  8. var type = Stars.RandomStar;
  9. };
  10. Star.prototype.speed = null;
  11. Star.prototype.update = function(timeStep) {
  12. this.node.rotate2D(this.speed);
  13. this.node.rotateAround2D([1,1],timeStep * 50,Atomic.TS_WORLD);
  14. };
  15. ;
  16. return Star;
  17. })(Atomic.JSComponent);
  18. module.exports = Star;