Exemple #1
0
        protected void TransitionInternal()
        {
            var transitionPoint = new TransitionPoint();

            transitionPoint.newSceneName = nomeDaCena;
            transitionPoint.resetInputValuesOnTransition = resetInputValuesOnTransition;
            transitionPoint.transitionDestinationTag     = GetDestinationTag(letraDaTag);
            transitionPoint.transitionType = TransitionPoint.TransitionType.DifferentZone;
            SceneController.TransitionToScene(transitionPoint);
        }
Exemple #2
0
        public void TransitionToSceneCustom(string sceneName)
        {
            TransitionPoint trans = new TransitionPoint();

            trans.newSceneName                 = sceneName;
            trans.requiresInventoryCheck       = false;
            trans.resetInputValuesOnTransition = false;
            trans.transitionType               = TransitionPoint.TransitionType.DifferentZone;
            trans.transitionWhen               = TransitionPoint.TransitionWhen.ExternalCall;

            SceneController.TransitionToScene(trans);
        }
        protected void TransitionInternal()
        {
            //if (requiresInventoryCheck)
            //{
            //    if(!inventoryCheck.CheckInventory (inventoryController))
            //        return;
            //}

            if (transitionType == TransitionType.SameScene)
            {
                GameObjectTeleporter.Teleport(transitioningGameObject, destinationTransform.transform);
            }
            else
            {
                SceneController.TransitionToScene(this);
            }
        }
Exemple #4
0
 //es llamado por el ontrigger u interact pressed
 protected void TransitionInternal()
 {     // requiere llave? si no ejecute las dos opciones abajo (mismo lugar o nueva escena)
     if (requiresInventoryCheck)
     { //Lista de chequeo?
         if (!inventoryCheck.CheckInventory(inventoryController))
         {
             return;
         }
     }
     //Si escogi en la misma escena hagame un teleporter
     if (transitionType == TransitionType.SameScene)                                             // misma escena
     {
         GameObjectTeleporter.Teleport(transitioningGameObject, destinationTransform.transform); //metodo estatico, creo me lleva a un T2 en GameObjectTeleporter...
     }
     else //si voy a otra escena llevele esta mismo script escena
     {
         SceneController.TransitionToScene(this); //metodo estatico de SceneController para cambiar de escena, llevele este script
     }
 }
Exemple #5
0
 public void TransitionToScene(SceneTransitionStart transitionPoint)
 {
     SceneController.TransitionToScene(transitionPoint);
 }
        //public enum TransitionType
        //{
        //    DifferentScene, SameScene
        //}


        //public enum TransitionWhen
        //{
        //    ExternalCall, OnTriggerEnter
        //}

        //[Tooltip("This is the gameobject that will transition if the transitionwhen is set to OnTriggerEnter. For example, the player.")]
        //public GameObject transitioningGameObject;

        //[Tooltip("Whether the transition will be within this scene, to a different zone or a non-gameplay scene.")]
        //public TransitionType transitionType;

        //[Tooltip("What should trigger the transition to start.")]
        //public TransitionWhen transitionWhen;


        //bool m_TransitioningGameObjectPresent;

        //void Start()
        //{
        //if (transitionWhen == TransitionWhen.ExternalCall)
        //    m_TransitioningGameObjectPresent = true;
        //}

        //void OnTriggerEnter2D(Collider2D other)
        //{
        //    if (other.gameObject == transitioningGameObject)
        //    {
        //        m_TransitioningGameObjectPresent = true;

        //        if (SceneFader.IsFading || SceneController.Transitioning)
        //            return;

        //        if (transitionWhen == TransitionWhen.OnTriggerEnter)
        //            TransitionInternal();
        //    }
        //}

        //void OnTriggerExit2D(Collider2D other)
        //{
        //    if (other.gameObject == transitioningGameObject)
        //    {
        //        m_TransitioningGameObjectPresent = false;
        //    }
        //}
        #endregion

        protected void TransitionInternal()
        {
            SceneController.TransitionToScene(this);
        }