Simon added Copy method to ComponentWrapper. Its being used in PlayerDeathSystem to copy model,animation,transform. TODO: 3rd person camera, cleanup, tests

This commit is contained in:
verysecrethero
2016-01-27 18:00:31 +01:00
parent 5cdf6db340
commit 7497ff39d2
4 changed files with 77 additions and 4 deletions
+5
View File
@@ -43,6 +43,11 @@ struct ComponentWrapper
// Specialization for string literals
template <std::size_t N>
void SetField(std::string name, const char(&value)[N]) { Field<std::string>(name) = std::string(value); }
void Copy(ComponentWrapper& destination)
{
memcpy(destination.Data, this->Data, Info.Stride);
}
struct SubscriptProxy
{