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ů.

TCollider.js 451B

123456789101112131415161718192021222324252627
  1. import {Trait} from "../Entity.js";
  2. export default class Collider extends Trait {
  3. constructor(entity) {
  4. super(entity, "collider");
  5. this.collides = false;
  6. this.cEntity = null;
  7. this.cStructure = null;
  8. }
  9. collideEntity(e) {
  10. this.cEntity = e;
  11. this.collides = true;
  12. }
  13. collideStructure(s) {
  14. this.cStructure = s;
  15. this.collides = true;
  16. }
  17. postUpdate() {
  18. this.cEntity = null;
  19. this.cStructure = null;
  20. this.collides = false;
  21. }
  22. }