Example #1
0
 private void beginShoot()
 {
     Destroy(Instance);
     Instance    = Instantiate(LaserPrefabs, transform.position, transform.rotation);
     LaserScript = Instance.GetComponent <EGA_Laser>();
     LaserScript.ShootLaser();
 }
Example #2
0
 private void beginShoot(Vector3 hitPos)
 {
     Destroy(Instance);
     Instance    = Instantiate(LaserPrefabs, hitPos, Quaternion.identity);
     LaserScript = Instance.GetComponent <EGA_Laser>();
     LaserScript.ShootLaser(hitPos);
 }
 private void beginShoot()
 {
     Destroy(Instance);
     //ps.SetActive(true);
     Instance = Instantiate(Prefabs[Prefab], FirePoint.transform.position, FirePoint.transform.rotation);
     //ps.transform.position = FirePoint.transform.position;
     //ps.transform.rotation = FirePoint.transform.rotation;
     //ps.transform.parent = transform;
     //Instance.transform.parent = transform;
     LaserScript = Instance.GetComponent <EGA_Laser>();
     //LaserScript.UpdateSaver = true;
     LaserScript.ShootLaser(new Vector3(0, 4, 8));
 }