EntityProp.js 999 B

123456789101112131415161718192021222324252627282930313233
  1. function EntityProp() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.EntityProp()
  4. }
  5. Object.defineProperties(this, {
  6. 'propName': { enumerable: true, configurable: true, get: EntityProp.prototype.__get_propName, set: EntityProp.prototype.__set_propName},
  7. 'propValue': { enumerable: true, configurable: true, get: EntityProp.prototype.__get_propValue, set: EntityProp.prototype.__set_propValue}
  8. })
  9. }
  10. EntityProp.prototype.__get_propName = function() {
  11. return Polycode.EntityProp__get_propName(this.__ptr)
  12. }
  13. EntityProp.prototype.__set_propName = function(val) {
  14. Polycode.EntityProp__set_propName(this.__ptr, val)
  15. }
  16. EntityProp.prototype.__get_propValue = function() {
  17. return Polycode.EntityProp__get_propValue(this.__ptr)
  18. }
  19. EntityProp.prototype.__set_propValue = function(val) {
  20. Polycode.EntityProp__set_propValue(this.__ptr, val)
  21. }
  22. Duktape.fin(EntityProp.prototype, function (x) {
  23. if (x === EntityProp.prototype) {
  24. return;
  25. }
  26. Polycode.EntityProp__delete(x.__ptr)
  27. })