felecs 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mdown +42 -32
- data/Gemfile.lock +1 -1
- data/README.mdown +27 -0
- data/docs/FelECS/ComponentManager.html +1 -1
- data/docs/FelECS/Components.html +1 -1
- data/docs/FelECS/Entities.html +144 -1
- data/docs/FelECS/Order.html +1 -1
- data/docs/FelECS/Scenes.html +1 -1
- data/docs/FelECS/Stage.html +1 -1
- data/docs/FelECS/Systems.html +1 -1
- data/docs/FelECS.html +1 -1
- data/docs/_index.html +1 -1
- data/docs/file.README.html +1 -1
- data/docs/index.html +1 -1
- data/docs/method_list.html +30 -22
- data/docs/top-level-namespace.html +1 -1
- data/lib/felecs/entity_manager.rb +33 -0
- data/lib/felecs/version.rb +1 -1
- data/mrbgem/mrblib/felecs.rb +34 -1
- metadata +2 -15
- data/docs/CNAME +0 -1
- data/docs/FelFlame/ComponentManager.html +0 -1239
- data/docs/FelFlame/Components.html +0 -333
- data/docs/FelFlame/Entities.html +0 -792
- data/docs/FelFlame/Helper/ComponentManager.html +0 -1627
- data/docs/FelFlame/Helper.html +0 -142
- data/docs/FelFlame/Order.html +0 -251
- data/docs/FelFlame/Scenes.html +0 -765
- data/docs/FelFlame/Stage.html +0 -572
- data/docs/FelFlame/Systems.html +0 -1505
- data/docs/FelFlame.html +0 -319
- data/docs/Felflame_.html +0 -143
- data/docs/file.version.html +0 -74
@@ -127,7 +127,7 @@
|
|
127
127
|
</div>
|
128
128
|
|
129
129
|
<div id="footer">
|
130
|
-
Generated on
|
130
|
+
Generated on Thu Feb 3 03:45:34 2022 by
|
131
131
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
132
132
|
0.9.26 (ruby-2.7.3).
|
133
133
|
</div>
|
@@ -100,6 +100,39 @@ module FelECS
|
|
100
100
|
# def to_json() end
|
101
101
|
|
102
102
|
class << self
|
103
|
+
# Selects every entity that has components of they type passed into
|
104
|
+
# this function and then executes the code block for those components
|
105
|
+
# and entities.
|
106
|
+
# @return [Nil]
|
107
|
+
def group(*component_managers, &block)
|
108
|
+
return nil if component_managers.empty?
|
109
|
+
if component_managers.length == 1
|
110
|
+
component_managers.first.each do |cmp|
|
111
|
+
block.call(cmp, cmp.entity)
|
112
|
+
end
|
113
|
+
else
|
114
|
+
arry = component_managers.first.select do |cmp|
|
115
|
+
ent = cmp.entity
|
116
|
+
keep = true
|
117
|
+
component_managers.drop(1).each do |mgr|
|
118
|
+
next unless ent.components[mgr].nil?
|
119
|
+
keep = false
|
120
|
+
break
|
121
|
+
end
|
122
|
+
keep
|
123
|
+
end
|
124
|
+
arry.each do |cmp|
|
125
|
+
ent = cmp.entity
|
126
|
+
cmp_arry = [cmp]
|
127
|
+
component_managers.drop(1).each do |cmp_mgr|
|
128
|
+
cmp_arry.push ent.component[cmp_mgr]
|
129
|
+
end
|
130
|
+
block.call(*cmp_arry, ent)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
nil
|
134
|
+
end
|
135
|
+
|
103
136
|
# Makes component managers behave like arrays with additional
|
104
137
|
# methods for managing the array
|
105
138
|
# @!visibility private
|
data/lib/felecs/version.rb
CHANGED
data/mrbgem/mrblib/felecs.rb
CHANGED
@@ -100,6 +100,39 @@ module FelECS
|
|
100
100
|
# def to_json() end
|
101
101
|
|
102
102
|
class << self
|
103
|
+
# Selects every entity that has components of they type passed into
|
104
|
+
# this function and then executes the code block for those components
|
105
|
+
# and entities.
|
106
|
+
# @return [Nil]
|
107
|
+
def group(*component_managers, &block)
|
108
|
+
return nil if component_managers.empty?
|
109
|
+
if component_managers.length == 1
|
110
|
+
component_managers.first.each do |cmp|
|
111
|
+
block.call(cmp, cmp.entity)
|
112
|
+
end
|
113
|
+
else
|
114
|
+
arry = component_managers.first.select do |cmp|
|
115
|
+
ent = cmp.entity
|
116
|
+
keep = true
|
117
|
+
component_managers.drop(1).each do |mgr|
|
118
|
+
next unless ent.components[mgr].nil?
|
119
|
+
keep = false
|
120
|
+
break
|
121
|
+
end
|
122
|
+
keep
|
123
|
+
end
|
124
|
+
arry.each do |cmp|
|
125
|
+
ent = cmp.entity
|
126
|
+
cmp_arry = [cmp]
|
127
|
+
component_managers.drop(1).each do |cmp_mgr|
|
128
|
+
cmp_arry.push ent.component[cmp_mgr]
|
129
|
+
end
|
130
|
+
block.call(*cmp_arry, ent)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
nil
|
134
|
+
end
|
135
|
+
|
103
136
|
# Makes component managers behave like arrays with additional
|
104
137
|
# methods for managing the array
|
105
138
|
# @!visibility private
|
@@ -847,7 +880,7 @@ end
|
|
847
880
|
# Keeps the version of the Gem
|
848
881
|
module FelECS
|
849
882
|
# The version of the Gem
|
850
|
-
VERSION = '5.0.
|
883
|
+
VERSION = '5.0.1'
|
851
884
|
end
|
852
885
|
# :nocov:
|
853
886
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: felecs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tradam
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest-reporters
|
@@ -155,7 +155,6 @@ files:
|
|
155
155
|
- Rakefile
|
156
156
|
- bin/console
|
157
157
|
- bin/setup
|
158
|
-
- docs/CNAME
|
159
158
|
- docs/FelECS.html
|
160
159
|
- docs/FelECS/ComponentManager.html
|
161
160
|
- docs/FelECS/Components.html
|
@@ -164,24 +163,12 @@ files:
|
|
164
163
|
- docs/FelECS/Scenes.html
|
165
164
|
- docs/FelECS/Stage.html
|
166
165
|
- docs/FelECS/Systems.html
|
167
|
-
- docs/FelFlame.html
|
168
|
-
- docs/FelFlame/ComponentManager.html
|
169
|
-
- docs/FelFlame/Components.html
|
170
|
-
- docs/FelFlame/Entities.html
|
171
|
-
- docs/FelFlame/Helper.html
|
172
|
-
- docs/FelFlame/Helper/ComponentManager.html
|
173
|
-
- docs/FelFlame/Order.html
|
174
|
-
- docs/FelFlame/Scenes.html
|
175
|
-
- docs/FelFlame/Stage.html
|
176
|
-
- docs/FelFlame/Systems.html
|
177
|
-
- docs/Felflame_.html
|
178
166
|
- docs/_index.html
|
179
167
|
- docs/class_list.html
|
180
168
|
- docs/css/common.css
|
181
169
|
- docs/css/full_list.css
|
182
170
|
- docs/css/style.css
|
183
171
|
- docs/file.README.html
|
184
|
-
- docs/file.version.html
|
185
172
|
- docs/file_list.html
|
186
173
|
- docs/frames.html
|
187
174
|
- docs/index.html
|
data/docs/CNAME
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
felflame.tradam.fyi
|