Commit 7d2249aa by Tim Reiter

fixed turret button bug (turret was not activating sometimes)

parent ae42e08e
......@@ -9,7 +9,7 @@ public class TurretButton : MonoBehaviour
void OnCollisionEnter2D(Collision2D coll)
{
//soll nur von oben ausloesen:
if (coll.gameObject.tag == "Player" && coll.relativeVelocity.x < 0.001f && coll.relativeVelocity.y > 0.2f)
if (coll.gameObject.tag == "Player")
{
cannon.setTarget(coll.gameObject.transform);
cannon.shoot();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment