Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class shoot : MonoBehaviour {
- public GameObject projectile, projectileParent;
- private void Fire () {
- GameObject newProjectile = Instantiate (projectile) as GameObject;
- newProjectile.transform.parent = projectileParent.transform;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement