Ejemplo n.º 1
0
    public static void MovePlayerToBeacon(Beacon beacon)
    {
        BeaconWrapper b = Object.FindObjectsOfType <BeaconWrapper>().Where(
            x => x.beacon == beacon
            ).First();

        MovePlayerTo(b.transform.position);
    }
Ejemplo n.º 2
0
    public static void MovePlayerToBeacon(Beacon beacon)
    {
        BeaconWrapper b = Object.FindObjectsOfType <BeaconWrapper>().Where(
            x => x.beacon == beacon
            ).First();

        if (b != null)
        {
            MovePlayerTo(b.transform.position);
            if (b.activateOnLoad != null)
            {
                b.activateOnLoad.Activate();
            }
        }
        else
        {
            // if no beacon wrapper, there should at least be a corresponding door
            // with that beacon
            Door d = Object.FindObjectsOfType <Door>().Where(
                x => x.beacon == beacon
                ).First();
        }
    }