public void Add(PhysicsObj obj) { Space.Add(obj.Entity); if (obj is ShipObj) Ships.Add((ShipObj)obj); else if (obj is Rocket) { Objects.Add(obj); MessageWriter.ClientEntityCreationMessage(null, NetEntityType.Missile, obj.ID, obj.Position, obj.Orientation, obj.resource_index); } else if (obj is Character) { } else Terrain.Add(obj); }
public abstract void Create(Vector3 position, Quaternion orientation, Vector3 inputVelocity, out Vector3 velocity, PhysicsObj target);
public void Add(PhysicsObj obj) { obj.ID = (ushort)(table.Count + adding.Count); obj.Entity.PositionUpdateMode = PositionUpdateMode.Passive; adding.Add(obj); }
public void Remove(PhysicsObj obj) { removing.Add(obj); }
public override void Create(Vector3 position, Quaternion orientation, Vector3 inputVelocity, out Vector3 velocity, PhysicsObj target) { var rocket = new Rocket(this, position, orientation); velocity = Vector3.Zero; rocket.Target = target; }
public void Add(PhysicsObj obj) { obj.ID = objectCount++; adding.Add(obj); }
public override void Create(Vector3 position, Quaternion orientation, Vector3 inputVelocity, out Vector3 velocity, PhysicsObj target) { Create(position, orientation, inputVelocity, out velocity); }