Пример #1
0
        public override void InstallBindings()
        {
            Container.BindInstance(gameObject).WithId(InjectId.Owner).AsSingle();
            Container.BindAllInterfacesAndSelf <WireEvents>().To <WireEvents>().AsSingle();

            Container.Bind <Move>().AsSingle();

            Container.BindAllInterfacesAndSelf <Jump>().To <Jump>().AsSingle();
            Container.BindAllInterfacesAndSelf <FaceDirection>().To <FaceDirection>().AsSingle();
            Container.BindAllInterfacesAndSelf <Pushback>().To <Pushback>().AsSingle();
            Container.BindAllInterfacesAndSelf <Switch>().To <Switch>().AsSingle();
            Container.BindAllInterfacesAndSelf <Hazard>().To <Hazard>().AsSingle();
            Container.BindAllInterfacesAndSelf <ConsumePowerup>().To <ConsumePowerup>().AsSingle();

            Container.BindAllInterfacesAndSelf <LietoPushed>().To <LietoPushed>().AsSingle();
            Container.BindAllInterfacesAndSelf <LietoResurrect>().To <LietoResurrect>().AsSingle();
            Container.BindAllInterfacesAndSelf <LietoDeath>().To <LietoDeath>().AsSingle();

            Container.Bind <DetectCheckpoint>().FromComponent(gameObject).AsSingle();
            Container.Bind <DetectPowerup>().FromComponent(gameObject).AsSingle();

            AttackInstaller.Install(Container);
            LifeInstaller.Install(Container, gameObject);
            CharacterMotorInstaller.Install(Container, gameObject);
        }
Пример #2
0
        public override void InstallBindings()
        {
            Container.BindInstance(gameObject).WithId(InjectId.Owner).AsSingle();

            Container.BindInstance(GetComponent <ProximitySensor>()).AsSingle();

            Container.BindAllInterfacesAndSelf <FaceDirection>().To <FaceDirection>().AsSingle();
            Container.BindAllInterfacesAndSelf <EnemyAttackAI>().To <EnemyAttackAI>().AsSingle();
            Container.BindAllInterfacesAndSelf <DropPowerup>().To <DropPowerup>().AsSingle();

            Container.BindAllInterfacesAndSelf <GolemResurrect>().To <GolemResurrect>().AsSingle();
            Container.BindAllInterfacesAndSelf <GolemDeath>().To <GolemDeath>().AsSingle();

            LifeInstaller.Install(Container, gameObject);
            AttackInstaller.Install(Container);
            CharacterMotorInstaller.Install(Container, gameObject);
        }