完成大地图主要界面
This commit is contained in:
1 parent
5156473bb2
commit
d22eecd133
78 files changed
+8684
-6941
No files matched your search
@@ -91,5 +91,19 @@ namespace Assets.Scripts
|
||||
byte b = byte.Parse(hex.Substring(4, 2), NumberStyles.HexNumber);
|
||||
return new Color32(r, g, b, byte.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate random digit code
|
||||
/// </summary>
|
||||
/// <param name="length">Length</param>
|
||||
/// <returns>Result string</returns>
|
||||
public static string GenerateRandomDigitCode(int length)
|
||||
{
|
||||
var random = new System.Random();
|
||||
string str = string.Empty;
|
||||
for (int i = 0; i < length; i++)
|
||||
str = String.Concat(str, random.Next(10).ToString());
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user