当前位置: 首页>>代码示例>>C#>>正文


C# GameMessage类代码示例

本文整理汇总了C#中GameMessage的典型用法代码示例。如果您正苦于以下问题:C# GameMessage类的具体用法?C# GameMessage怎么用?C# GameMessage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GameMessage类属于命名空间,在下文中一共展示了GameMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MessageNode

 public MessageNode(GameMessage message, int start, int end)
 {
     this.gameMessage = message;
     this.mStart = start;
     this.mEnd = end;
     Text = String.Join(".", (message.GetType().ToString().Split('.').Skip(5)));
 }
开发者ID:farces,项目名称:GameMessage-Viewer,代码行数:7,代码来源:MessageNode.cs

示例2: GameServerPacket

 public GameServerPacket(GameMessage message)
 {
     m_stream = new MemoryStream();
     m_writer = new BinaryWriter(m_stream);
     m_writer.Write((byte)(StocMessage.GameMsg));
     m_writer.Write((byte)message);
 }
开发者ID:247321453,项目名称:YgoServer,代码行数:7,代码来源:GameServerPacket.cs

示例3: BroadcastGlobal

 public void BroadcastGlobal(GameMessage message)
 {
     foreach (var player in this.Players.Values)
     {
         player.InGameClient.SendMessageNow(message);
     }
 }
开发者ID:bryan77,项目名称:mooege,代码行数:7,代码来源:World.cs

示例4: Message_TouchStarted

 public GameMessageResult Message_TouchStarted(GameMessage msg)
 {
     ToggleSelected();
     GameMessenger.Reg("touchEnded", this, Message_TouchEnded);
     GameMessenger.Reg("touchMoved", this, Message_TouchMoved);
     return GameMessageResult.handledMessage;
 }
开发者ID:bcatcho,项目名称:rtsControl,代码行数:7,代码来源:GameActorAbilitySelectable.cs

示例5: Message_newTestInputRecording

 public GameMessageResult Message_newTestInputRecording(GameMessage msg)
 {
     var testName = (string)msg.data;
     text.text = "[Test] " + testName;
     Clear();
     return GameMessageResult.handledMessage;
 }
开发者ID:bcatcho,项目名称:rtsControl,代码行数:7,代码来源:CTTestInputDisplay.cs

示例6: HoldEnd

	public void HoldEnd (GameMessage msg)
	{
        Debug.Log("HoldEnd");
        // TODO(oz) Differenciate hold end from hold start
        ChangeBehaviour(Behaviour.HoldStart);
		SoundController.instance.PlaySfx (SoundController.SfxType.FxTams2, msg.targetId);
	}
开发者ID:osmanzeki,项目名称:Necromaestro,代码行数:7,代码来源:PlayerComponent.cs

示例7: GameServerPacket

		public GameServerPacket(GameMessage message):base(GamePacketByteLength)
		{
			Write((byte)(StocMessage.GameMsg));
			this.PacketMsg=StocMessage.GameMsg;
			Write((byte)message);
			this.GameMsg = message;
		}
开发者ID:247321453,项目名称:YgoServer,代码行数:7,代码来源:GameServerPacket.cs

示例8: OnGameMessage

    public override void OnGameMessage(GameMessage gameMessage)
    {
        //requestedState = gameMessage.unityInstanceStatus.requestedState;
        gameMessage.unityInstanceStatus.state = gameMessage.unityInstanceStatus.requestedState;

        Reply(gameMessage);
    }
开发者ID:gamemachine,项目名称:gamemachine,代码行数:7,代码来源:UnityInstanceActor.cs

示例9: Log

	public static void Log(string txt, float life = 3.0f){
		GameMessage msg = new GameMessage ();
		msg.text = txt;
		msg.time = Time.time;
		msg.life = life;
		message_stream.OnNext(msg);
	}
开发者ID:mrunderhill89,项目名称:guardian_of_the_fields_the_strawberry_jam,代码行数:7,代码来源:GameMessages.cs

示例10: EmtryMessage

		public static byte[] EmtryMessage(GameMessage message){
			byte[] data =null;
			using(GameServerPacket packet=new GameServerPacket(message)){
				data = packet.Content;
			}
			return data;
		}
开发者ID:247321453,项目名称:YgoServer,代码行数:7,代码来源:GameServerPacket.cs

示例11: CreateAccount

 public static PacketWriter CreateAccount(bool successful, GameMessage failureReason)
 {
     var pw = GetWriter(ServerPacketID.CreateAccount);
     pw.Write(successful);
     if (!successful)
         pw.WriteEnum(failureReason);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:ServerPacket.cs

示例12: Send

 /// <summary>
 /// Sends data to the <see cref="INetworkSender"/>. This method is thread-safe.
 /// </summary>
 /// <param name="sender">The <see cref="INetworkSender"/> to use to send the data.</param>
 /// <param name="message">GameMessage to send to the User.</param>
 /// <param name="messageType">The <see cref="ServerMessageType"/> to use for sending the <paramref name="message"/>.</param>
 /// <param name="parameters">Message parameters.</param>
 public static void Send(this INetworkSender sender, GameMessage message, ServerMessageType messageType,
                         params object[] parameters)
 {
     using (var pw = ServerPacket.SendMessage(message, parameters))
     {
         sender.Send(pw, messageType);
     }
 }
开发者ID:wtfcolt,项目名称:game,代码行数:15,代码来源:INetworkSenderExtensions.cs

示例13: CoreMessage

 public CoreMessage(GameMessage msg, BinaryReader reader, byte[] raw)
 {
     Message = msg;
     Reader = reader;
     m_raw = raw;
     m_stream = (MemoryStream)reader.BaseStream;
     m_startPosition = m_stream.Position;
 }
开发者ID:247321453,项目名称:YgoServer,代码行数:8,代码来源:CoreMessage.cs

示例14: getMessage

 public override GameMessage getMessage()
 {
     GameMessage message = new GameMessage ();
     message.bPieceSelectionMessage = false;
     message.iIndex1 = (int)squareIndex.x;
     message.iIndex2 = (int)squareIndex.y;
     return message;
 }
开发者ID:sergiohc101,项目名称:Hnefatafl-AR,代码行数:8,代码来源:PieceMove.cs

示例15: DespawnMessage

 public static GameMessage DespawnMessage(int index)
 {
     GameMessage msg = new GameMessage();
     msg.DataType = DataTypeDespawnEntity;
     msg.index = index;
     msg.MessageSize = 0;
     return msg;
 }
开发者ID:slicedpan,项目名称:SpaceInvaders,代码行数:8,代码来源:GameState.cs


注:本文中的GameMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。