Exemple #1
0
    public static Coroutine Shake(float amplitude, float duration, bool ignoreTimeScale = true)
    {
        GameObject    routineRunner = new GameObject("TEMP_RoutineRunner");
        RoutineRunner behaviour     = routineRunner.AddComponent <RoutineRunner>();

        return(behaviour.StartCoroutine(ShakeRoutine(amplitude, duration, ignoreTimeScale, routineRunner)));
    }
        public void Connect()
        {
            EchoSocket.ConnectAsync();

            if (!IsRunning)
            {
                IsRunning = true;
                RoutineRunner.StartCoroutine(LogRoutine());
            }
        }
Exemple #3
0
    private void SpawnBall(float delay = 0.0f)
    {
        if (delay == 0.0f)
        {
            var ball = ballPool.Spawn();
            ball.transform.position = Vector3.up;

            spawnedBalls.Add(ball);
        }
        else
        {
            runner.StartCoroutine(DelayedSpawn(delay));
        }
    }