SpriteFrame.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. function SpriteFrame() {
  2. Object.defineProperties(this, {
  3. 'coordinates': { enumerable: true, configurable: true, get: SpriteFrame.prototype.__get_coordinates, set: SpriteFrame.prototype.__set_coordinates},
  4. 'anchorPoint': { enumerable: true, configurable: true, get: SpriteFrame.prototype.__get_anchorPoint, set: SpriteFrame.prototype.__set_anchorPoint},
  5. 'frameID': { enumerable: true, configurable: true, get: SpriteFrame.prototype.__get_frameID, set: SpriteFrame.prototype.__set_frameID}
  6. })
  7. }
  8. SpriteFrame.prototype.__get_coordinates = function() {
  9. var retVal = new Rectangle()
  10. retVal.__ptr = Polycode.SpriteFrame__get_coordinates(this.__ptr)
  11. return retVal
  12. }
  13. SpriteFrame.prototype.__set_coordinates = function(val) {
  14. Polycode.SpriteFrame__set_coordinates(this.__ptr, val.__ptr)
  15. }
  16. SpriteFrame.prototype.__get_anchorPoint = function() {
  17. var retVal = new Vector2()
  18. retVal.__ptr = Polycode.SpriteFrame__get_anchorPoint(this.__ptr)
  19. return retVal
  20. }
  21. SpriteFrame.prototype.__set_anchorPoint = function(val) {
  22. Polycode.SpriteFrame__set_anchorPoint(this.__ptr, val.__ptr)
  23. }
  24. SpriteFrame.prototype.__get_frameID = function() {
  25. return Polycode.SpriteFrame__get_frameID(this.__ptr)
  26. }
  27. SpriteFrame.prototype.__set_frameID = function(val) {
  28. Polycode.SpriteFrame__set_frameID(this.__ptr, val)
  29. }