baku 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/baku/system.rb +4 -4
- data/lib/baku/version.rb +1 -1
- data/lib/baku/world.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef2e30c0edfd4e7d4a9c462415f0bd8f67c5d92b
|
4
|
+
data.tar.gz: ba0f22754231f5a9b4000db4e57b81a77021fc4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f33c07b0b01ef3e566a4b6f5ccbb6fbc747c11664e58b0706931b7a03e9c28e58caaaffc91683bee98a1a0d5c682433e2b66b7bb1a9d3a27ba33d0c94988e20b
|
7
|
+
data.tar.gz: 6dd881ee7ff3349a911993e2c3a4b0bd460993c86ed3f14a3e2b21c5e5e8fe93493b124df5634530abd99ddd22db7fcf1b0a82e989c2021c50c9b5cc22577727
|
data/CHANGELOG.md
CHANGED
data/lib/baku/system.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Baku
|
2
2
|
class System
|
3
3
|
attr_reader :components, :game_loop_step
|
4
|
-
attr_writer :
|
4
|
+
attr_writer :world
|
5
5
|
|
6
6
|
def initialize(components, game_loop_step)
|
7
7
|
@components = components
|
@@ -9,11 +9,11 @@ module Baku
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def process_entities
|
12
|
-
if @
|
13
|
-
raise StandardError.new("Must set :
|
12
|
+
if @world.nil?
|
13
|
+
raise StandardError.new("Must set :world property of System.")
|
14
14
|
end
|
15
15
|
|
16
|
-
@entity_manager.get_entities(component_mask).each do |entity|
|
16
|
+
@world.entity_manager.get_entities(component_mask).each do |entity|
|
17
17
|
entity_components = @components.map { |c| entity.get_component(c) }
|
18
18
|
process_entity(entity, *entity_components)
|
19
19
|
end
|
data/lib/baku/version.rb
CHANGED
data/lib/baku/world.rb
CHANGED