Ejemplo n.º 1
0
 /// <summary>Ends the introducable</summary>
 public void End()
 {
     if (introducableObject != null)
     {
         introducableObject.EndIntroduction();
         introducableObject = null;
     }
 }
Ejemplo n.º 2
0
 /// <summary>Updates the introducable by either starting or ending the it based on given index</summary>
 public void Update(int indexAt)
 {
     if (indexAt == fromIndex)
     {
         introducableObject = GetIntroducable();
         introducableObject.StartIntroduction();
     }
     else if (indexAt == ToIndex)
     {
         End();
     }
 }
Ejemplo n.º 3
0
            /// <summary>Returns the introducable object behaviour in the scene based on stored tagname</summary>
            private IntroducableObject GetIntroducable()
            {
                foreach (GameObject gameObject in GameObject.FindGameObjectsWithTag(IntroducableObject.COMPONENT_TAG_NAME))
                {
                    IntroducableObject introducable = gameObject.GetComponent <IntroducableObject>();
                    if (introducable.IntroTagName == tagName)
                    {
                        return(introducable);
                    }
                }

                return(null);
            }