Beispiel #1
0
    IEnumerator LocalGoalSpawning()
    {
        for (; ;)
        {
            yield return(new WaitForSeconds(RandomLib.RandFloatRange(spawnTime, spawnTimeVariance)));

            spawnSuperGoals(Random.Range(0, spawnPositions.Length));
        }
    }
Beispiel #2
0
    IEnumerator ServerGoalSpawning()
    {
        for (; ;)
        {
            yield return(new WaitForSeconds(RandomLib.RandFloatRange(spawnTime, spawnTimeVariance)));

            node.BinaryWriter.Write(PacketType.SUPERGOALSPAWNING);
            byte spawnPointIndex = (byte)Random.Range(0, spawnPositions.Length);
            node.BinaryWriter.Write(spawnPointIndex);
            node.Send(node.AllCostChannel);
            spawnSuperGoals(spawnPointIndex);
        }
    }