Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

34 řádky
588 B

  1. const sendObjToZone = require('./portal/sendObjToZone');
  2. module.exports = {
  3. type: 'portal',
  4. toZone: null,
  5. toPos: null,
  6. toRelativePos: null,
  7. patronLevel: 0,
  8. init: function (blueprint) {
  9. this.toPos = blueprint.pos;
  10. this.toRelativePos = blueprint.toRelativePos;
  11. this.toZone = blueprint.zone;
  12. this.patronLevel = ~~blueprint.patron;
  13. },
  14. collisionEnter: async function (obj) {
  15. if (!obj.player)
  16. return;
  17. const { toZone: zoneName, toPos, toRelativePos } = this;
  18. await sendObjToZone({
  19. obj,
  20. invokingObj: this,
  21. zoneName,
  22. toPos,
  23. toRelativePos
  24. });
  25. }
  26. };