8000 GitHub - soqb/bevy_attr: Automatic management of highly modular values in bevy with minimal overhead
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ bevy_attr Public

Automatic management of highly modular values in bevy with minimal overhead

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

soqb/bevy_attr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_attr

Crates.io MIT/Apache 2.0 Docs.rs GitHub

Automatic management of highly modular, highly parallel values in Bevy with minimal overhead.

bevy version crate version
0.9.0 0.1.0

This crate consists of attributes which are components that contain simple values and modifiers (also components) which automatically edit the values of attributes.

The relationship between the Attribute and Modifier traits can be thought of as similar to that between Bevy's GlobalTransform and Transform components. Once per frame, any changed, added, or removed modifiers will force a refresh on the attribute in the same entity. All of the modifiers on the entity will be collected and sorted and sequentially re-applied to the default value of the attribute. Although impractical, Transform could be implemented as a modifier on a GlobalTransform which copies the data in the Transform into the GlobalTransform, but this crate works best with many concurrent modifiers.

In a Bevy app, example uses of attributes could be stat systems where Strength and Endurance both implement the Attribute trait and whose modifiers are updated infrequently, or more dynamic systems where Health and MaxHealth implement it. Since both attributes and modifiers are just components, in that example, it may be a good idea to have MaxHealth be a modifier for Health.

View the examples here

About

Automatic management of highly modular values in bevy with minimal overhead

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0