Ejemplo n.º 1
0
 public PhysicsComponent(GameEntity entity, PhysicsComponent parent)
     : this(entity)
 {
     parent_ = parent;
     parent_.children_.Add(this);
     velocity_ = Vector2.Zero;
     spin_ = 0f;
     growth_ = Vector2.Zero;
 }
Ejemplo n.º 2
0
 public override Component deepCopy(GameEntity entity)
 {
     PhysicsComponent c = new PhysicsComponent(entity);
     c.spin_ = spin_;
     c.velocity_ = velocity_;
     c.accel_ = accel_;
     c.growth_ = growth_;
     return c;
 }
Ejemplo n.º 3
0
 public PhysicsComponent(GameEntity entity, PhysicsComponent parent, Vector2 velocity, float spin, Vector2 growth)
     : this(entity)
 {
     parent_ = parent;
     parent_.children_.Add(this);
     velocity_ = velocity;
     spin_ = spin;
     growth_ = growth;
 }
Ejemplo n.º 4
0
 private void remove(PhysicsComponent physic)
 {
     physics_.Remove(physic);
 }
Ejemplo n.º 5
0
 private void add(PhysicsComponent physic)
 {
     physics_.Add(physic);
 }