public RigidBody(Vector2 pos, GameObject owner, Circle bCircle = null, Rect bBox = null, bool createbBox = true) { Position = pos; Owner = owner; AddCollider(bCircle, bBox, createbBox); CollisionAffection = true; PhysicsMgr.Add(this); }
public RigidBody(Vector2 pos, GameObject owner) { Position = pos; Owner = owner; CollisionAffection = true; PhysicsMgr.Add(this); }
public virtual void Spawn(Ship owner, Vector2 pos, Vector2 offset, Vector2 dir, float vel) { Owner = owner; Rotation = owner.Rotation; Position = pos + offset; Velocity = vel * dir; IsActive = true; Create(); PhysicsMgr.Add(Rigidbody); Rigidbody.SetDebugCircle(true); }