Tag Info

Hot answers tagged

2

There's no general way to do this, especially not cross-platform. Do you really have to pack your ressources into the executable file? I'd consider deploying a small setup program instead, which would unpack the ressources next to the executable file, which is essentially what you have when running from your IDE/when debugging. Just because you've added ...


2

I think you are looking in what's called the "Strategy pattern" in OOP. Your skill has something like the following signature(in pseudocode) interface TargetBehaviour{ list<targets> getTargets(); } class TargetAOA implements TargetBehaviour{ list<targets> getTargets(){...{ } class TargetSingle implements TargetBehaviour{ ...


1

One way you could achieve what you need is to add a "priority" attribute to your GameObjectComponent; then add a mComponentsInOrder vector to your GameOjbect and keep ordered references in order, and sort it when you add new components. class GameObjectComponent { public: virtual ~GameObjectComponent(); virtual void Update(GameObject* obj, const ...


1

OOP is your friend here! Many skills will have similar traits and you can categorize them so you don't have to recode every aspect of every skill. For example, skills will all be attachable to a character. An abstract class can be used for this. This class can also include several features that all skills have, like a call to simulate the skill or the tier ...



Only top voted, non community-wiki answers of a minimum length are eligible