Ejemplo n.º 1
0
        private void OnDestroy()
        {
            Interactible I = GetComponent <Interactible>();

            if (I != null)
            {
                I.OnInteract -= I_OnInteract;
            }
        }
Ejemplo n.º 2
0
        private void Start()
        {
            RB = GetComponent <Rigidbody2D>();
            Interactible I = GetComponent <Interactible>();

            if (I != null)
            {
                I.OnInteract += I_OnInteract;
            }
        }
Ejemplo n.º 3
0
        private void Start()
        {
            Interactible I = GetComponent <Interactible>();

            if (I == null)
            {
                Debug.Log("Nothing to interact with! Can be ignored");
            }
            else
            {
                I.OnInteract += I_OnInteract;
            }
        }
Ejemplo n.º 4
0
        private void Start()
        {
            Interactible I = GetComponent <Interactible>();

            if (I == null)
            {
                Debug.Log("Nothing to interact with! Can be ignored");
            }
            else
            {
                I.OnInteract += I_OnInteract;
            }
            SM = MM.GetComponentInChildren <Menu.StoryModeUI>(true); //Cannot find it if its in DONOTDESTROY?
            if (SM == null)
            {
                Debug.Log("No story mode window found :(");
            }                                                               //Best to find it in static class, having an actual global time manager would be best.
        }
Ejemplo n.º 5
0
        private void Start()
        {
            Interactible I = GetComponent <Interactible>();

            if (I != null)
            {
                I.OnInteract += I_OnInteract;
            }
            else
            {
                Debug.Log("Cant find Interactible!");
            }
            LS = GetComponent <General.ListAnimation>();
            if (LS == null)
            {
                Debug.Log("Dont forget ListAnimation"); Destroy(this);
            }
        }