| OLD | NEW |
| 1 part of sprites; | 1 part of sprites; |
| 2 | 2 |
| 3 double convertDegrees2Radians(double degrees) => degrees * Math.PI/180.8; | 3 double convertDegrees2Radians(double degrees) => degrees * Math.PI/180.8; |
| 4 | 4 |
| 5 double convertRadians2Degrees(double radians) => radians * 180.0/Math.PI; | 5 double convertRadians2Degrees(double radians) => radians * 180.0/Math.PI; |
| 6 | 6 |
| 7 /// A base class for all objects that can be added to the sprite node tree and r
endered to screen using [SpriteBox] and | 7 /// A base class for all objects that can be added to the sprite node tree and r
endered to screen using [SpriteBox] and |
| 8 /// [SpriteWidget]. | 8 /// [SpriteWidget]. |
| 9 /// | 9 /// |
| 10 /// The [Node] class itself doesn't render any content, but provides the basic f
unctions of any type of node, such as | 10 /// The [Node] class itself doesn't render any content, but provides the basic f
unctions of any type of node, such as |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 /// This property is only meaningful if [userInteractionEnabled] is set to tru
e. Default value is false. | 52 /// This property is only meaningful if [userInteractionEnabled] is set to tru
e. Default value is false. |
| 53 /// | 53 /// |
| 54 /// class MyCustomNode extends Node { | 54 /// class MyCustomNode extends Node { |
| 55 /// handleMultiplePointers = true; | 55 /// handleMultiplePointers = true; |
| 56 /// } | 56 /// } |
| 57 bool handleMultiplePointers = false; | 57 bool handleMultiplePointers = false; |
| 58 int _handlingPointer; | 58 int _handlingPointer; |
| 59 | 59 |
| 60 List<Node>_children = []; | 60 List<Node>_children = []; |
| 61 | 61 |
| 62 ActionController _actions; |
| 63 |
| 64 ActionController get actions { |
| 65 if (_actions == null) { |
| 66 _actions = new ActionController(); |
| 67 } |
| 68 return _actions; |
| 69 } |
| 70 |
| 62 // Constructors | 71 // Constructors |
| 63 | 72 |
| 64 /// Creates a new [Node] without any transformation. | 73 /// Creates a new [Node] without any transformation. |
| 65 /// | 74 /// |
| 66 /// var myNode = new Node(); | 75 /// var myNode = new Node(); |
| 67 Node() { | 76 Node() { |
| 68 } | 77 } |
| 69 | 78 |
| 70 // Property setters and getters | 79 // Property setters and getters |
| 71 | 80 |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 /// else if (event.type == 'pointerup') { | 530 /// else if (event.type == 'pointerup') { |
| 522 /// opacity = 1.0; | 531 /// opacity = 1.0; |
| 523 /// } | 532 /// } |
| 524 /// return true; | 533 /// return true; |
| 525 /// } | 534 /// } |
| 526 /// } | 535 /// } |
| 527 bool handleEvent(SpriteBoxEvent event) { | 536 bool handleEvent(SpriteBoxEvent event) { |
| 528 return false; | 537 return false; |
| 529 } | 538 } |
| 530 } | 539 } |
| OLD | NEW |