using UnityEngine;
using System.Collections;
public class PlayerShoot : Photon.MonoBehaviour {
public GameObject bulletPrefab;
public Transform muzzle;
// Use this for initialization
void Start ()
{
muzzle = transform.Find("ShootSpot");
}
// Update is called once per frame
void Update ()
{
if (Input.GetButtonDown("Fire1"))
{
SpawnMyMissle();
}
}
void SpawnMyMissle()
{
PhotonNetwork.Instantiate("MissleLaserMech", muzzle.position, muzzle.rotation, 0, null);
//gameObject("MissleLaserMech").rigidbody.AddForce(-transform.forward * 10000);
//The last argument is an optional group number, feel free to ignore it for now.
}
}