示例#1
0
    public void ThemeIn()
    {
        GetComponent <Animator>().Play("ThemeIn");

        if (infos.GetComponentInChildren <ScrollRect>() != null)
        {
            infos.GetComponent <Animator>().Play("ThemeOut");
        }
    }
示例#2
0
    void Start()
    {
        infoPopUp.GetComponent <Canvas>().worldCamera = Camera.main;
        infoPopUp.SetFadeDuration(0.5f);

        quiz.GetComponent <Canvas>().worldCamera = Camera.main;

        background.SetActive(false);
    }
示例#3
0
    public void CreatePopup(string Text, Color Color, Vector3 Position)
    {
        InfoPopup NewPopoup = GameObject.Instantiate <InfoPopup>(PopupPrototype, transform);

        NewPopoup.transform.parent = transform;
        NewPopoup.SetText(Text, Color);
        RectTransform RTransf = NewPopoup.GetComponent <RectTransform>();

        print(MainCamera.WorldToScreenPoint(Position));
        RTransf.position = MainCamera.WorldToScreenPoint(Position);
    }