Ejemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (!other.CompareTag("Player"))
        {
            return;
        }

        GameObject            player         = other.gameObject;
        RoomPlayerInformation roomPlayerInfo = player.transform.parent.GetComponent <RoomPlayerInformation>();
        CameraController      camController  = player.transform.parent.transform.Find("Camera").GetComponent <CameraController>();

        player.GetComponent <Transform>().position = _teleportArrival.GetComponent <Transform>().position;
        roomPlayerInfo.PlayerRoomLimits            = _nextRoomInformation.getRoomLimits();
        camController.updateMinMaxLimits();
    }
Ejemplo n.º 2
0
 private void UpdatePlayerRoomLimits(RoomPlayerInformation roomPlayerInfo)
 {
     roomPlayerInfo.PlayerRoomLimits = _nextRoomInformation.getRoomLimits();
 }