예제 #1
0
    private IEnumerator Run()
    {
        yield return(WaitForEndOfJob(new RandomizeJob(maxSize, positions)));

        EntityRenderer r = GetComponent <EntityRenderer>();

        for (;;)
        {
            if (Input.GetMouseButton(1))
            {
                yield return(WaitForEndOfJob(new SphereJob(maxSize, 0.01f, positions)));
            }
            else
            {
                yield return(null);
            }
            if (Input.GetMouseButton(0))
            {
                r.SetBuffer(this);
            }
        }
    }