actorFeatureID.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. local actorFeatureID = class("actorFeatureID")
  2. function actorFeatureID:ctor( ID )
  3. self._ID = ID
  4. self._showID = 0
  5. self._dirty = false
  6. end
  7. function actorFeatureID:cleanup()
  8. self._ID = 0
  9. self._showID = 0
  10. self._dirty = false
  11. end
  12. function actorFeatureID:isDirty()
  13. return self._dirty
  14. end
  15. function actorFeatureID:setDirty(value)
  16. self._dirty = value
  17. end
  18. function actorFeatureID:getID()
  19. return self._ID
  20. end
  21. function actorFeatureID:getShowID()
  22. return self._showID
  23. end
  24. function actorFeatureID:setID(ID)
  25. if self._ID == ID then
  26. return self._ID
  27. end
  28. self._dirty = self._dirty or ( self._ID ~= ID )
  29. self._ID = ID
  30. return self._ID
  31. end
  32. function actorFeatureID:setShowID(ID)
  33. self._dirty = self._dirty or ( self._showID ~= ID )
  34. self._showID = ID
  35. return self._showID
  36. end
  37. function actorFeatureID:getFeatureID()
  38. if self._showID > 0 then
  39. return self._showID
  40. end
  41. return self._ID
  42. end
  43. return actorFeatureID