scorched_earth 5.0.2.pre-java → 5.0.3.pre-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28ec71507af5b6c4c986dfe98825053cd5020e57
4
- data.tar.gz: 3a437e2bf60c1461586f239789ac9b2cb4228a1d
3
+ metadata.gz: 7e08b161ae03a1b6d480480d02a82ea3b96d3e2c
4
+ data.tar.gz: 4dc441be041a996401460c20f75b683a84a3702e
5
5
  SHA512:
6
- metadata.gz: 9c5eb534155f895af79fa11b1dde3812d3e6e26b891df7c36ae18ef843ace49f7d1234c305fad0558503204ed296e99bf70394bcbd29ca085393f0b73b8350cd
7
- data.tar.gz: 383e0c02b970496f8ed3be4d4ee11460ac30ff7f436f9cdda2a0727fc65303278c857437453f7cb3360cfe72ee6357ae461f54bf7af21ef1f6ea2d50458a47be
6
+ metadata.gz: 72e9f1fbe7c1fe49415813e7b6451c3d4c0b36c4d4b7604b542ab5cb5cf839e995e7a802ed89b0a4ad22e1139dbde7a89184b328f11ff04989025638ca06102f
7
+ data.tar.gz: a0d47c9e26eab3b41aad86d5ab12dc03312433d6531e9edfa107a9f17e15fac28ce771479ba13cb523c69ae183044fc06e505e430961f05766a5c1784e6fe0b4
@@ -3,7 +3,7 @@ module ScorchedEarth
3
3
  attr_reader :queue, :subscribers
4
4
 
5
5
  def initialize
6
- @queue = Queue.new
6
+ @queue = Queue.new
7
7
  @subscribers = []
8
8
  end
9
9
 
@@ -19,7 +19,6 @@ module ScorchedEarth
19
19
  processing = queue.size.times.map { queue.pop }
20
20
 
21
21
  processing.each do |event|
22
- puts event.inspect
23
22
  subscribers.each do |klass, block|
24
23
  block.call event if event.is_a? klass
25
24
  end
@@ -15,6 +15,9 @@ require 'scorched_earth/events/mouse_moved'
15
15
 
16
16
  module ScorchedEarth
17
17
  class GameWindow
18
+ include java.awt.event.MouseMotionListener
19
+ include java.awt.event.MouseListener
20
+
18
21
  attr_reader :buffer_strategy, :canvas, :game
19
22
 
20
23
  def initialize(width, height)
@@ -26,6 +29,7 @@ module ScorchedEarth
26
29
 
27
30
  @panel.set_preferred_size Dimension.new width, height
28
31
  @panel.set_layout nil
32
+ @container.set_cursor nil
29
33
  @panel.add @canvas
30
34
 
31
35
  @container.pack
@@ -35,6 +39,7 @@ module ScorchedEarth
35
39
  @canvas.set_bounds 0, 0, width, height
36
40
 
37
41
  @canvas.add_mouse_listener self
42
+ @canvas.add_mouse_motion_listener self
38
43
 
39
44
  @canvas.set_ignore_repaint true
40
45
  @canvas.create_buffer_strategy 2
@@ -1,3 +1,7 @@
1
+ include Java
2
+
3
+ import java.awt.BasicStroke
4
+
1
5
  require 'scorched_earth/helpers'
2
6
  require 'scorched_earth/events/mouse_pressed'
3
7
  require 'scorched_earth/events/mouse_released'
@@ -63,7 +67,8 @@ module ScorchedEarth
63
67
  x2 = current_player.x
64
68
  y2 = height - terrain[current_player.x]
65
69
 
66
- graphics.set_color player.color
70
+ graphics.set_color current_player.color
71
+ graphics.setStroke BasicStroke.new 3
67
72
  graphics.draw_line x1, y1, x2, y2
68
73
  end
69
74
  end
@@ -1,3 +1,3 @@
1
1
  module ScorchedEarth
2
- VERSION = '5.0.2.pre'.freeze
2
+ VERSION = '5.0.3.pre'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorched_earth
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2.pre
4
+ version: 5.0.3.pre
5
5
  platform: java
6
6
  authors:
7
7
  - James Moriarty
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry