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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1653036472420b349cb3e013e0d55a589ebe29cb
4
- data.tar.gz: 4ce15a89513b81e4803b800a3083b7e5d51ce45a
3
+ metadata.gz: ef2e30c0edfd4e7d4a9c462415f0bd8f67c5d92b
4
+ data.tar.gz: ba0f22754231f5a9b4000db4e57b81a77021fc4e
5
5
  SHA512:
6
- metadata.gz: cc818103da055af5358e1dfeab535945c31be1b847f931b54febebbe407e6ab3a3427660de8abeb5063d24ed2bf01ad958ce32af3b89bed1338061dd71ef6b35
7
- data.tar.gz: 497c1f10325f892d97dbe9a48ef30052b4d03edc26e6cf20453e9ca52b32f7cee10d3a7bf7c5215fb85f4f74f1f4d2cf86eafda98b346bd926801dcb1445b487
6
+ metadata.gz: f33c07b0b01ef3e566a4b6f5ccbb6fbc747c11664e58b0706931b7a03e9c28e58caaaffc91683bee98a1a0d5c682433e2b66b7bb1a9d3a27ba33d0c94988e20b
7
+ data.tar.gz: 6dd881ee7ff3349a911993e2c3a4b0bd460993c86ed3f14a3e2b21c5e5e8fe93493b124df5634530abd99ddd22db7fcf1b0a82e989c2021c50c9b5cc22577727
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.1
2
+
3
+ * Restore system access to world delta_ms.
4
+
1
5
  # 0.2.0
2
6
 
3
7
  * Add ability to remove components from an entity.
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 :entity_manager
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 @entity_manager.nil?
13
- raise StandardError.new("Must set :entity_manager property of System.")
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
@@ -1,3 +1,3 @@
1
1
  module Baku
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/baku/world.rb CHANGED
@@ -29,7 +29,7 @@ module Baku
29
29
 
30
30
  @entity_manager.register_component_mask(system.component_mask)
31
31
 
32
- system.entity_manager = @entity_manager
32
+ system.world = self
33
33
  end
34
34
 
35
35
  def create_entity(tags = [])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Tuttle