Ejemplo n.º 1
0
    void OnTriggerEnter(Collider collider)
    {
        // allowed target enters the trigger
        if (collider.tag.Equals("Mario"))
        {
            // get the target and its ITeleportable script
            target       = collider.transform;
            teleportable = (ITeleportable)target.GetComponent(typeof(ITeleportable));

            // checks if teleportable isn't valid
            if (teleportable == null)
            {
                target = null;
                return;
            }

            // set intial status
            teleportable.setOnTeleportPlace(true);
            teleportable.setDirEntrance(getDirEntrance());

            // if the player was teleporting then start the fade out transition
            if (teleportable.isTeleporting())
            {
                fader.startFading(EnumFadeDirection.FADE_OUT);
            }
        }
    }
Ejemplo n.º 2
0
    private void optionSelected()
    {
        if (showOptions)
        {
            return;
        }

        PauseGameManager.Instance.pause();
        fader.startFading(EnumFadeDirection.FADE_IN);
        showOptions = true;
    }
Ejemplo n.º 3
0
    private void reloadLevel()
    {
        // reset and re spawn every actor status
        ReloadableManager.Instance.reloadActors();

        // setup the scene components for the current scene
        setupSceneActors();

        // start camera fade out
        IFadeable fader = Camera.main.GetComponent <CameraFadeable>().getFader();

        fader.startFading(EnumFadeDirection.FADE_OUT);
    }