Esempio n. 1
0
 public void AddEntity(Entity.Entity entity)
 {
     Entity.Entity tempEntity = entity;
     tempEntity.components.Remove(entity.GetComponent("PhysicsComponent"));
     Console.WriteLine(entity.GetComponent("PhysicsComponent"));
     tempEntity.AddComponent(new PhysicsComponent());
     dynamicCellSpacePartition.AddEntity(entity);
 }
        public SolidColliderComponent(Entity.Entity entity, Polygon2 poly)
        {
            _data        = new SolidCData();
            _data.Center = Vector2.Zero;

            Collider = new Collider(new Particle(entity.GetComponent <TransformComponent>().Position, 0),
                                    poly, this);
            RegisterComponent(entity, "SolidColliderComponent");
        }