- Home /
shooting in 2d problem
i want to shoot when i hold my mouse button but it wont happen here is my script (c#) and please bear with me im new to unity:
using UnityEngine; using System.Collections;
public class VariableScript : MonoBehaviour { public GameObject objBullet; public GameObject parBulletHit; public GameObject parAlienDeath; public GameObject parAlienHit; public GameObject parPlayerDeath; public GameObject parPlayerHit; }
That looks more like the bullet itself. Not the actual script that shoots :)
oops added the worng script, here it is:
using UnityEngine; using System.Collections;
public class VariableScript : $$anonymous$$onoBehaviour { public GameObject objBullet; public GameObject parBulletHit; public GameObject parAlienDeath; public GameObject parAlienHit; public GameObject parPlayerDeath; public GameObject parPlayerHit; }
edit your original post to include the correct code. it's a jumble in the comments.
ok i did sorry it came out like this i had it all nice but it came out like this
Your answer
Follow this Question
Related Questions
How to make Enemy shoot at Player Top Down 1 Answer
Top Down 2D movement issue 1 Answer
Instantiate after setting values? 0 Answers
Top down 2d shooting - XZ rotation 0 Answers