示例#1
0
 void ApplyToEveryInstance(OnEachTimeFunction f)
 {
     foreach (TimeInteractable ti in TimeInteractable.AllInstances)
     {
         f(ti);
     }
 }
示例#2
0
 void TraverseAndApplyToTimeHierarchy(Transform hierarchy, OnEachTimeFunction f)
 {
     TraverseAndApplyToHierarchy(hierarchy, (transform) => {
         TimeInteractable timeInteractable = transform.GetComponent <TimeInteractable> ();
         if (timeInteractable != null)
         {
             f(timeInteractable);
         }
     });
 }