void Start()
    {
        trans      = GetComponent <TransformSpherical>();
        nextAction = 0;
        solidType  = Solid.White;

        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;
    }
Esempio n. 2
0
    void OnPreRender()
    {
        TransformSpherical trans = GetComponent <TransformSpherical>();

        Shader.SetGlobalMatrix("_View", trans.worldToLocal.Matrix());

        Camera cam = Camera.main;

        // Note that z_far is negative!
        Shader.SetGlobalMatrix("_Projection", GL.GetGPUProjectionMatrix(Matrix4x4.Perspective(cam.fieldOfView, cam.aspect, 0.01f, -0.01f), false));
    }
Esempio n. 3
0
 void Start()
 {
     colls = new List <BallColliderSpherical>(GetComponents <BallColliderSpherical>());
     trans = GetComponent <TransformSpherical>();
 }