WIP multi-weapon behaviours

This commit is contained in:
2016-02-25 16:24:38 +01:00
parent 0c60b637c3
commit bb76c9d248
36 changed files with 1251 additions and 613 deletions
+4
View File
@@ -30,10 +30,13 @@ struct EntityWrapper
EntityWrapper FirstChildByName(const std::string& name);
EntityWrapper FirstParentWithComponent(const std::string& componentType);
EntityWrapper Clone(EntityWrapper parent = EntityWrapper::Invalid);
std::vector<EntityWrapper> ChildrenWithComponent(const std::string& componentType);
void DeleteChildren();
bool IsChildOf(EntityWrapper potentialParent);
bool Valid() const;
ComponentWrapper operator[](const char* componentName);
ComponentWrapper operator[](const std::string& componentName);
bool operator==(const EntityWrapper& e) const;
bool operator!=(const EntityWrapper& e) const;
explicit operator EntityID() const;
@@ -41,6 +44,7 @@ struct EntityWrapper
private:
EntityWrapper firstChildByNameRecursive(const std::string& name, EntityID parent);
EntityWrapper cloneRecursive(EntityWrapper entity, EntityWrapper parent);
void childrenWithComponentRecursive(const std::string& componentType, EntityWrapper& entity, std::vector<EntityWrapper>& childrenWithComponent);
};
namespace std
+1 -1
View File
@@ -68,7 +68,7 @@ protected:
const std::string m_ComponentType;
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cPlayer, double dt) = 0;
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) = 0;
};
class ImpureSystem : public virtual System