void Start() { // Just to show we are "alive" and running QuickLabel.Create(gameObject, "Time: ", () => { return(Time.time.ToString("0.0")); }); }
void Start() { // attach a QuickLabel telling how often we spawn #if false QuickLabel.Create(gameObject, "TimedSpawner:" + name + ":", () => { return(spawnYet.ToString("0.0") + "s"); }); #endif }
public static QuickLabel Create( GameObject go, string title, System.Func <string> GetData) { QuickLabel ql = go.AddComponent <QuickLabel> (); ql.title = title; ql.GetData = GetData; ql.index = MasterCounter; MasterCounter++; return(ql); }