1
Graphics / Re: How to go about creating a bullet class in SFML 2.0
« on: May 28, 2013, 09:40:25 am »
I think your method is wrong to begin with.. rather then checking if your just facing the enemy you should actually fire a bullet entity instead. what I mean is set up a bullet manager class so when you press SPACE it activates a bullet and every frame update its position with the direction vector its traveling multiplied by the speed you want it to travel, and then also test if its colliding with anything. If it is colliding with something, reduce its health by whatever you want.
I would provide you with an example but I am at work at the moment, I will edit this post when I am at home.
I would provide you with an example but I am at work at the moment, I will edit this post when I am at home.