Beispiel #1
0
    IEnumerator TeleportPlayer(Teleport tele)
    {
        switch (tele.roof)
        {
        case Teleport.RoofStates.INDOOR:
            gameObject.layer = LayerMask.NameToLayer("PlayerIndoors");
            break;

        case Teleport.RoofStates.OUTDOOR:

            gameObject.layer = LayerMask.NameToLayer("Player");
            break;
        }

        transform.position = tele.GetDestination();
        transform.position = controller.pixCam.RoundToPixel(transform.position);

        yield return(null);
    }
Beispiel #2
0
 public void TeleportAI(Teleport tele)
 {
     transform.position = tele.GetDestination();
 }