Ejemplo n.º 1
0
    void OnEnable()
    {
        pool = GetComponentInParent <ObjectPooler>();
        rb   = gameObject.GetComponent <Rigidbody>();
        ++spawnCount;
        // Debug.Log(" LOG: " + spawnCount + " level shit: " + LevelGenerator.ballsToUse);
        gameUI.UpdateBallLeftText();

        //if (angle < 360.0f)
        //    angle += 45.0f;
        // else
        //     angle = 0.0f;
        //rb.AddForce(new Vector3(1, 0, 0), ForceMode.Impulse);
        // rb.velocity = Quaternion.AngleAxis(angle, Vector3.right) * new Vector3(1, -1, 0);
        //rb.velocity = Vector3.zero;
        // Debug.Log("PrintOnEnable: script was enabled");
    }