I read that, in an ECS, the components an entity has basically define what that entity does and is capable of doing through data. But I'm unsure as to one detail in the implementation. Say, for example, that an entity, in this case, a character like a monster or the player, can float if it has the Floating component. Should I give entities this Floating component only if they ought to float, and remove it when they shouldn't float, ie. when a buff is applied that grants the 'Floating' status effect, the component is added to the entity, and then when the buff runs out, the component is removed? Or should I give all entities that could possibly float (in this case, all the entities that represent characters) the Floating component, and use a bool inside the component to determine whether that character should actually have the floating effect applied to it or not? It seems like both could work. But which one would be more appropriate?
warissonMember Since 05 May 2013
Offline Last Active Aug 22 2014 11:37 AM