Guest User

Untitled

a guest
Jul 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. package com.electrotank.toolsuite.editor.world.entity
  2. {
  3. import com.electrotank.toolsuite.editor.entity.EntityInstance;
  4. import com.electrotank.toolsuite.editor.entity.form.DetailsWrapper;
  5. import com.electrotank.toolsuite.editor.utils.RpcUtil;
  6. import com.electrotank.utils.LogUtil;
  7. import mx.logging.ILogger;
  8. import mx.logging.Log;
  9.  
  10. /**
  11. * @author Miranda Steed
  12. */
  13. public class QuantityOfItemDefinition extends AbstractEditorEntity
  14. {
  15. /**
  16. * @private
  17. * mx logger
  18. */
  19. private static const log:ILogger = Log.getLogger(LogUtil.categoryFor(prototype));
  20.  
  21. /**
  22. * @private
  23. * qoi details wrapper
  24. */
  25. private var _qoiDetails:DetailsWrapper;
  26.  
  27. //--------------------------------------------------------------------------
  28. //
  29. // Constructor
  30. //
  31. //--------------------------------------------------------------------------
  32.  
  33. /**
  34. * <code>QuantityOfItemDefinition</code> Constructor.
  35. */
  36. public function QuantityOfItemDefinition(entity:EntityInstance)
  37. {
  38. super(entity);
  39.  
  40. _qoiDetails = new DetailsWrapper(entity);
  41. }
  42.  
  43. public function set quantity(val:int):void
  44. {
  45. super.entity.quantity = val;
  46. }
  47.  
  48. public function set destroyItemUponUse(val:Boolean):void
  49. {
  50. super.entity.destroyItemUponUse = val;
  51. }
  52.  
  53. public function set item(val:ItemDefinition):void
  54. {
  55. super.entity.item = val.entity;
  56. }
  57.  
  58. public function get quantity():int
  59. {
  60. return super.entity.quantity;
  61. }
  62.  
  63. public function get destroyItemUponUse():Boolean
  64. {
  65. return super.entity.destroyItemUponUse;
  66. }
  67.  
  68. public function get item():ItemDefinition
  69. {
  70. return (new ItemDefinition(new EntityInstance(super.entity.item)));
  71. }
  72.  
  73. public function get qoiDetails():DetailsWrapper
  74. {
  75. return _qoiDetails;
  76. }
  77. }
  78. }
Add Comment
Please, Sign In to add comment