void FireMoveReq() { if (_player_id != GameManager._userId) { return; } proto.payload.transform transProto = new proto.payload.transform(); transProto.position = new proto.payload.vector3(); transProto.position.x = transform.position.x; transProto.position.y = transform.position.y; transProto.position.z = transform.position.z; transProto.rotation = new proto.payload.vector3(); transProto.rotation.x = transform.rotation.x; transProto.rotation.y = transform.rotation.y; transProto.rotation.z = transform.rotation.z; transProto.movement = new proto.payload.vector3(); transProto.movement.x = _Move.x; transProto.movement.y = _Move.y; transProto.movement.z = _Move.z; transProto.speed = _speed; Event.FireIn("room_move_req", new object[] { transProto }); }
public void MoveReq(proto.payload.transform trans) { Debug.Log("moveReq"); var roomMoveReq = new room_move_req(); roomMoveReq.player_id = GameManager._userId; roomMoveReq.trans = trans; ServerMessage.Instance.Send <room_move_req>(1009, roomMoveReq); }