- Home /
Reload Mobile
Hey guys im making an Android game, a fps game, and after 30 bullets, i want the gun to reload when i press a gui texure, or when they reload when the want. Any ideas?
//Simple prefab shooting script (written by Alec Markarian ) #pragma strict var theBullet : Rigidbody; var Speed = 20;
function Update () { if (Input.GetMouseButtonDown(0)) { var clone = Instantiate(theBullet, transform.position, transform.rotation); clone.velocity = transform.TransformDirection(Vector3(0, 0, Speed));
Destroy (clone.gameObject, 3);
}
}
Comment
Your answer
Follow this Question
Related Questions
Switch Weapon Script Not taking effect HELP!! 2 Answers
How do I make an object move? 3 Answers
Reload help 1 Answer