예제 #1
0
 void Start()
 {
     // Just to show we are "alive" and running
     QuickLabel.Create(gameObject,
                       "Time: ", () =>
     {
         return(Time.time.ToString("0.0"));
     });
 }
예제 #2
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
    }
예제 #3
0
    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);
    }