public override void CollidedByObject(Physics phy) { if (m_canPenetrate == false && phy is SimpleBomb) { ((SimpleBomb)phy).Bomb(); } }
public override void CollidedByObject(Physics phy) { if (phy is SimpleBomb) { SimpleBomb bomb = phy as SimpleBomb; bomb.Owner.PickBox(this); } }
public void AddPhysical(Physics phy) { phy.SetMap(this); lock (_objects) { _objects.Add(phy); } }
internal void SendPhysicalObjFocus(Physics obj, int type) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD); pkg.WriteByte((byte)eTankCmdType.FOCUS_ON_OBJECT); pkg.WriteInt(type); pkg.WriteInt(obj.X); pkg.WriteInt(obj.Y); SendToAll(pkg); }
protected virtual void CollideObjects(Physics[] list) { }
public override void CollidedByObject(Physics phy) { if (phy is SimpleBomb) { ((SimpleBomb)phy).Bomb(); } }
public Physics[] FindPhysicalObjects(Rectangle rect, Physics except) { List<Physics> list = new List<Physics>(); lock (_objects) { foreach (Physics phy in _objects) { if (phy.IsLiving && phy != except) { Rectangle t = phy.Bound; Rectangle t1 = phy.Bound1; t.Offset(phy.X, phy.Y); t1.Offset(phy.X, phy.Y); if (t.IntersectsWith(rect) || t1.IntersectsWith(rect)) { list.Add(phy); } } } } return list.ToArray(); }
public void RemovePhysical(Physics phy) { phy.SetMap(null); lock (_objects) { _objects.Remove(phy); } }
protected override void CollideObjects(Physics[] list) { foreach (Physics phy in list) { phy.CollidedByObject(this); m_actions.Add(new BombAction(m_lifeTime, ActionType.PICK, phy.Id, 0, 0, 0)); } }
public FocusAction(Physics obj, int type, int delay, int finishTime) : base(delay, finishTime) { m_obj = obj; m_type = type; }
public virtual void CollidedByObject(Physics phy) { }