Circular-Studios/Dash — pull request #191 by ColdenCullen (2014-05-13 21:33:25+00:00)
Title: Feature: Component Rewrite

This pull adds better definitions for how YAML is handled.

* Anything defined in YAML not on an object (Prefabs, Materials, etc.) have a `createFromYaml` static function, or similarly named, and a `refresh( Node node )` function. All building is done manually by the class. Auto generation of these may come in the future.
* Anything that can be added to a `GameObject` as a component must subclass `YamlComponent`, and have a `@yamlEntry()` attribute on it. If it is to be loaded, and not created when added to an object, it should specify a loader as a template parameter like this: `@yamlEntry!(q{name => Assets.get!Mesh( name )})()`. If no loader is specified, then the object is to be created, and each Yaml-able field should have an `@field` attribute on it. Loaders can also be specified on fields as well using the same syntax. The YAML tag can be overridden on either using a non-template function parameter (ex: `@field( "Field" )` ). For an example of yaml type with a getter, see [Mesh](https://github.com/Circular-Studios/Dash/blob/feature/ObjectRefresh/source/components/mesh.d#L60-L61), and for one that is created, see [RotateThing in Sample-Game](https://github.com/Circular-Studios/Sample-Dash-Game/blob/feature/ObjectRefresh/Scripts/testobject.d#L39-L40).
* Behaviors are no more. Scripts should now override `Component` and `YamlComponent`.

Requires #186.