public void CommonInstall() { SignalBusInstaller.Install(Container); signalBus = Container.Resolve <SignalBus>(); gameObject = new GameObject(); gameObject.AddComponent <PlayerUnit>(); GameContext context = EditModeUtil.CreateGameContext(signalBus); Container.Bind <GameContext>().FromInstance(context).AsSingle(); }
public void CommonInstall() { SignalBusInstaller.Install(Container); signalBus = Container.Resolve <SignalBus>(); randomGenerator = new RandomGeneratorStub(); var randomGeneratorMap = new Dictionary <string, IRandomGenerator>() { { "Game", randomGenerator } }; var context = EditModeUtil.CreateGameContext(signalBus, randomGeneratorMap: randomGeneratorMap); gameObject = new GameObject(); gameObject.AddComponent <PlayerUnit>(); Container.Bind <GameContext>().FromInstance(context).AsSingle(); Container.Inject(this); }