// Use this for initialization void Start() { values = GameObject.Find("Action Hub").GetComponent <WorkAreaController>(); avatarButton = GetComponent <Button>(); bubble = avatarButton.transform.Find("Canvas").gameObject.GetComponent <Canvas>(); bubbleText = avatarButton.transform.Find("Canvas").transform.Find("Text").GetComponent <Text>(); avatarButton.transform.Find("Canvas").transform.position = new Vector3(avatarButton.transform.position.x - 100, avatarButton.transform.position.y - 30, 0); avatarButton.onClick.AddListener(OnClick); bell = avatarButton.transform.Find("Bell").GetComponent <Image>(); Sprite[] sprites; sprites = Resources.LoadAll <Sprite>("RedBell"); redBell = sprites[0]; Sprite[] sprites2; sprites2 = Resources.LoadAll <Sprite>("Glyphicons"); bell.sprite = sprites2[0]; bubble.enabled = false; expanded = false; GameObject responseOneButton = bubble.transform.Find("AgreeButton").gameObject; responseOneButton.SetActive(false); GameObject responseTwoButton = bubble.transform.Find("DisagreeButton").gameObject; responseTwoButton.SetActive(false); }
void Start() { endSlate.enabled = false; startTime = Time.time; int top = 0; int right = 0; int interval = -135; this.newAvatar(new Vector3(right, top + interval, 0), "Cliff Pittman"); this.newAvatar(new Vector3(right, top + interval * 2, 0), "Diana Brown"); this.newAvatar(new Vector3(right, top + interval * 3, 0), "Benton Solomon (CEO/Thought Leader)"); this.newAvatar(new Vector3(right, top + interval * 4, 0), "Parker Livingston"); this.newAvatar(new Vector3(right, top + interval * 5, 0), "Ariana Cole"); this.newAvatar(new Vector3(right, top + interval * 6, 0), "Sage Williams (HR)"); this.newAvatar(new Vector3(right, top + interval * 7, 0), "News"); values = workController.GetComponent <WorkAreaController>(); foreach (Transform child in transform) { scripts.Add(child.GetComponent <Avatar>()); } }