示例#1
0
 public PhysicsComponent(GameEntity entity, PhysicsComponent parent)
     : this(entity)
 {
     parent_ = parent;
     parent_.children_.Add(this);
     velocity_ = Vector2.Zero;
     spin_ = 0f;
     growth_ = Vector2.Zero;
 }
示例#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;
 }
示例#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;
 }
示例#4
0
 private void remove(PhysicsComponent physic)
 {
     physics_.Remove(physic);
 }
示例#5
0
 private void add(PhysicsComponent physic)
 {
     physics_.Add(physic);
 }