- Home /
Shooting when cklicking on UI.
In my android top down shooter game player shoots on click.
if (Input.GetButtonDown("Fire1"))
{
if (weaponType == "bullet" && bulletLauncher != null && energy > 1)
{
Energy--;
bulletLauncher.Launch(Camera.main.ScreenToWorldPoint(Input.mousePosition));
}
}
Besides it shoots when clicking on UI (I'm using cnControls Joystick). How to disable it?
Comment
Your answer
Follow this Question
Related Questions
Display Ammo Count Above Player 1 Answer
Top down 2d shooting - XZ rotation 0 Answers
Top Down 2D movement issue 1 Answer
How to shoot Top Down Plane 2D? 1 Answer
Making an object rotate towards touch 3 Answers