sottolio 0.1.3 → 0.1.4

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: 2b0a7bf516f5dc3a9080c8e9782d5f7280de0327
4
- data.tar.gz: 838755440b44c47f732e20b05863743ae2fd2d78
3
+ metadata.gz: 0a2bbfd7861b599ec96ba13cec50a24646223d20
4
+ data.tar.gz: 03f6041c3a0b834e26be3f4da961a00857026479
5
5
  SHA512:
6
- metadata.gz: ea2765fb00721d179dfd2c273d758a69cd748c9f2bcf9c1d6b5e4b9ac8fc3e24166efe207c8e7a412e5b9dc7a10fd35692d11083737561aaa61b17215c7658e0
7
- data.tar.gz: 531177786817a21ff57ee0a17be3e19d27d9e02ef277f4d330604ca086c49e8557e7a1d1447add328e092f4f157802e4efca41a3be76bb32814debb685bd243d
6
+ metadata.gz: 02573a9fbb94f4a0bf0206e1c5c492522ec93249388e50f694047437e6fd38082b785a418844e0fe4bc166d4607185715d7a643cace1f848e464ff5b45f5736b
7
+ data.tar.gz: a8eb6f6aa726802af102c4775fbdeeff13d9e96d14e3d3efd6fde4de2aaaeac8d302915ebf480a12ba39fd01c5f164fce1159269048c5a46bba2828eab599203
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sottolio (0.1.3)
4
+ sottolio (0.1.4)
5
5
  opal (~> 0.8)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -24,8 +24,3 @@ sottolio will generate `example/game/sottolio.js` and `example/game/sottolio.min
24
24
  You're now ready to open `example/game/index.html` in your browser!
25
25
 
26
26
  The [demo](http://www.giovannicapuano.net/sottolio/) is also available in the web, as well the [video gameplay](http://www.youtube.com/watch?v=djV_Z5OeBmg&feature=youtu.be) (it's a bit old tho).
27
-
28
- FAQ
29
- ===
30
- **Q**: I can't see one or more assets (girls, images, sounds or whatever) on Chrome
31
- *R*: This is a well known bug. Please refresh the page thrice.
@@ -17,5 +17,5 @@
17
17
  # along with sottolio. If not, see <http://www.gnu.org/licenses/>.
18
18
  #++
19
19
  module Sottolio
20
- VERSION = '0.1.3'
20
+ VERSION = '0.1.4'
21
21
  end
@@ -18,26 +18,26 @@
18
18
  #++
19
19
  module Sottolio
20
20
  class Image < Canvas
21
- attr_accessor :image, :id, :x, :y, :width, :height
21
+ attr_accessor :id
22
22
 
23
23
  def initialize(element, image, id, x = 0, y = 0)
24
24
  super element
25
25
 
26
- @image = `new Image()`
27
- `#@image.src = image`
26
+ @image = `new Image()`
27
+ @image_src = image
28
28
 
29
- @id = id
30
- @x = x
31
- @y = y
29
+ @id = id
30
+ @x = x
31
+ @y = y
32
32
  end
33
33
 
34
34
  def on_load(callback)
35
- `#@image.onload = callback`
35
+ `#@image.onload = callback;`
36
+ `#@image.src = #@image_src;`
36
37
  end
37
38
 
38
39
  def draw_image(*args)
39
- image = args.shift
40
- x, y, width, height = args
40
+ image, x, y = args
41
41
  `#@canvas.drawImage(image, x, y)`
42
42
  end
43
43
 
@@ -51,7 +51,8 @@ module Sottolio
51
51
  end
52
52
 
53
53
  def out?
54
- (@width + @x) < 0 || (@x + width) > 1276
54
+ position = @width + @x
55
+ position < 0 || position > 1276
55
56
  end
56
57
 
57
58
  def slide(pre_callback = nil, callback = nil, to = :right, speed = 1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sottolio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  version_requirements: !ruby/object:Gem::Requirement