Ejemplo n.º 1
0
    void MoveToLocation(string newLoc)
    {
        ScreenInteractor newLocation = null;

        int newLocIndex = int.Parse(newLoc);         //letterlijk het getal dat op de map staat

        if (newLocIndex <= allLocations.Length)
        {
            newLocIndex--;            //maak er een echt index getal van
            if (allLocations [newLocIndex].CanEnter())
            {
                newLocation = allLocations [newLocIndex];
            }
            else
            {
                ResponseManager.instance.ActivateDialog(lockedDoorDialog);
                return;
            }
        }

        if (onNavigateToNewLoc != null)
        {
            onNavigateToNewLoc();             //used for smooth transition
        }
        newLocation.NavigateToMe();
    }
 void OnEnable()
 {
     script       = (ScreenInteractor)target;
     editors      = new Dictionary <InteractionButton, Editor> (4);
     script.myCVG = script.GetComponent <CanvasGroup> ();
     if (!Application.isPlaying)
     {
         script.myCVG.alpha        = 1f;
         script.myCVG.interactable = true;
     }
 }
Ejemplo n.º 3
0
    //onDisable on ScreenInteractor.cs
    public static void TryChangingBackground(ScreenInteractor bg)
    {
        background = null;

        if (Selection.activeTransform != null && Selection.activeTransform.parent == bg.transform)
        {
            background = bg;
        }
        else
        {
            bg.DeactivateSelf();
        }
    }