Exemple #1
0
 public VisualBezier(IImplementor _imp, int n, IPoint _a, IPoint _b, IPoint _c, IPoint _d) : base(_imp, n)
 {
     a = _a;
     b = _b;
     c = _c;
     d = _d;
 }
Exemple #2
0
 public DIContainer(IModule module) : base(module.Bindings)
 {
     _module = module;
     _module.Load();
     _implementor = new Implementor(this);
     Bind <IContainerCore>().ToInstance(this);
 }
Exemple #3
0
        IEnumerator SpawnPlayer()
        {
            // Build game object in Unity
            IEnumerator <GameObject> loadingAsync = _gameObjectFactory.Build("Prefabs/Player");

            yield return(loadingAsync); // wait until the asset is loaded and the gameobject built

            GameObject player = loadingAsync.Current;

            IImplementor playerPositionImplementor = player.AddComponent <PositionImplementor>();

            // Build entity for ECS
            List <IImplementor> implementors = new List <IImplementor>();

            implementors.Add(playerPositionImplementor);

            var x = _entityFactory.BuildEntity <PlayerEntityDescriptor>(0, ECSGroups.PlayersGroup, implementors);
        }
Exemple #4
0
        IEnumerator SpawnPlayer()
        {
            IEnumerator <GameObject> playerLoading = _gameobjectFactory.Build("Player");

            while (playerLoading.MoveNext())
            {
                yield return(null);
            }

            IEnumerator <GameObject> cameraLoading = _gameobjectFactory.Build("CameraPrefab");

            while (cameraLoading.MoveNext())
            {
                yield return(null);
            }

            GameObject player = playerLoading.Current;
            GameObject camera = cameraLoading.Current;

            //Get the gameobject "implementors". Implementors can be monobehaviours that can be used with Svelto.ECS
            //unluckily the gun is found in the same prefab of the character, so the best thing to do is to search
            //for all the implementors in the hierarchy and pass them to the BuildEntity. The BuildEntity will then
            //search for the implementors they need (player and guns separately)
            List <IImplementor> implementors = new List <IImplementor>();

            player.GetComponentsInChildren(true, implementors);

            //EghidHolderImplementor is a special framework provided implementor that tracks the EGID
            //of the entity linked to the implementor
            IImplementor egidHoldImplementor = player.AddComponent <EGIDHolderImplementor>();

            implementors.Add(egidHoldImplementor);

            BuildPlayerEntity(implementors, out var playerInitializer);
            BuildGunEntity(playerInitializer, implementors);
            BuildCameraEntity(playerInitializer, camera);
        }
Exemple #5
0
 protected Abstraction(IImplementor implementor)
 {
     Implementor = implementor;
 }
Exemple #6
0
 public VisualLine(IImplementor _imp, int n, IPoint _a, IPoint _b) : base(_imp, n)
 {
     a = _a;
     b = _b;
 }
 public RefinedAbstraction()
 {
     //RefinedAbstraction do not have to know a concrete implementor.. this is here just a sample that you can set that this way,
     //but there are many ways to do this
     implementor = new ConcreateImplementorA();
 }
 public Abstraction(IImplementor i) : base(i)
 {
     this.i = i;
 }
 public ImplementorAttributeExecuteInterceptor(Type interfaceType, IImplementor implementor)
 {
     this.InterfaceType = interfaceType;
     this.Implementor   = implementor;
 }
Exemple #10
0
 public Abstraction(IImplementor implementor)
 {
     this._implementor = implementor;
 }
 public Abstraction(IImplementor implementor)
 {
     Implementor = implementor;
 }
Exemple #12
0
 public AbAbstraction(IImplementor i)
 {
     implementor = i;
 }
Exemple #13
0
 //约束子类必须实现该构造函数
 public Abstraction(IImplementor imp)
 {
     this.imp = imp;
 }//自身的行为和属性
 protected Abstraction(IImplementor implementor) => this.implementor = implementor;
Exemple #15
0
 public void SetImpl(IImplementor impl)
 {
     _impl = impl;
 }
 public ViewFactory(IModule controllerModule, IImplementor implementor)
 {
     _viewModelsBindings = controllerModule.Bindings;
     _implementor        = implementor;
 }
Exemple #17
0
 protected Abstraction(IImplementor imple)
 {
     this.imple = imple;
 }
Exemple #18
0
 public AVisualCurve(IImplementor _imp, int _n)
 {
     imp = _imp;
     n   = _n;
 }
 public ChildAbstraction(IImplementor implementor)
     : base(implementor)
 {
 }
 public RefinedAbstraction(IImplementor implementor) : base(implementor)
 {
 }
 public CodeChatController(IImplementor implementor, ILogger <CodeChatController> logger)
 {
     _implementor = implementor;
     _logger      = logger;
 }
Exemple #22
0
 protected Abstractor(IImplementor implementor)
 {
     this.implementor = implementor;
 }
 public ConcreteAbstractor2(IImplementor implementor) : base(implementor)
 {
 }
Exemple #24
0
 public Abstraction(IImplementor implementor)
 {
     _implementor = implementor;
 }
Exemple #25
0
 public AbstractionB(IImplementor implementor)
 {
     _implementor = implementor;
 }
Exemple #26
0
 public ChildAbstraction(IImplementor implementor)
     : base(implementor)
 {
 }