示例#1
0
    private static string GenerateWorldName(float seed)
    {
        string name         = "";
        int    namelength   = Mathf.FloorToInt(3f + Mathf.Pow(Gen.Val(seed), 5f) * 5f);
        bool   lastWasVowel = Gen.Bool(seed, 0.3f);

        for (int i = 0; i < namelength; i++)
        {
            if (lastWasVowel == true)
            {
                lastWasVowel = false;
                name        += Names.RandomConsonant((float)(seed * i + seed));
            }
            else
            {
                lastWasVowel = true;
                name        += Names.RandomVowel((float)(seed * i + seed));
            }
        }
        name = Names.Capitalize(name);

        return(name);
    }