baku 0.3.0 → 0.3.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/baku.gemspec +4 -4
- data/lib/baku/entity_manager.rb +6 -6
- data/lib/baku/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f95ddbe20ed9e1c88da6a47399d9a6f4ebf0cb5e0ad591b8cceae36a2091c103
|
4
|
+
data.tar.gz: add1c691aa86d0b462c39353aa52ac6bd009b833f3314b4a5bb5f05148641a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59fd7f1018890d362342dfe25fdb5776301a1e6a6439eeac35a5136556fe95bdaac48e24a940a3c23a0505cf79a056c6be5c5031bc5cd4df7c104e55b4cd0fe5
|
7
|
+
data.tar.gz: ebcd87f863c3ab2b092c8a01b965134cd5676714b4f1a4238c9a1d44520a31b86b4d1751db8c0e268e3f51a3c31a4fa71bcbf090636a13cce6c5718f7c80b64f
|
data/CHANGELOG.md
CHANGED
data/baku.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
end
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
23
|
-
spec.add_development_dependency 'rake', '~>
|
24
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
25
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.
|
22
|
+
spec.add_development_dependency 'bundler', '~> 2.1.4'
|
23
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
25
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.9.0'
|
26
26
|
|
27
27
|
spec.add_dependency 'miru', '~> 0.1.0'
|
28
28
|
end
|
data/lib/baku/entity_manager.rb
CHANGED
@@ -15,12 +15,12 @@ module Baku
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def register_component_mask(component_mask)
|
18
|
-
@entities_by_component_mask[component_mask]
|
18
|
+
@entities_by_component_mask[component_mask] ||= []
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_entity(entity)
|
22
22
|
add_entity_to_matching_component_lists(entity)
|
23
|
-
|
23
|
+
|
24
24
|
entity.add_event_listener(
|
25
25
|
:component_added,
|
26
26
|
method(:on_entity_component_added)
|
@@ -40,7 +40,7 @@ module Baku
|
|
40
40
|
entity.tags.each do |tag|
|
41
41
|
@entities_by_tag[tag].delete(entity)
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
entity.remove_event_listener(
|
45
45
|
:component_added,
|
46
46
|
method(:on_entity_component_added)
|
@@ -64,7 +64,7 @@ module Baku
|
|
64
64
|
def get_entities_by_tag(tag)
|
65
65
|
@entities_by_tag[tag] || []
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
private
|
69
69
|
|
70
70
|
def add_entity_to_matching_component_lists(entity)
|
@@ -88,11 +88,11 @@ module Baku
|
|
88
88
|
@entities_by_component_mask.each do |component_mask, entities|
|
89
89
|
old_match = component_mask.matches?(old_mask)
|
90
90
|
new_match = component_mask.matches?(new_mask)
|
91
|
-
|
91
|
+
|
92
92
|
if old_match && !new_match
|
93
93
|
entities.delete(entity)
|
94
94
|
end
|
95
|
-
end
|
95
|
+
end
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
data/lib/baku/version.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.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Tuttle
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry-byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.
|
61
|
+
version: 3.9.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.
|
68
|
+
version: 3.9.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: miru
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,7 +112,7 @@ homepage: https://github.com/jtuttle/baku
|
|
112
112
|
licenses:
|
113
113
|
- MIT
|
114
114
|
metadata: {}
|
115
|
-
post_install_message:
|
115
|
+
post_install_message:
|
116
116
|
rdoc_options: []
|
117
117
|
require_paths:
|
118
118
|
- lib
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubygems_version: 3.0.6
|
131
|
-
signing_key:
|
131
|
+
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: An Entity Component System framework for Ruby
|
134
134
|
test_files: []
|