Advertisement
Corosus

Untitled

Jun 30th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. public Transform NewUnit(Transform prefab, Vector3 coord, int parTeam) {
  2.         Transform prefabclone = (Transform)Instantiate(prefab, coord, transform.rotation);
  3.         EntBase ent = prefabclone.GetComponent<EntBase>();
  4.         ent.Init(this);
  5.         ent.team = parTeam;
  6.         ent.ID = idCount++;
  7.         entities.Add(ent);
  8.         teams[parTeam].entities.Add(ent);
  9.         return prefabclone;
  10.         //prefabclone.gameObject.rigidbody.velocity += new Vector3 (0, 150, 0);
  11.         //prefabclone.gameObject.rigidbody.position += new Vector3 (0, 0, 150);
  12.         //prefabclone.gameObject.transform.localScale += new Vector3 (2, 2, 2);
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement