Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public static class Deboogie {
- public static void Log(string s) {
- Debug.Log(BoogieString(s));
- }
- public static void Log(string s, Object context) {
- Debug.Log(BoogieString(s), context);
- }
- public static void LogError(string s) {
- Debug.LogError("<b><i>" + BoogieString(s) + "</i></b>");
- }
- public static void LogError(string s, Object context) {
- Debug.Log("<b><i>" + BoogieString(s) + "</i></b>", context);
- }
- private static string BoogieString(string s) {
- string returnString = "";
- Color randCol = Color.white;
- for (int i=0; i<s.Length; i++) {
- randCol = Random.ColorHSV(0f, 1f, 1f, 1f, 0.2f, 0.6f);
- returnString += "<color=\"#" + ColorUtility.ToHtmlStringRGB(randCol) + "\">" + s.Substring(i, 1) + "</color>";
- }
- return returnString;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement