Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        notif       = this.transform.Find("Notif").gameObject;
        originalPos = notif.GetComponent <RectTransform>().anchoredPosition;
        //Debug.Log(notif + ""+notif.GetComponent<RectTransform>().anchoredPosition);

        finalPos = new Vector3(-originalPos.x, originalPos.y);

        notifName      = this.transform.Find("Notif").Find("Content").Find("Name").GetComponent <TextApparition>();
        notifDesc      = this.transform.Find("Notif").Find("Content").Find("ScrollArea").Find("DescContainer").Find("Desc").GetComponent <TextApparition>();
        notifScrollbar = this.transform.Find("Notif").Find("Content").Find("ScrollArea").Find("DescContainer").Find("Scrollbar").GetComponent <Scrollbar>();

        playerInteractions = GameObject.FindObjectOfType <Interactions>();
        //playerEventsCheck = playerInteractions.GetComponent<EventsCheck>();
        //playerMemory = playerInteractions.GetComponent<PlayerMemory>();
        //stickerDisplay = CanvasManager.CManager.GetCanvas("Dialogue").transform.Find("Nouvelle Etiquette").GetComponent<NewStickerDisplay>();
        //playerRigidBody = playerInteractions.GetComponent<Rigidbody2D>();
        gameCam   = GameObject.FindObjectOfType <CameraFollow>();
        CM        = CanvasManager.CManager;
        PauseMenu = CM.GetCanvas("Pause").gameObject;

        MoveIndicator = this.transform.Find("MoveIndic").gameObject;
        if (GameSaveSystem.gameToLoad)
        {
            Destroy(this);
        }
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        notif       = this.transform.Find("Notif").gameObject;
        originalPos = notif.GetComponent <RectTransform>().anchoredPosition;

        finalPos = new Vector3(-originalPos.x, originalPos.y);

        notifName      = this.transform.Find("Notif").Find("Content").Find("Name").GetComponent <TextApparition>();
        notifDesc      = this.transform.Find("Notif").Find("Content").Find("ScrollArea").Find("DescContainer").Find("Desc").GetComponent <TextApparition>();
        notifScrollbar = this.transform.Find("Notif").Find("Content").Find("ScrollArea").Find("DescContainer").Find("Scrollbar").GetComponent <Scrollbar>();

        playerInteractions = GameObject.FindObjectOfType <Interactions>();

        MoveIndicator = this.transform.Find("MoveIndic").gameObject;
    }