TestPoint.js 611 B

123456789101112131415161718192021222324252627
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. Object.defineProperty(i, "__esModule", {value: !0});
  5. i.default = class e {
  6. constructor(t, e) {
  7. (this._x = t), (this._y = e);
  8. }
  9. set x(t) {
  10. (this._x = t), Log.error("被赋值了");
  11. }
  12. get x() {
  13. return this._x;
  14. }
  15. set y(t) {
  16. (this._y = t), Log.error("被赋值了");
  17. }
  18. get y() {
  19. return this._y;
  20. }
  21. equals(t) {
  22. return t instanceof e ? this._x == t._x && this._y == t._y : this._x == t.x && this._y == t.y;
  23. }
  24. clone() {
  25. return cc.v2(this._x, this._y);
  26. }
  27. };