Ejemplo n.º 1
0
  public void show(BannerButton bannerButton, GameOverBanner another = null) {
    overlay = transform.Find("Overlay");
    contents = transform.Find("Contents").gameObject;
    positionX = contents.GetComponent<RectTransform>().anchoredPosition.x;
    distance = Mathf.Abs(positionX - positionXEnd);

    if (another == null) {
      status++;
      isLast = false;
    } else {
      waiting = true;
      waitingTarget = another;
      contents.GetComponent<Text>().text = bannerButton.getDescription();
    }

    bannerButton.transform.SetParent(contents.transform, false);
  }