예제 #1
0
 void CheckEvents()
 {
     if (!checkFinished)
     {
         if (!shortCut.activeSelf)
         {
             if (eventManager != null)
             {
                 if (eventManager.eventsList.Contains("OuvrirPorteKurt") && plInteracts.state == Interactions.State.Normal)
                 {
                     doorKurt.SetActive(false);
                     shortCut.SetActive(true);
                 }
             }
             else
             {
                 eventManager = GameObject.FindObjectOfType <EventsCheck>();
                 plInteracts  = eventManager.GetComponent <Interactions>();
             }
         }
         else
         {
             checkFinished = true;
         }
     }
 }
예제 #2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         if (playerEventsCheck == null)
         {
             playerEventsCheck = other.GetComponent <EventsCheck>();
         }
     }
 }
예제 #3
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>();

        MoveIndicator = this.transform.Find("MoveIndic").gameObject;
    }
예제 #4
0
 void CheckEvents()
 {
     if (!checkFinished)
     {
         if (eventManager != null)
         {
             if (eventManager.eventsList.Contains("TalkToKurt"))
             {
                 doorSalon.GetComponent <BoxCollider2D>().enabled = true;
                 firePlace.GetComponent <BoxCollider2D>().enabled = true;
                 sideDoorAnim.GetComponent <Animator>().enabled   = true;
                 SetActiveGO(sideDoorOutline, true);
                 checkFinished = true;
             }
         }
         else
         {
             eventManager = GameObject.FindObjectOfType <EventsCheck>();
         }
     }
 }