public override void Initialize()
        {
            base.Initialize();

            _collision = new CollisionComponent();
            _collision.Parent = EntityMock.Object;
            _movement = new MovementComponent();
            _movement.Parent = EntityMock.Object;
            _position = new PositionComponent();
            _position.Parent = EntityMock.Object;
            _movement.RegisterDependencies(_position);
            _movement.RegisterDependencies(_collision);
            _collision.RegisterDependencies(_position);
            _collision.RegisterDependencies(_movement);

            _position.Start(Container);
            _movement.Start(Container);
            _collision.Start(Container);
        }
        public override void Initialize()
        {
            base.Initialize();

            _collision        = new CollisionComponent();
            _collision.Parent = EntityMock.Object;
            _movement         = new MovementComponent();
            _movement.Parent  = EntityMock.Object;
            _position         = new PositionComponent();
            _position.Parent  = EntityMock.Object;
            _movement.RegisterDependencies(_position);
            _movement.RegisterDependencies(_collision);
            _collision.RegisterDependencies(_position);
            _collision.RegisterDependencies(_movement);

            _position.Start(Container);
            _movement.Start(Container);
            _collision.Start(Container);
        }
Exemplo n.º 3
0
        public void Initialize()
        {
            _entityMock      = new Mock <IEntity>();
            _movement        = new MovementComponent();
            _movement.Parent = _entityMock.Object;
            _container       = new FakeGameplayContainer();
            _screen          = new Mock <ITiledScreen>();
            _entityMock.SetupGet(e => e.Screen).Returns(_screen.Object);
            _entityMock.SetupGet(e => e.Container).Returns(_container);

            _position = new PositionComponent();
            _movement.RegisterDependencies(_position);
        }
        public void Initialize()
        {
            _entityMock = new Mock<IEntity>();
            _movement = new MovementComponent();
            _movement.Parent = _entityMock.Object;
            _container = new FakeGameplayContainer();
            _screen = new Mock<ITiledScreen>();
            _entityMock.SetupGet(e => e.Screen).Returns(_screen.Object);
            _entityMock.SetupGet(e => e.Container).Returns(_container);

            _position = new PositionComponent();
            _movement.RegisterDependencies(_position);
        }