public class spawnbomb : MonoBehaviour {
public GameObject bomb;
public GameObject player;
public int bomb_nr = 3;
void Update()
{
if (Input.GetKeyDown (KeyCode.X) && bomb_nr >= 2) {
Instantiate (bomb, player.transform.position + new Vector3 (1, 1, 1), Quaternion.identity);
}
}