Ejemplo n.º 1
0
    void Start()
    {
        cam_A          = GameObject.Find("CameraLerp").GetComponent <CameraManager> ();
        level_A        = GameObject.Find("LevelController").GetComponent <LevelControllerScript> ();
        storedPosition = Vector3.zero;

        // check reentry
        float x, y, z;

        x = level_A.retrieveFloatValue(reentryVariable + "_X");
        y = level_A.retrieveFloatValue(reentryVariable + "_Y");
        z = level_A.retrieveFloatValue(reentryVariable + "_Z");

        if ((x != 0.0f) || (y != 0.0f) || (z != 0.0f))
        {
            storedPosition = new Vector3(x, y, z);
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     if (level_N == null)
     {
         level_N = GameObject.Find("LevelController").GetComponent <LevelControllerScript> ();
     }
     angle = new SoftFloat();
     angle.setSpeed(3.0f);
     angle.setTransformation(TweenTransforms.tanh);
     currentAngle = level_N.retrieveFloatValue(StorageVariable);
     angle.setValueImmediate(openAngle - currentAngle);
     this.transform.rotation = Quaternion.Euler(-angle.getValue(), 0, 0);
 }