public void ChooseTeddy() { // set UI elements on/off Char1.gameObject.SetActive(true); Char2.gameObject.SetActive(true); Char3.gameObject.SetActive(true); CharCreation.gameObject.SetActive(false); StartGame.gameObject.SetActive(true); BackStory.gameObject.SetActive(true); CharImage.gameObject.SetActive(true); // insert Teddy's back story and picture (sprite) to corresponding elements backStory = teddy.GetBackStory(); Text text = BackStory.GetComponentInChildren <Text>(); text.text = backStory; playerSprite = teddy.GetPlayerSprite(); Image playerImage = CharImage.GetComponentInChildren <Image> (); playerImage.sprite = playerSprite; dataSaver.character = "Teddy"; }
/// <summary> /// 启动动画 /// </summary> /// <param name="x">当前的X位置</param> private void BeginReturnStoryboard(double x) { StartX.Value = x; BackStory.Begin(); }