コード例 #1
0
    IEnumerator SpawnDebuff()
    {
        yield return(new WaitForSeconds(6f));

        while (true)
        {
            float xPos = GenerateRandom.genRandom(-2.5, 2.5);
            Instantiate(TargetDebuff, new Vector2(xPos, 5.5f), Quaternion.identity);
            yield return(new WaitForSeconds(GenerateRandom.genRandom(Random.Range(lowEdgeDeb, highEdgeDeb), Random.Range(lowEdgeDeb, highEdgeDeb))));
        }
    }
コード例 #2
0
    IEnumerator SpawnInstantLose()
    {
        yield return(new WaitForSeconds(Random.Range(6f, 18f)));

        while (true)
        {
            float xPos = GenerateRandom.genRandom(-2.5, 2.5);
            Instantiate(InstantLose, new Vector2(xPos, 5.5f), Quaternion.identity);
            yield return(new WaitForSeconds(Random.Range(2f, 24f)));
        }
    }
コード例 #3
0
    IEnumerator SpawnNegative()
    {
        yield return(new WaitForSeconds(5f));

        while (true)
        {
            float xPos = GenerateRandom.genRandom(-2.5, 2.5);
            Instantiate(TargetNegative, new Vector2(xPos, 5.5f), Quaternion.identity);
            yield return(new WaitForSeconds(Random.Range(lowEdgeNeg, highEdgeNeg)));
        }
    }