常用方法
常用方法
常用方法
常用方法
protected override void NetworkCallback(NetworkMessage message) { if (message.type == 5 && message.ip == IP) { PlayerStateMessage m = PlayerStateMessage.GetMessage(message.message); player.SetState(m.state, m.atkState); } else if (message.type == 6 && message.ip == IP) { PlayerHurtMessage m = PlayerHurtMessage.GetMessage(message.message); player.ReduceHP(m.hurt); } else if (message.type == 18 && message.ip == IP) { player.Shoot(); } }