using UnityEngine;
using System.Collections;
public class playerGun : MonoBehaviour {
public GameObject Ammo; // theShot
GameObject FiredSHot; //shot in air
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Mouse0)){
FiredShot = (GameObject)Instantiate(Ammo, transform.position, Quaternion.identity) ;
}
if( FiredShot != null ){
firedShot.transform.position += Transform.forward * 15 * Time.deltaTime;
}
}
}