예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     camScript = Camera.main.GetComponent <RaymarchCam>();
     colRadius = GetComponent <SphereCollider>().radius;
     Df        = GetComponent <DistanceFunctions>();
     playCon   = GetComponent <PlayerController>();
     colliders = PointsOnSphere(nrPoints, colRadius * colliderOffset);
     //lines = new GameObject[nrPoints];
     //AddLines();
 }
예제 #2
0
    //private Animation anim;


    // Start is called before the first frame update
    void Start()
    {
        camScript = GetComponent <RaymarchCam>();
        playerCam.SetActive(false);


        SetRandColor();

        /*
         *  // plays specific animation of that level
         *  anim = GetComponent<Animation>();
         *  anim.Play("Level"+SceneManager.GetActiveScene().buildIndex.ToString());
         */

        Invoke("ActivatePlay", 1 / AnimSpeed);
    }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        camScript = GetComponent <RaymarchCam>();
        playerCam.SetActive(false);

        SetFractal();

        SetRandColor();

        posRand         = new Vector3(Random.Range(-positionRandom, positionRandom), Random.Range(-positionRandom, positionRandom), Random.Range(-positionRandom, positionRandom));
        rotRand         = new Vector3(Random.Range(-rotationRandom, rotationRandom), Random.Range(-rotationRandom, rotationRandom), Random.Range(-rotationRandom, rotationRandom));
        globRotRand     = new Vector3(Random.Range(-globalRotationRandom, globalRotationRandom), Random.Range(-globalRotationRandom, globalRotationRandom), Random.Range(-globalRotationRandom, globalRotationRandom));
        scaleRand       = 1f + Random.Range(-scaleRandom, scaleRandom);
        sphereScaleRand = 1f - Random.Range(0, scaleRandom);
        sphereRand      = Random.Range(1.0f, 3.0f);
        globScaleRand   = Random.Range(15.0f, 500.0f);

        if (globScaleRand > 400)
        {
            camScript._iterations = 5;
        }
        else if (globScaleRand > 200)
        {
            camScript._iterations = 4;
        }
        else if (globScaleRand > 50)
        {
            camScript._iterations = 3;
        }
        else
        {
            camScript._iterations = 2;
        }

        fractalCam.transform.position = new Vector3(-globScaleRand * 4, globScaleRand * 4, -globScaleRand * 4);
        player.position = new Vector3(0, 0, -globScaleRand * 1.5f);
    }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     camScript = GetComponent <RaymarchCam>();
     player    = GameObject.FindGameObjectWithTag("Player");
     col       = player.GetComponent <PlayerRayMarchCollider>();
 }
예제 #5
0
 // Start is called before the first frame update
 void Start()
 {
     cam = GetComponent <RaymarchCam>();
 }
 // Start is called before the first frame update
 void Start()
 {
     camScript = Camera.main.GetComponent <RaymarchCam>();
     Df        = GetComponent <DistanceFunctions>();
 }