void Start()
    {
        cooldown = Time.time;

        exitScript = exit.GetComponent <obj_teleport>();

        destination = exit.transform.position + exit.transform.forward * -10;
    }
Example #2
0
    void Start()
    {
        closeSound = transform.FindChild("portalshared").FindChild("closeSound").gameObject;

        portalshared = transform.FindChild("portalshared").FindChild("shared").gameObject;

        objLocked = transform.FindChild("lockedportal").FindChild("locked").gameObject;

        crystal = transform.FindChild("portalshared").FindChild("portalcrystal").gameObject;

        teleport = transform.GetComponentInChildren <obj_teleport>();
    }