예제 #1
0
 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);
 }
예제 #2
0
        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);
        }