Beispiel #1
0
 public override void WriteDependencies(IDependencyLinker linker, IServicesInjector gamePlayServices)
 {
     _camera = GetComponent <Camera>();
     linker
     .LinkInterface <ICameraBinder>()
     .WithGivenInstance(this);
 }
 private void LoadDependencies(IDependencyLinker linker)
 {
     linker
     .LinkInterface <IGameManager>()
     .WithGivenInstance(this);
     linker
     .LinkInterface <IGameSession>()
     .WithGivenInstance(_session);
     linker
     .LinkInterface <ICharacterFactory>()
     .WithGivenInstance(_factory);
 }
Beispiel #3
0
 public override void WriteDependencies(IDependencyLinker linker, IServicesInjector services)
 {
     _linker = linker;
     LoadGameSession(services);
     CurrentCharacter.WriteDependencies(_linker, services);
 }
Beispiel #4
0
 public override void WriteDependencies(IDependencyLinker linker, IServicesInjector externalDependencies)
 {
     linker.LinkInterface <IPlayerBinder>().WithGivenInstance(this);
 }
Beispiel #5
0
 public virtual void WriteLocalDependencies(IDependencyLinker linker)
 {
 }
Beispiel #6
0
 protected TorqueGamesInjector()
 {
     UniqueInstanceServices   = new Dictionary <Type, IGameService>();
     MultipleInstanceServices = new Dictionary <Type, Getter <IGameService> >();
     Linker = new DependencyLinker(UniqueInstanceServices, MultipleInstanceServices);
 }
Beispiel #7
0
 public CharacterFactory(IServicesInjector gameInjector, IDependencyLinker gamePlayLinker)
 {
     _gameInjector   = gameInjector;
     _gamePlayLinker = gamePlayLinker;
 }
Beispiel #8
0
 public virtual void WriteDependencies(IDependencyLinker linker, IServicesInjector externalDependencies)
 {
 }
Beispiel #9
0
 protected virtual void WriteCharacterLocalDependencies(IDependencyLinker linker)
 {
 }