public GirlController(GirlHub hub) { _hub = hub; _source = _hub.GetComponent <AudioSource> (); Transform ct = Camera.main.transform; Transform gt = _hub.transform; ct.transform.parent.position = _hub.transform.position; ct.transform.position = gt.position + _camOffset; // _initialZoom = (gt.position - ct.transform.position).magnitude; ct.transform.LookAt(gt); }
public void OnInit(TileHub host) { // _host = host; _editRenderer.enabled = false; if (host.State.m_girlController != null) { Debug.LogError("2 GIRLS???? FREAK OUT!"); } else { GirlHub gh = GameObject.Instantiate(host.Prog.GetGeneralConfig().m_girlPrefab, transform) as GirlHub; host.State.m_girlController = new GirlController(gh); } }