Beispiel #1
0
 public void Register(MonoBehaviour instance)
 {
     if (injector.RegisterIf(instance, typeof(InjectionSourceAttribute)))
     {
         sources.Add(instance);
     }
 }
Beispiel #2
0
 public void InitInjector(IEnumerable <MonoBehaviour> source)
 {
     injector = new DepInjector <MonoBehaviour>();
     // register source
     foreach (MonoBehaviour s in source)
     {
         injector.RegisterIf(s, typeof(InjectionSourceAttribute));
     }
     sources = injector.GetSources();
 }