Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Transform NewUnit(Transform prefab, Vector3 coord, int parTeam) {
- Transform prefabclone = (Transform)Instantiate(prefab, coord, transform.rotation);
- EntBase ent = prefabclone.GetComponent<EntBase>();
- ent.Init(this);
- ent.team = parTeam;
- ent.ID = idCount++;
- entities.Add(ent);
- teams[parTeam].entities.Add(ent);
- return prefabclone;
- //prefabclone.gameObject.rigidbody.velocity += new Vector3 (0, 150, 0);
- //prefabclone.gameObject.rigidbody.position += new Vector3 (0, 0, 150);
- //prefabclone.gameObject.transform.localScale += new Vector3 (2, 2, 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement