using UnityEngine;
using System.Collections;
public class Shoter : MonoBehaviour {
GameObject bullet;
void Start () {
}
void Update () {
if (Input.GetButtonDown("Fier1"))
{
GameObject newBullet = Instante(bullet, Transform.position + (transform,forward*1), transform.rotation as GameObject);
newBullet.rigidbody.AddForce(Transform,forward * 10000);
}
}
}
↧