Пример #1
0
 private void Start()
 {
     portalManager = GetComponentInParent <PortalRoom>();
     thisPortal    = GetComponentInChildren <TeleportTo>();
     WhatPortalIsThis();                                                                                      // defino em qual portal estou
     portalManager.DisplayGainedAccessMessage(portalName, thisPortal.placesToTeleport, accessGrantedMessage); // mostro a mensagem de acesso concedido SE necessário
 }
Пример #2
0
    public static bool TryCreatePortalRoom(Object[] roomObjects, out GameRoom room)
    {
        if (roomObjects == null || roomObjects.Length == 0 || PortalRoomType() == null)
        {
            room = null;
            return(false);
        }

        room = new PortalRoom((MonoBehaviour)roomObjects[0]);
        return(true);
    }