baku 0.2.3 → 0.2.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: e4e011013e5257d5b0af62562561e971cf0e449b
4
- data.tar.gz: 31931a5ea325fa8c8cb9e661e339935b83ac14fa
3
+ metadata.gz: '0481123c5896253353a81bda009ad5f4b0d9b125'
4
+ data.tar.gz: 515ab80774af68e82f7f75f8583f58f298fd4fa3
5
5
  SHA512:
6
- metadata.gz: b875ecf5c85daf770f8c91387848a93776aac8c5037112c9c9f5cd0832cb9948ebf7bfc321c035e4ce70848738d7622cecdc4607588ea3f45a92795c72f50f5f
7
- data.tar.gz: 9bf020e852d6e1929541f7ccc7650360cea9d833e0bac78711ed33b196f84edf2a97b588beb98418bce1d94ba0cd4debc531fe6f6623a624114c3c2a3bf0c804
6
+ metadata.gz: d77c3a8e5d55d5ee37ff88e20154432feba06216e3b3812d4f40bd7b5f3f50f31d5e767fe709bc0f525fd42d2cec5677f61640a65032e3bc77f7d49b33f7dccf
7
+ data.tar.gz: 6e85d1e2c98aab332fce9a85a4a3908b395cbc8f6d92e17a8fa227c8d3304945b5fe7f1f94c06544c653b64ce848ee21878693ff8a6ccd21dcd7333c7ee1afb7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.4
2
+
3
+ * Add world disposal.
4
+
1
5
  # 0.2.3
2
6
 
3
7
  * Separate entity retrieval and processing logic in system to allow pre and post-processing.
data/README.md CHANGED
@@ -8,6 +8,10 @@ Baku is still very much a work in progress. There are undoubtedly bugs. I will
8
8
  be continually iterating and improving on it as I use it for my personal game
9
9
  development projects. Enjoy!
10
10
 
11
+ ## Quick Start
12
+
13
+ The [Quick Start Guide](https://github.com/jtuttle/baku/wiki/Quick-Start-Guide) will walk you through setting up a basic project with Gosu and Baku.
14
+
11
15
  ## Installation
12
16
 
13
17
  Add this line to your application's Gemfile:
@@ -9,6 +9,11 @@ module Baku
9
9
  @entities_by_tag = {}
10
10
  end
11
11
 
12
+ def dispose
13
+ @entities_by_component_mask.clear
14
+ @entities_by_tag.clear
15
+ end
16
+
12
17
  def register_component_mask(component_mask)
13
18
  @entities_by_component_mask[component_mask] = []
14
19
  end
@@ -45,13 +50,13 @@ module Baku
45
50
  end
46
51
 
47
52
  def get_entities(component_mask)
48
- @entities_by_component_mask[component_mask]
53
+ @entities_by_component_mask[component_mask] || []
49
54
  end
50
55
 
51
56
  def get_entities_by_tag(tag)
52
- @entities_by_tag[tag]
57
+ @entities_by_tag[tag] || []
53
58
  end
54
-
59
+
55
60
  private
56
61
 
57
62
  def add_entity_to_matching_component_lists(entity)
data/lib/baku/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Baku
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/baku/world.rb CHANGED
@@ -13,6 +13,13 @@ module Baku
13
13
  @blackboard = {}
14
14
  end
15
15
 
16
+ def dispose
17
+ @update_systems.clear
18
+ @draw_systems.clear
19
+ @entity_manager.dispose
20
+ @blackboard.clear
21
+ end
22
+
16
23
  def add_system(system)
17
24
  system_list =
18
25
  if system.game_loop_step == :update
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Tuttle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-21 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler