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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/baku/entity_manager.rb +8 -3
- data/lib/baku/version.rb +1 -1
- data/lib/baku/world.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0481123c5896253353a81bda009ad5f4b0d9b125'
|
4
|
+
data.tar.gz: 515ab80774af68e82f7f75f8583f58f298fd4fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d77c3a8e5d55d5ee37ff88e20154432feba06216e3b3812d4f40bd7b5f3f50f31d5e767fe709bc0f525fd42d2cec5677f61640a65032e3bc77f7d49b33f7dccf
|
7
|
+
data.tar.gz: 6e85d1e2c98aab332fce9a85a4a3908b395cbc8f6d92e17a8fa227c8d3304945b5fe7f1f94c06544c653b64ce848ee21878693ff8a6ccd21dcd7333c7ee1afb7
|
data/CHANGELOG.md
CHANGED
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:
|
data/lib/baku/entity_manager.rb
CHANGED
@@ -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
data/lib/baku/world.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|