public Views.SignalView ToView() { Views.SignalView view = new Views.SignalView(); view.SourceEntity = SourceEntity; view.DestinationEntity = DestinationEntity; view.DestinationPosition = new Views.Vector2(DestinationPosition.X, DestinationPosition.Y); return(view); }
public bool SendSignal(Views.SignalView signal) { if (GameServer.GetScene().Mode != SceneMode.Game) { return(false); } GameServer.GetMap().AddSignal(new Signals.Signal() { SourceEntity = Hero.ID, DestinationPosition = ViewToV2(signal.DestinationPosition), DestinationEntity = signal.DestinationEntity }); return(true); }