felflame 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.inch.yml +6 -6
- data/CHANGELOG.mdown +18 -0
- data/Gemfile.lock +1 -1
- data/README.mdown +6 -4
- data/lib/felflame/component_manager.rb +4 -0
- data/lib/felflame/version.rb +1 -1
- metadata +2 -3
- data/CHANGELOG.md +0 -5
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67065e6f7a9c39a9ddd5f6107238cc512550b6a50bf539cf1b47b74a9b8f8dff
|
4
|
+
data.tar.gz: be85db0cc163e8520dc76758d0c45d7d10714c68daf7dc8567be7e8176ee7312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eebd8f33f037f7c6e385ecdaceaa329741183655b3e32bb6d4f960601d2574495a66646f2886f2159b5f943c10e25b56c00feb151e174a4a2e7f5183e35b28f8
|
7
|
+
data.tar.gz: 62b9221f6ca0897386a7654dbeb9a8f8ec3af1d9ead40e0a5666a39a24725315e78a00ccc6488fa64a21d1b5ee8f3c0d241c832e376a29cd1439f85f8bb46007
|
data/.inch.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
files:
|
2
2
|
# define files included in the analysis (defaults to ["{app,lib}/**/*.rb"])
|
3
3
|
included:
|
4
|
-
- felflame.rb
|
5
|
-
- component_manager.rb
|
6
|
-
- entity_manager.rb
|
7
|
-
- system_manager.rb
|
8
|
-
- scene_manager.rb
|
9
|
-
- stage_manager.rb
|
4
|
+
- lib/felflame.rb
|
5
|
+
- lib/felflame/component_manager.rb
|
6
|
+
- lib/felflame/entity_manager.rb
|
7
|
+
- lib/felflame/system_manager.rb
|
8
|
+
- lib/felflame/scene_manager.rb
|
9
|
+
- lib/felflame/stage_manager.rb
|
10
10
|
# define files excluded from the analysis (defaults to [])
|
11
11
|
excluded:
|
data/CHANGELOG.mdown
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# ChangeLog
|
2
|
+
|
3
|
+
###### [major.minor.bugfix] - year-month-day
|
4
|
+
|
5
|
+

|
6
|
+

|
7
|
+

|
8
|
+

|
9
|
+

|
10
|
+
|
11
|
+
## [1.0.1](https://github.com/realtradam/FelFlame/releases/tag/1.0.1) - 2021-07-09
|
12
|
+

|
13
|
+
- Defining attributes in components are no longer allowed to overwrite methods
|
14
|
+
|
15
|
+
## [1.0.0](https://github.com/realtradam/FelFlame/releases/tag/1.0.0) - 2021-07-09
|
16
|
+
|
17
|
+

|
18
|
+
- Initial release
|
data/Gemfile.lock
CHANGED
data/README.mdown
CHANGED
@@ -99,7 +99,7 @@ If all of this sounds very confusing, don't worry. A video tutorial series is in
|
|
99
99
|
|
100
100
|
# Usage
|
101
101
|
|
102
|
-
To use FelFlame simply install the gem using `gem install felflame` or using bundler `bundle add felflame` and then require it in your project like so: `require 'felflame'`. Working outside of the gem for rendering engines that do not support the usage of gems is
|
102
|
+
To use FelFlame simply install the gem using `gem install felflame` or using bundler `bundle add felflame` and then require it in your project like so: `require 'felflame'`. Working outside of the gem for rendering engines that do not support the usage of gems is a planned feature in the works.
|
103
103
|
|
104
104
|
## Entities
|
105
105
|
|
@@ -112,9 +112,11 @@ Entities are essentially "objects" in the game world. To create a new Entity we
|
|
112
112
|
or if we want to add (any number of)components to it:
|
113
113
|
|
114
114
|
```ruby
|
115
|
-
@entity = FelFlame::Entites.new(
|
116
|
-
|
117
|
-
|
115
|
+
@entity = FelFlame::Entites.new(
|
116
|
+
FelFlame::Components::Health.new,
|
117
|
+
@component,
|
118
|
+
FelFlame::Components::Armour[7]
|
119
|
+
)
|
118
120
|
```
|
119
121
|
|
120
122
|
### Accessing
|
@@ -23,7 +23,11 @@ class FelFlame
|
|
23
23
|
|
24
24
|
|
25
25
|
const_set(component_name, Class.new(FelFlame::ComponentManager) {})
|
26
|
+
|
26
27
|
attrs.each do |attr|
|
28
|
+
if FelFlame::Components.const_get(component_name).method_defined?("#{attr}") || FelFlame::Components.const_get(component_name).method_defined?("#{attr}=")
|
29
|
+
raise NameError.new "The attribute name \"#{attr}\" is already a method"
|
30
|
+
end
|
27
31
|
FelFlame::Components.const_get(component_name).attr_accessor attr
|
28
32
|
end
|
29
33
|
attrs_with_defaults.each do |attr, _default|
|
data/lib/felflame/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: felflame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tradam
|
@@ -147,11 +147,10 @@ files:
|
|
147
147
|
- ".rspec"
|
148
148
|
- ".rubocop.yml"
|
149
149
|
- ".yardopts"
|
150
|
-
- CHANGELOG.
|
150
|
+
- CHANGELOG.mdown
|
151
151
|
- Gemfile
|
152
152
|
- Gemfile.lock
|
153
153
|
- LICENSE
|
154
|
-
- LICENSE.txt
|
155
154
|
- README.mdown
|
156
155
|
- Rakefile
|
157
156
|
- bin/console
|
data/CHANGELOG.md
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 realtradam
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|