예제 #1
0
        private void PreloadSplashes(StoneSkipAnim anim)
        {
            ClearSplashes(ref anim.splashes);

            for (int i = 0; i < anim.numSkips; i++)
            {
                Transform splash;
                splashPool.Spawn(out splash);
                anim.splashes[i] = splash.GetComponent <SkippingSplash>();

                // TODO: Make clamping customizable?
                float scale = 1f - Mathf.Clamp(GetSkipPosAtIndex(i), 0f, 0.9f);

                GO.Modify(splash)
                .SetScale(new Vector3(scale, scale, 0f))
                .SetPosition(transform.position + anim.skipCoords[i]);
            }
        }