Esempio n. 1
0
    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";
    }
Esempio n. 2
0
 /// <summary>
 /// 启动动画
 /// </summary>
 /// <param name="x">当前的X位置</param>
 private void BeginReturnStoryboard(double x)
 {
     StartX.Value = x;
     BackStory.Begin();
 }