void AddCat(Globals.RANK rank) // add a cat to scene { GameObject temp; AI_Control AI; temp = Instantiate(catPrefab); AI = temp.GetComponent <AI_Control>(); AI.rank = rank; AI.catName = utils.RandName(rank); }
// Use this for initialization void Start() { managerObject = GameObject.FindGameObjectWithTag("Manager"); manager = managerObject.GetComponent <Manager_Script>(); catControl = GetComponent <Cat_Control>(); utils = managerObject.GetComponent <Cat_Utilites>(); string newName; rank = catControl.rank; newName = utils.RandName(rank); catControl.catName = newName; utils.usedNames.Add(newName); stepper = Random.Range(0, STEP_LIMIT); }