Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

36 wiersze
615 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: function (obj) {
  15. if (!obj.player)
  16. return;
  17. (async () => {
  18. const { toZone: zoneName, toPos, toRelativePos } = this;
  19. await sendObjToZone({
  20. obj,
  21. invokingObj: this,
  22. zoneName,
  23. toPos,
  24. toRelativePos
  25. });
  26. })();
  27. }
  28. };