예제 #1
0
        public void FunctionOnCustomCameraControlTransformChanged(CustomCameraControl cam)
        {
            var camSizeHeight     = cam.OrthographicSize;
            var miniCamSizeHeight = minimapCam.orthographicSize;

            highlightArea.localScale    = Vector3.one * camSizeHeight / miniCamSizeHeight;
            highlightArea.localPosition = mainCam.transform.position / viewSize * minimapArea.rect.size;
        }
예제 #2
0
    void Start()
    {
        targetRotation = transform.rotation;
        if (GetComponent <Rigidbody>())
        {
            rBody = GetComponent <Rigidbody>();
        }
        else
        {
            Debug.LogError("The character needs a rigidbody.");
        }

        if (FindObjectOfType <CustomCameraControl>())
        {
            cameraControl = FindObjectOfType <CustomCameraControl>();
        }
        else
        {
            Debug.LogError("No camera found");
        }

        forwardInput = turnInput = jumpInput = 0;
    }