motion-game 1.1.9 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 189ab22b61240895998f7b3bbddb202e237917b8
4
- data.tar.gz: f48f5d7661425dda5bb594807d0434775c1190e4
3
+ metadata.gz: 42ae17cc05e2be3ca643a70dfc399164016c8461
4
+ data.tar.gz: 788f6ef67f7e1cc9e129a0b54e9aa33d7719730c
5
5
  SHA512:
6
- metadata.gz: 5801d9e32fa57ceeb48237e5fa4a54202cd2a2d690ba4ad02361e8acc703a1096b1784785f5c4708c6ac606ff450342f3cb0ec72298b8fa159be8ee69a8a20ef
7
- data.tar.gz: 2abdeca95ff2a402e1e294aede6e5d3c3f6639660db6451f9d4c33209161424b2cfcea2d423ecd60b4a979a06c624f6cdc490217463ad2235b7d4b980c52b577
6
+ metadata.gz: 2873f6e4b51e7a9f801396427495f66d2d3ebfd27777346830f92360882a7ed4462145872f27e1619adea1af4b5a1cfdb151eb8ee2e61f25c29918b21ef056c4
7
+ data.tar.gz: d25db5f1795c5b78bf702fd7257f7161404c402894689f27cb509553c741531d80c53fb1fc2f5035318833b8265c497359a3805bb7ce7cd64c0ce7eb4abc832c
data/README.md CHANGED
@@ -95,7 +95,7 @@ $ rake android:device
95
95
 
96
96
  ### API reference
97
97
 
98
- The whole framework API is documented. The [API reference](http://www.rubydoc.info/gems/motion-game/) is available online.
98
+ The whole framework API is documented. The [API reference](http://www.rubydoc.info/gems/motion-game/1.1.10) is available online.
99
99
 
100
100
  You can also build the API reference locally:
101
101
 
Binary file
Binary file
@@ -10,14 +10,14 @@ module Events; end
10
10
 
11
11
  class Action < Object
12
12
  # Reverses the action
13
- # @return [Action] the reversed action.
13
+ # @return [self] the receiver.
14
14
  def reverse; end
15
15
 
16
16
  end
17
17
 
18
18
  class Action < Object
19
19
  # Clones the action
20
- # @return [Action] the cloned action.
20
+ # @return [self] the receiver.
21
21
  def clone; end
22
22
 
23
23
  # Whether the action is done.
@@ -305,6 +305,9 @@ class Repeat < Action
305
305
  # @return [Repeat] the action.
306
306
  def initialize(target_action, times); end
307
307
 
308
+ # This constant is used as a count value indicating an infinite loop.
309
+ FOREVER = -1
310
+
308
311
  end
309
312
 
310
313
  class RepeatForever < Action
@@ -330,8 +333,8 @@ class Animate < Action
330
333
  # files in the application's resource directory or the names of sprite
331
334
  # frames loaded from a spritesheet using {Sprite.load}.
332
335
  # @param delay [Float] the delay in seconds between each frame animation.
333
- # @param loops [Integer, Symbol] the number of times the animation should
334
- # loop. If given the +:forever+ symbol, the animation will loop forever.
336
+ # @param loops [Integer] the number of times the animation should loop.
337
+ # If {Repeat::FOREVER} (or negative value directly) was given, the animation will loop forever.
335
338
  # @return [Animate] the action.
336
339
  def initialize(frame_names, delay, loops=1); end
337
340
 
@@ -357,7 +360,7 @@ class Application < Object
357
360
  # This method is called when the application finished launching. This method
358
361
  # is empty by default, and you are responsible to provide a custom
359
362
  # implementation that will create the interface of your game.
360
- # @return [Application] the receiver.
363
+ # @return [self] the receiver.
361
364
  def start; end
362
365
 
363
366
  end
@@ -403,15 +406,15 @@ class Audio < Object
403
406
  attr_reader :duration
404
407
 
405
408
  # Resumes playing the sound file.
406
- # @return [Audio] the receiver.
409
+ # @return [self] the receiver.
407
410
  def resume; end
408
411
 
409
412
  # Pauses the sound file.
410
- # @return [Audio] the receiver.
413
+ # @return [self] the receiver.
411
414
  def pause; end
412
415
 
413
416
  # Stops the sound file.
414
- # @return [Audio] the receiver.
417
+ # @return [self] the receiver.
415
418
  def stop; end
416
419
 
417
420
  # @return [Boolean] whether the sound file is being played.
@@ -434,44 +437,44 @@ class Director < Object
434
437
 
435
438
  # Runs the given scene object.
436
439
  # @param scene [Scene] the scene to run.
437
- # @return [Director] the receiver.
440
+ # @return [self] the receiver.
438
441
  def run(scene); end
439
442
 
440
443
  # Replaces the current scene with a new one. The running scene will be
441
444
  # terminated.
442
445
  # @param scene [Scene] the scene to replace the current one with.
443
- # @return [Director] the receiver.
446
+ # @return [self] the receiver.
444
447
  def replace(scene); end
445
448
 
446
449
  # Suspends the execution of the running scene, and starts running the given
447
450
  # scene instead.
448
451
  # @param scene [Scene] the new scene to run.
449
- # @return [Director] the receiver.
452
+ # @return [self] the receiver.
450
453
  def push(scene); end
451
454
 
452
455
  # Pops the running scene from the stack, and starts running the previous
453
456
  # scene. If there are no more scenes to run, the execution will be stopped.
454
- # @return [Director] the receiver.
457
+ # @return [self] the receiver.
455
458
  def pop; end
456
459
 
457
460
  # Ends the execution of the running scene.
458
- # @return [Director] the receiver.
461
+ # @return [self] the receiver.
459
462
  def end; end
460
463
 
461
464
  # Pauses the execution of the running scene.
462
- # @return [Director] the receiver.
465
+ # @return [self] the receiver.
463
466
  def pause; end
464
467
 
465
468
  # Resumes the execution of the current paused scene.
466
- # @return [Director] the receiver.
469
+ # @return [self] the receiver.
467
470
  def resume; end
468
471
 
469
472
  # The main loop is triggered again.
470
- # @return [Director] the receiver.
473
+ # @return [self] the receiver.
471
474
  def start_animation; end
472
475
 
473
476
  # Stops the animation.
474
- # @return [Director] the receiver.
477
+ # @return [self] the receiver.
475
478
  def stop_animation; end
476
479
 
477
480
 
@@ -545,24 +548,25 @@ class Scene < Node
545
548
 
546
549
  # Starts the update loop. The +#update+ method will be called on this object
547
550
  # for every frame.
548
- # @return [Scene] the receiver.
551
+ # @return [self] the receiver.
549
552
  def start_update; end
550
553
 
551
554
  # Stops the update loop. The +#update+ method will no longer be called on
552
555
  # this object.
553
- # @return [Scene] the receiver.
556
+ # @return [self] the receiver.
554
557
  def stop_update; end
555
558
 
556
559
  # The update loop method. Subclasses can provide a custom implementation of
557
560
  # this method. The default implementation is empty.
558
561
  # @param delta [Float] a value representing the amount of time, in seconds,
559
562
  # since the last time this method was called.
560
- # @return [Scene] the receiver.
563
+ # @return [self] the receiver.
561
564
  def update(delta); end
562
565
 
563
566
  # Schedules a given block for execution.
564
567
  # @param delay [Float] the duration of the block, in seconds.
565
568
  # @param repeat [Integer] the number of times the block should be repeated.
569
+ # If {Repeat::FOREVER} (or negative value directly) was given, the animation will loop forever.
566
570
  # @param interval [Float] the interval between repetitions, in seconds.
567
571
  # @yield [Float] the given block will be yield with the delta value,
568
572
  # in seconds.
@@ -573,7 +577,7 @@ class Scene < Node
573
577
  # Unschedules a task that's currently running.
574
578
  # @param key [String] a token representing the task to unschedule,
575
579
  # returned by {#schedule}.
576
- # @return [Scene] the receiver.
580
+ # @return [self] the receiver.
577
581
  def unschedule(key); end
578
582
 
579
583
 
@@ -582,37 +586,37 @@ class Scene < Node
582
586
  # Starts listening for touch begin events on the receiver.
583
587
  # @yield [Events::Touch] the given block will be yield when a touch begin
584
588
  # event is received.
585
- # @return [Scene] the receiver.
589
+ # @return [self] the receiver.
586
590
  def on_touch_begin; end
587
591
 
588
592
  # Starts listening for touch end events on the receiver.
589
593
  # @yield [Events::Touch] the given block will be yield when a touch end
590
594
  # event is received.
591
- # @return [Scene] the receiver.
595
+ # @return [self] the receiver.
592
596
  def on_touch_end; end
593
597
 
594
598
  # Starts listening for touch move events on the receiver.
595
599
  # @yield [Events::Touch] the given block will be yield when a touch move
596
600
  # event is received.
597
- # @return [Scene] the receiver.
601
+ # @return [self] the receiver.
598
602
  def on_touch_move; end
599
603
 
600
604
  # Starts listening for touch cancel events on the receiver.
601
605
  # @yield [Events::Touch] the given block will be yield when a touch cancel
602
606
  # event is received.
603
- # @return [Scene] the receiver.
607
+ # @return [self] the receiver.
604
608
  def on_touch_cancel; end
605
609
 
606
610
  # Starts listening for accelerometer events on the receiver.
607
611
  # @yield [Events::Acceleration] the given block will be yield when an
608
612
  # accelerometer event is received from the device.
609
- # @return [Scene] the receiver.
613
+ # @return [self] the receiver.
610
614
  def on_accelerate; end
611
615
 
612
616
  # Starts listening for contact begin events from the physics engine.
613
617
  # @yield [Events::PhysicsContact] the given block will be yield when a
614
618
  # contact event is received from the physics engine.
615
- # @return [Scene] the receiver.
619
+ # @return [self] the receiver.
616
620
  def on_contact_begin; end
617
621
 
618
622
 
@@ -640,13 +644,13 @@ class Menu < Object
640
644
  # aligns menu items vertically with padding
641
645
  # (call after adding items via image_item)
642
646
  # @param padding [Float] the amount of padding between the items.
643
- # @return [Menu] the receiver.
647
+ # @return [self] the receiver.
644
648
  def align_items_vertically(padding=null); end
645
649
 
646
650
  # aligns menu items horizontally with padding
647
651
  # (call after adding items via image_item)
648
652
  # @param padding [Float] the amount of padding between the items.
649
- # @return [Menu] the receiver.
653
+ # @return [self] the receiver.
650
654
  def align_items_horizontally(padding=null); end
651
655
 
652
656
  # Whether the menu is enabled. When enabled, a menu can be
@@ -662,6 +666,7 @@ class Menu < Object
662
666
  # @param normal_image [String] normal image name.
663
667
  # @param selected_image [String] selected image name.
664
668
  # @yield The methods to call when tapped menu.
669
+ # @return [self] the receiver.
665
670
  def image_item(normal_image, selected_image); end
666
671
 
667
672
  end
@@ -718,17 +723,17 @@ class Node < Object
718
723
  attr_accessor :name
719
724
 
720
725
  # Run the provided action on the receiver node.
721
- # @return [Node] the receiver.
726
+ # @return [self] the receiver.
722
727
  # @yield if passed a block, the block will be called for the action.
723
728
  def run_action(action); end
724
729
 
725
730
  # Stop all actions running on the node
726
- # @return [Node] the receiver.
731
+ # @return [self] the receiver.
727
732
  def stop_all_actions(); end
728
733
 
729
734
  # Stop the provided action
730
735
  # @param action [Action] the action to stop.
731
- # @return [Node] the receiver.
736
+ # @return [self] the receiver.
732
737
  def stop_action(action); end
733
738
 
734
739
  # @param node [Node] a given Node object.
@@ -742,19 +747,19 @@ class Node < Object
742
747
  # Adds a child node to the receiver with a local z-order.
743
748
  # @param node [Node] the child to add.
744
749
  # @param zpos [Integer] the local z-order.
745
- # @return [Node] the receiver.
750
+ # @return [self] the receiver.
746
751
  def add(node, zpos=0); end
747
752
 
748
753
  # Removes all children nodes from the receiver.
749
754
  # @param cleanup [Boolean] cleans all running actions on children before
750
755
  # removing them.
751
- # @return [Node] the receiver.
756
+ # @return [self] the receiver.
752
757
  def clear(cleanup=true); end
753
758
 
754
759
  # Removes the given child node from the receiver.
755
760
  # @param cleanup [Boolean] cleans all running actions on child before
756
761
  # removing it.
757
- # @return [Node] the receiver.
762
+ # @return [self] the receiver.
758
763
  def delete(node, cleanup=true); end
759
764
 
760
765
  # @return [Node] the parent node, or +nil+ if there isn't one.
@@ -769,7 +774,7 @@ class Node < Object
769
774
  # node.parent.delete(node, cleanup)
770
775
  # @param cleanup [Boolean] cleans all running actions on the receiver before
771
776
  # removing it from the parent.
772
- # @return [Node] the receiver.
777
+ # @return [self] the receiver.
773
778
  def delete_from_parent(cleanup=true); end
774
779
 
775
780
  end
@@ -791,14 +796,14 @@ class Draw < Node
791
796
  # @group Draw Operations
792
797
 
793
798
  # Clears drew shapes.
794
- # @return [Draw] the receiver.
799
+ # @return [self] the receiver.
795
800
  def clear; end
796
801
 
797
802
  # Draws a filled circle at the given position with the given radius and color.
798
803
  # @param pos [Point] the position where to draw.
799
804
  # @param radius [Float] the radius of the circle to draw.
800
805
  # @param color [Color] the color to use to fill the circle.
801
- # @return [Draw] the receiver.
806
+ # @return [self] the receiver.
802
807
  def dot(pos, radius, color); end
803
808
 
804
809
  # Draws a rectangle at the given position with the given color.
@@ -806,7 +811,7 @@ class Draw < Node
806
811
  # @param destination [Point] the position where to end drawing (higher-right).
807
812
  # @param color [Color] the color to use to draw.
808
813
  # @param fill [Boolean] whether the rectangle should be filled up.
809
- # @return [Draw] the receiver.
814
+ # @return [self] the receiver.
810
815
  def rect(origin, destination, color, fill=false); end
811
816
 
812
817
  # Draws a line at the given position with the given color.
@@ -814,7 +819,7 @@ class Draw < Node
814
819
  # @param destination [Point] the position where to end drawing (higher-right).
815
820
  # @param thickness [Float] the line thickness.
816
821
  # @param color [Color] the color to use to draw.
817
- # @return [Draw] the receiver.
822
+ # @return [self] the receiver.
818
823
  def line(origin, destination, thickness, color); end
819
824
 
820
825
  # Draws a triangle at the given positions with the given color.
@@ -822,7 +827,7 @@ class Draw < Node
822
827
  # @param position2 [Point] The triangle vertex point.
823
828
  # @param position3 [Point] The triangle vertex point.
824
829
  # @param color [Color] the color to use to draw.
825
- # @return [Draw] the receiver.
830
+ # @return [self] the receiver.
826
831
  def triangle(position1, position2, position3, color); end
827
832
 
828
833
  end
@@ -905,14 +910,14 @@ class Sprite < Node
905
910
  # @param delta_location [Point] a point that will be added to the receiver's
906
911
  # current location.
907
912
  # @param interval [Float] the animation interval.
908
- # @return [Sprite] the receiver.
913
+ # @return [self] the receiver.
909
914
  # @yield if passed a block, the block will be called for the action.
910
915
  def move_by(delta_location, interval); end
911
916
 
912
917
  # Moves the position of the receiver to a new given location.
913
918
  # @param location [Point] where the receiver should be moved to.
914
919
  # @param interval [Float] the animation interval.
915
- # @return [Sprite] the receiver.
920
+ # @return [self] the receiver.
916
921
  # @yield if passed a block, the block will be called for the action.
917
922
  def move_to(location, interval); end
918
923
 
@@ -920,7 +925,7 @@ class Sprite < Node
920
925
  # sum of the current rotation and the given +delta_angle+ object.
921
926
  # @param delta_angle [Float] the angle to add to the current rotation
922
927
  # @param interval [Float] the animation interval.
923
- # @return [Sprite] the receiver.
928
+ # @return [self] the receiver.
924
929
  # @yield if passed a block, the block will be called for the action.
925
930
  def rotate_by(delta_angle, interval); end
926
931
 
@@ -928,7 +933,7 @@ class Sprite < Node
928
933
  # by modifying it's rotation attribute.
929
934
  # @param angle [Float] the receiver should be rotated to.
930
935
  # @param interval [Float] the animation interval.
931
- # @return [Sprite] the receiver.
936
+ # @return [self] the receiver.
932
937
  # @yield if passed a block, the block will be called for the action.
933
938
  def rotate_to(angle, interval); end
934
939
 
@@ -936,7 +941,7 @@ class Sprite < Node
936
941
  # @param number_of_blinks [Integer] the number of times the receiver should
937
942
  # blink.
938
943
  # @param interval [Float] the animation interval.
939
- # @return [Sprite] the receiver.
944
+ # @return [self] the receiver.
940
945
  # @yield if passed a block, the block will be called for the action.
941
946
  def blink(number_of_blinks, interval); end
942
947
 
@@ -948,9 +953,9 @@ class Sprite < Node
948
953
  # files in the application's resource directory or the names of sprite
949
954
  # frames loaded from a spritesheet using {load}.
950
955
  # @param delay [Float] the delay in seconds between each frame animation.
951
- # @param loops [Integer, Symbol] the number of times the animation should
952
- # loop. If given the +:forever+ symbol, the animation will loop forever.
953
- # @return [Sprite] the receiver.
956
+ # @param loops [Integer] the number of times the animation should loop.
957
+ # If {Repeat::FOREVER} (or negative value directly) was given, the animation will loop forever.
958
+ # @return [self] the receiver.
954
959
  # @yield if passed a block, the block will be called for the action.
955
960
  def animate(frame_names, delay, loops=1); end
956
961
 
@@ -978,17 +983,17 @@ class Sprite < Node
978
983
  # Attaches a physics body with a box shape to the sprite.
979
984
  # @param size [Size] the size of the box. If +nil+ is given, the size of the
980
985
  # sprite, retrieved with {#size}, will be used instead.
981
- # @return [Sprite] the receiver.
986
+ # @return [self] the receiver.
982
987
  def attach_physics_box(size=nil); end
983
988
 
984
989
  # Applies a continuous force to the sprite body.
985
990
  # @param force [Point] the force to apply.
986
- # @return [Sprite] the receiver.
991
+ # @return [self] the receiver.
987
992
  def apply_impulse(force); end
988
993
 
989
994
  # Applies an immediate force to the sprite body.
990
995
  # @param force [Point] the force to apply.
991
- # @return [Sprite] the receiver.
996
+ # @return [self] the receiver.
992
997
  def apply_force(force); end
993
998
 
994
999
 
@@ -1050,7 +1055,29 @@ end
1050
1055
  # point.x = 10
1051
1056
  # point.y = 20
1052
1057
  # node.location = point
1058
+ # or
1059
+ # node.location = MG::Point.new(10, 20)
1053
1060
  class Point < Object
1061
+
1062
+ # @group Constructors
1063
+
1064
+ # @overload initialize
1065
+ # Creates a new object.
1066
+ # @return [Point] a Point object.
1067
+ # @overload initialize(ary)
1068
+ # Creates a new object with 2-element +Array+.
1069
+ # @param ary [Array] 2-element +Array+.
1070
+ # @return [Point] a Point object.
1071
+ # @overload initialize(x, y)
1072
+ # Creates a new object.
1073
+ # @param x [Float] the x coordinate of the point.
1074
+ # @param y [Float] the y coordinate of the point.
1075
+ # @return [Point] a Point object.
1076
+ def initialize(*args); end
1077
+
1078
+
1079
+ # @endgroup
1080
+
1054
1081
  # @return [Float] the x coordinate of the point.
1055
1082
  attr_accessor :x
1056
1083
 
@@ -1062,16 +1089,21 @@ class Point < Object
1062
1089
 
1063
1090
  # Adds the coordinates of the receiver with the coordinates of the given
1064
1091
  # point object.
1065
- # @param point [Point]
1092
+ # @param point [Point] A coordinate.
1066
1093
  # @return [Point] A new Point object.
1067
1094
  def +(point); end
1068
1095
 
1069
1096
  # Substracts the coordinates of the receiver with the coordinates of the given
1070
1097
  # point object.
1071
- # @param point [Point]
1098
+ # @param point [Point] A coordinate.
1072
1099
  # @return [Point] A new Point object.
1073
1100
  def -(point); end
1074
1101
 
1102
+ # Calculates the distance between two points.
1103
+ # @param point [Point] A point to calculate the distance.
1104
+ # @return [Float] the distance.
1105
+ def distance(point); end
1106
+
1075
1107
  end
1076
1108
  # A size represents the dimensions of width and height of an object.
1077
1109
  # When calling a method that expects a +Size+ object, a 2-element +Array+
@@ -1079,10 +1111,32 @@ end
1079
1111
  # node.size = [200, 400]
1080
1112
  # is the same as
1081
1113
  # size = MG::Size.new
1082
- # size.x = 200
1083
- # size.y = 400
1114
+ # size.width = 200
1115
+ # size.height = 400
1084
1116
  # node.size = size
1117
+ # or
1118
+ # node.size = MG::Size.new(200, 400)
1085
1119
  class Size < Object
1120
+
1121
+ # @group Constructors
1122
+
1123
+ # @overload initialize
1124
+ # Creates a new object.
1125
+ # @return [Size] a Size object.
1126
+ # @overload initialize(ary)
1127
+ # Creates a new object with 2-element +Array+.
1128
+ # @param ary [Array] 2-element +Array+.
1129
+ # @return [Size] a Size object.
1130
+ # @overload initialize(width, height)
1131
+ # Creates a new object.
1132
+ # @param width [Float] a size width.
1133
+ # @param height [Float] a size height.
1134
+ # @return [Size] a Size object.
1135
+ def initialize(*args); end
1136
+
1137
+
1138
+ # @endgroup
1139
+
1086
1140
  # @return [Float] the size width.
1087
1141
  attr_accessor :width
1088
1142
 
@@ -1094,13 +1148,13 @@ class Size < Object
1094
1148
 
1095
1149
  # Adds the dimensions of the receiver with the dimensions of the given
1096
1150
  # size object.
1097
- # @param size [Size]
1151
+ # @param size [Size] A dimension.
1098
1152
  # @return [Size] a new Size object.
1099
1153
  def +(size); end
1100
1154
 
1101
1155
  # Substracts the dimensions of the receiver with the dimensions of the given
1102
1156
  # size object.
1103
- # @param size [Size]
1157
+ # @param size [Size] A dimension.
1104
1158
  # @return [Size] a new Size object.
1105
1159
  def -(size); end
1106
1160
 
@@ -1126,6 +1180,8 @@ end
1126
1180
  # color.green = 0.3
1127
1181
  # color.blue = 0.4
1128
1182
  # node.color = color
1183
+ # or
1184
+ # node.color = MG::Color.new(0.2, 0.3, 0.4)
1129
1185
  # Alternatively, a +Symbol+ corresponding to a basic color name can be
1130
1186
  # provided. For example,
1131
1187
  # node.color = :red
@@ -1138,6 +1194,28 @@ end
1138
1194
  # +:green+ and +:blue+.
1139
1195
  # The +MG::Color.new+ constructor will return the black color.
1140
1196
  class Color < Object
1197
+
1198
+ # @group Constructors
1199
+
1200
+ # @overload initialize
1201
+ # Creates a new object with default color set.
1202
+ # @return [Color] a Color object.
1203
+ # @overload initialize(ary)
1204
+ # Creates a new object with 3-element or 4-element +Array+.
1205
+ # @param ary [Array] 3-element or 4-element +Array+.
1206
+ # @return [Color] a Color object.
1207
+ # @overload initialize(red, green, blue, alpha=1.0)
1208
+ # Creates a new object.
1209
+ # @param red [Float] the red portion of the color, from +0.0+ to +1.0+.
1210
+ # @param green [Float] the green portion of the color, from +0.0+ to +1.0+.
1211
+ # @param blue [Float] the blue portion of the color, from +0.0+ to +1.0+.
1212
+ # @param alpha [Float] the alpha portion of the color, from +0.0+ to +1.0+.
1213
+ # @return [Color] a Color object.
1214
+ def initialize(*args); end
1215
+
1216
+
1217
+ # @endgroup
1218
+
1141
1219
  # @return [Float] the red portion of the color, from +0.0+ to +1.0+.
1142
1220
  attr_accessor :red
1143
1221
 
@@ -1193,7 +1271,7 @@ class Widget < Node
1193
1271
  # @yield [Symbol] the given block will be called when the event
1194
1272
  # is received with a +Symbol+ that describes the type of event, which can
1195
1273
  # be +:begin+, +:move+, +:end+ or +:cancel+.
1196
- # @return [Widget] the receiver.
1274
+ # @return [self] the receiver.
1197
1275
  def on_touch; end
1198
1276
 
1199
1277
  end
@@ -1348,6 +1426,38 @@ class Scroll < Layout
1348
1426
  # @return [Layout] the inner container of the scroll view.
1349
1427
  attr_reader :inner_container
1350
1428
 
1429
+ # Move inner container to bottom boundary of scrollview.
1430
+ # @return [self] the receiver.
1431
+ def jump_to_bottom; end
1432
+
1433
+ # Move inner container to bottom and left boundary of scrollview.
1434
+ # @return [self] the receiver.
1435
+ def jump_to_bottom_left; end
1436
+
1437
+ # Move inner container to bottom and right boundary of scrollview.
1438
+ # @return [self] the receiver.
1439
+ def jump_to_bottom_right; end
1440
+
1441
+ # Move inner container to left boundary of scrollview.
1442
+ # @return [self] the receiver.
1443
+ def jump_to_left; end
1444
+
1445
+ # Move inner container to right boundary of scrollview.
1446
+ # @return [self] the receiver.
1447
+ def jump_to_right; end
1448
+
1449
+ # Move inner container to top boundary of scrollview.
1450
+ # @return [self] the receiver.
1451
+ def jump_to_top; end
1452
+
1453
+ # Move inner container to top and left boundary of scrollview.
1454
+ # @return [self] the receiver.
1455
+ def jump_to_top_left; end
1456
+
1457
+ # Move inner container to top and right boundary of scrollview.
1458
+ # @return [self] the receiver.
1459
+ def jump_to_top_right; end
1460
+
1351
1461
  end
1352
1462
 
1353
1463
  class List < Scroll
@@ -1362,13 +1472,13 @@ class List < Scroll
1362
1472
 
1363
1473
  # Adds a new item to the end of the list.
1364
1474
  # @param widget [Widget] the item to add.
1365
- # @return [List] the receiver.
1475
+ # @return [self] the receiver.
1366
1476
  def add_item(widget); end
1367
1477
 
1368
1478
  # Inserts a new item at the given index in the list.
1369
1479
  # @param index [Integer] the index where to add the item.
1370
1480
  # @param widget [Widget] the item to add.
1371
- # @return [List] the receiver.
1481
+ # @return [self] the receiver.
1372
1482
  def insert_item(index, widget); end
1373
1483
 
1374
1484
  # Retrieves the item at the given index.
@@ -1378,11 +1488,11 @@ class List < Scroll
1378
1488
 
1379
1489
  # Deletes the item at the given index.
1380
1490
  # @param index [Integer] the index to look up.
1381
- # @return [List] the receiver.
1491
+ # @return [self] the receiver.
1382
1492
  def delete_item(index); end
1383
1493
 
1384
1494
  # Removes all items in the list.
1385
- # @return [List] the receiver.
1495
+ # @return [self] the receiver.
1386
1496
  def clear_items; end
1387
1497
 
1388
1498
 
@@ -1391,7 +1501,7 @@ class List < Scroll
1391
1501
  # Configures a block to be called when an item is selected in the list view.
1392
1502
  # @yield [Integer] the given block will be called when an item is selected,
1393
1503
  # passing the index of the selection as the argument.
1394
- # @return [List] the receiver.
1504
+ # @return [self] the receiver.
1395
1505
  def on_selection; end
1396
1506
 
1397
1507
  # @return [Integer] the index of the currently selected item.
@@ -1418,25 +1528,25 @@ class Web < Widget
1418
1528
  # Loads a given HTML data into the widget.
1419
1529
  # @param str [String] the HTML string to load.
1420
1530
  # @param baseurl [String] the base URL for the content.
1421
- # @return [Web] the receiver.
1531
+ # @return [self] the receiver.
1422
1532
  def load_html(str, baseurl); end
1423
1533
 
1424
1534
  # Loads a given URL into the widget.
1425
1535
  # @param url [String] the URL to load.
1426
- # @return [Web] the receiver.
1536
+ # @return [self] the receiver.
1427
1537
  def load_url(url); end
1428
1538
 
1429
1539
  # Loads a given file into the widget.
1430
1540
  # @param path [String] the file to load.
1431
- # @return [Web] the receiver.
1541
+ # @return [self] the receiver.
1432
1542
  def load_file(path); end
1433
1543
 
1434
1544
  # Stops the current loading.
1435
- # @return [Web] the receiver.
1545
+ # @return [self] the receiver.
1436
1546
  def stop; end
1437
1547
 
1438
1548
  # Reloads the current context.
1439
- # @return [Web] the receiver.
1549
+ # @return [self] the receiver.
1440
1550
  def reload; end
1441
1551
 
1442
1552
 
@@ -1444,7 +1554,7 @@ class Web < Widget
1444
1554
 
1445
1555
  # Evaluates the given JavaScript expression.
1446
1556
  # @param expr [String] a JavaScript expression to evaluate.
1447
- # @return [Web] the receiver.
1557
+ # @return [self] the receiver.
1448
1558
  def evaluate(expr); end
1449
1559
 
1450
1560
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-game
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipByte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: motion-game allows you to write cross-platform native mobile games in
14
14
  Ruby.
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.6.8
108
+ rubygems_version: 2.5.2
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Cross-platform mobile game engine for RubyMotion