hud.js 463 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Systems.hud = Systems.hud || {};
  2. Systems.hud.money = function(te) {
  3. var ctx = game.hudCtx;
  4. var hudData = game.hudData;
  5. var hudts = game.components.hudTarget;
  6. for(var eid in hudts) { if(hudts.hasOwnProperty(eid)) {
  7. var cash = game.getComp(eid, 'cash');
  8. ctx.font = hudData.cash.font;
  9. ctx.fillStyle = hudData.cash.color;
  10. ctx.fillText('$' + cash, hudData.cash.pos.x, hudData.cash.pos.y);
  11. }}
  12. }