public void PrepareGame() { _appEventSystem.LevelReady += StartGame; gameEventSystem = new GameEventSystem(); SimpleDependencyInjection.getInstance().Bind <GameEventSystem>(gameEventSystem); gameEventSystem.OnReachedGoalArea += handleReachedGoal; gameEventSystem.OnDronesCoughtPlayer += handleDronesCaughtPlayer; }
private void Awake() { controller = GetComponent <CharacterController>(); animator = GetComponent <Animator>(); pausableAnimation = new PausableAnimation(animator); SimpleDependencyInjection.getInstance().Inject(this); gameEventSystem.OnGameStateChanged += GameStateChanged; }
void SetupServices() { SimpleDependencyInjection di = SimpleDependencyInjection.getInstance(); _appEventSystem = new ApplicationEventSystem(); _scheduler = GetComponent <Scheduler>(); di.Bind <GameConfiguration>(GameConfig); di.Bind <ApplicationEventSystem>(_appEventSystem); di.Bind <Scheduler>(_scheduler); Debug.Log("Bound all services."); }
public static IBusClient CreateClient(RawRabbitOptions options = null) { options = options ?? new RawRabbitOptions(); options.DependencyInjection = options.DependencyInjection ?? (register => { }); options.DependencyInjection += register => register.AddSingleton <IConfigurationEvaluator, ConfigurationEvaluator>(); options.ClientConfiguration = options?.ClientConfiguration ?? RawRabbitConfiguration.Local; options.Plugins = options.Plugins ?? (builder => { }); options.Plugins += builder => builder .UseMessageContext(context => new MessageContext { GlobalRequestId = Guid.NewGuid() }) .UseContextForwarding(); var simpleIoc = new SimpleDependencyInjection(); var client = Instantiation.RawRabbitFactory.CreateSingleton(options, simpleIoc, ioc => simpleIoc); return(new BusClient(client, simpleIoc.GetService <IConfigurationEvaluator>())); }
public void Init() { _di = new SimpleDependencyInjection(); _di.Register <IVehicleDAO, SampleVehicleDAO>(ObjectLifeTime.Transient); _di.Register <IVehicleService, VehicleService>(ObjectLifeTime.Transient); }
public TrailSystem() { SimpleDependencyInjection.getInstance().Inject(this); }
GameCamera() { SimpleDependencyInjection.getInstance().Inject(this); }
private void Awake() { SimpleDependencyInjection.getInstance().Inject(this); }
MainMenuHandler() { SimpleDependencyInjection.getInstance().Inject(this); }
public GameOverHandler() { SimpleDependencyInjection.getInstance().Inject(this); }
public Drones() { SimpleDependencyInjection.getInstance().Inject(this); _gameEventSystem.OnGameStateChanged += handleGameStateChanged; }
private void Awake() { boxCollider = GetComponent <BoxCollider>(); SimpleDependencyInjection.getInstance().Inject(this); }
public GameLogic() { SimpleDependencyInjection.getInstance().Inject(this); }
public static Disposable.BusClient CreateSingleton(RawRabbitOptions options = null) { var ioc = new SimpleDependencyInjection(); return(CreateSingleton(options, ioc, register => ioc)); }
public static InstanceFactory CreateInstanceFactory(RawRabbitOptions options = null) { var ioc = new SimpleDependencyInjection(); return(CreateInstanceFactory(options, ioc, register => ioc)); }
public HUDLength() { SimpleDependencyInjection.getInstance().Inject(this); }