예제 #1
0
    private IEnumerator SingleLaunch(LaunchableObject launchableObject, Vector3 force = default(Vector3))
    {
        yield return(new WaitForSeconds(_initialLaunchDelay));

        launchableObject.OnLaunch(force);

        yield return(new WaitForSeconds(_nextLaunchDelay));
    }
예제 #2
0
    private IEnumerator MultipleLaunch(LaunchableObject launchableObject, List <Vector3> forces = null)
    {
        yield return(new WaitForSeconds(_initialLaunchDelay));

        foreach (var force in forces)
        {
            if (force != default(Vector3))
            {
                launchableObject.OnLaunch(force);

                yield return(new WaitForSeconds(_nextLaunchDelay));
            }
        }
    }