角色控制修改
This commit is contained in:
@@ -225,7 +225,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 284185ec1f1e5c6409bed7bc27c6c215, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
value: 0.215
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 284185ec1f1e5c6409bed7bc27c6c215, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@@ -2594,8 +2594,8 @@ MonoBehaviour:
|
||||
FeetLengthAdjust: 0
|
||||
baseTransform: {fileID: 0}
|
||||
Hips: {fileID: 2121359798269357256}
|
||||
ScaleReferenceMode: 3
|
||||
finalScaleReference: 0.9072804
|
||||
ScaleReferenceMode: 1
|
||||
finalScaleReference: 0.85559285
|
||||
finalScaleReferenceSqrt: 0.1
|
||||
customScaleReferenceValue: 0.5
|
||||
DelayedInitialization: 0
|
||||
|
||||
@@ -12,3 +12,331 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 3d8691ef03f74aedb6cfd67e53cf664f, type: 3}
|
||||
m_Name: ConfigAssets
|
||||
m_EditorClassIdentifier:
|
||||
BaitConfigArr:
|
||||
- id: 500001
|
||||
modelPath: baits/worm_01/worm_01
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 2.5
|
||||
lenght: 0
|
||||
amount: 1
|
||||
Level: 1
|
||||
- id: 500002
|
||||
modelPath: baits/fly/fly
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 2.5
|
||||
lenght: 0
|
||||
amount: 1
|
||||
Level: 1
|
||||
- id: 500003
|
||||
modelPath: baits/black_leech/black_leech
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 2.5
|
||||
lenght: 0
|
||||
amount: 1
|
||||
Level: 1
|
||||
- id: 500004
|
||||
modelPath: baits/bread/bread
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 2.5
|
||||
lenght: 0
|
||||
amount: 1
|
||||
Level: 1
|
||||
BobberConfigArr:
|
||||
- id: 300001
|
||||
modelPath: bobbers/expressfishing/bob_25003/bob_25003
|
||||
group: 0
|
||||
type: 2
|
||||
weight: 0.5
|
||||
displacement: 3
|
||||
isNightLight: 0
|
||||
Level: 1
|
||||
amount: 1
|
||||
- id: 300002
|
||||
modelPath: bobbers/expressfishing/bob_25162_25163/bob_25162
|
||||
group: 0
|
||||
type: 0
|
||||
weight: 0.8
|
||||
displacement: 3
|
||||
isNightLight: 0
|
||||
Level: 1
|
||||
amount: 1
|
||||
- id: 300003
|
||||
modelPath: bobbers/expressfishing/bob_25166_25167/bob_25166
|
||||
group: 0
|
||||
type: 0
|
||||
weight: 0.8
|
||||
displacement: 3
|
||||
isNightLight: 0
|
||||
Level: 1
|
||||
amount: 1
|
||||
- id: 300004
|
||||
modelPath: bobbers/expressfishing/bob_25001/bob_25001
|
||||
group: 0
|
||||
type: 0
|
||||
weight: 0.8
|
||||
displacement: 3
|
||||
isNightLight: 0
|
||||
Level: 1
|
||||
amount: 1
|
||||
FeederConfigArr:
|
||||
- id: 900001
|
||||
modelPath: Feeders/Feeder 1/FeedTrash 1
|
||||
group: 0
|
||||
type: 0
|
||||
weight: 5
|
||||
capacity: 100
|
||||
Level: 1
|
||||
amount: 1
|
||||
FishAcceptConfigArr:
|
||||
- id: 2100001
|
||||
bait: 500189
|
||||
min: 0.3
|
||||
max: 26
|
||||
- id: 2100001
|
||||
bait: 500135
|
||||
min: 0.3
|
||||
max: 25
|
||||
FishConfigArr:
|
||||
- id: 2200001
|
||||
speciesName: 10
|
||||
isEnabled: 1
|
||||
type: 0
|
||||
maxWeight: 34
|
||||
speciesCoins: 4
|
||||
rankingPoint: 1
|
||||
modelPath:
|
||||
- Burbot_B
|
||||
imagePath: []
|
||||
modelTrophyPath: []
|
||||
weightLenghtValues: []
|
||||
weightLengthCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
acceptFishBaits: []
|
||||
acceptFishLures: []
|
||||
- id: 2200002
|
||||
speciesName: 11
|
||||
isEnabled: 1
|
||||
type: 0
|
||||
maxWeight: 40
|
||||
speciesCoins: 4
|
||||
rankingPoint: 1
|
||||
modelPath:
|
||||
- CarpCommon_B
|
||||
imagePath: []
|
||||
modelTrophyPath: []
|
||||
weightLenghtValues: []
|
||||
weightLengthCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
acceptFishBaits: []
|
||||
acceptFishLures: []
|
||||
- id: 2200003
|
||||
speciesName: 14
|
||||
isEnabled: 1
|
||||
type: 0
|
||||
maxWeight: 45
|
||||
speciesCoins: 4
|
||||
rankingPoint: 1
|
||||
modelPath:
|
||||
- CarpGrass_B
|
||||
imagePath: []
|
||||
modelTrophyPath: []
|
||||
weightLenghtValues: []
|
||||
weightLengthCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
acceptFishBaits: []
|
||||
acceptFishLures: []
|
||||
- id: 2200004
|
||||
speciesName: 16
|
||||
isEnabled: 1
|
||||
type: 0
|
||||
maxWeight: 3
|
||||
speciesCoins: 4
|
||||
rankingPoint: 1
|
||||
modelPath:
|
||||
- CarpCrucian_B
|
||||
imagePath: []
|
||||
modelTrophyPath: []
|
||||
weightLenghtValues: []
|
||||
weightLengthCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
acceptFishBaits: []
|
||||
acceptFishLures: []
|
||||
HookConfigArr:
|
||||
- id: 700001
|
||||
modelPath: hooks/alliance/c_hook_20789_20794/c_hook_20789
|
||||
group: 0
|
||||
color: Nickel
|
||||
type: 1
|
||||
zadzior: 1
|
||||
size: 1
|
||||
amount: 1
|
||||
Level: 1
|
||||
- id: 700102
|
||||
modelPath: hooks/berserk_hooks/triple_20569_20577/triple_20569
|
||||
group: 0
|
||||
color: Nickel
|
||||
type: 1
|
||||
zadzior: 1
|
||||
size: 1
|
||||
amount: 1
|
||||
Level: 1
|
||||
LeadersConfigArr: []
|
||||
LineConfigArr:
|
||||
- id: 400001
|
||||
modelPath: Lines/UFE Mono/UFE monoClear
|
||||
group: 0
|
||||
type: 0
|
||||
length: 75
|
||||
strength: 1.51
|
||||
size: 0.12
|
||||
Level: 1
|
||||
- id: 400002
|
||||
modelPath: Lines/UFE Mono/UFE monoClear
|
||||
group: 0
|
||||
type: 0
|
||||
length: 75
|
||||
strength: 2.51
|
||||
size: 0.16
|
||||
Level: 1
|
||||
LureConfigArr:
|
||||
- id: 600001
|
||||
modelPath: lures/express_fishing/crankbaits_1/775/crankbaits_775
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 5.3
|
||||
lenght: 80
|
||||
amount: 0
|
||||
Level: 1
|
||||
hook: c6ae0a00
|
||||
- id: 600002
|
||||
modelPath: lures/express_fishing/poppers_1/poppers_590/poppers_590
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 5.3
|
||||
lenght: 80
|
||||
amount: 0
|
||||
Level: 1
|
||||
hook: c6ae0a00
|
||||
- id: 600003
|
||||
modelPath: lures/express_fishing/softplastic/ef_supergrab_6/softplastic_g_1622
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 5.3
|
||||
lenght: 80
|
||||
amount: 0
|
||||
Level: 1
|
||||
hook:
|
||||
- id: 600004
|
||||
modelPath: lures/express_fishing/softplastic/ef_superminnow_6/softplastic_m_1634
|
||||
group: 0
|
||||
type: 0
|
||||
acceptFish:
|
||||
weightFishAccept: {x: 0, y: 3}
|
||||
weight: 5.3
|
||||
lenght: 80
|
||||
amount: 0
|
||||
Level: 1
|
||||
hook:
|
||||
ReelConfigArr:
|
||||
- id: 200001
|
||||
modelPath: reels/syberia/spin_5002/spin_5002
|
||||
group: 0
|
||||
type: 0
|
||||
strength: 3
|
||||
gearRatio: {x: 6.2, y: 1}
|
||||
size: 2000
|
||||
Level: 1
|
||||
- id: 200002
|
||||
modelPath: reels/syberia/spin_5036/spin_5036
|
||||
group: 0
|
||||
type: 0
|
||||
strength: 4.5
|
||||
gearRatio: {x: 6.2, y: 1}
|
||||
size: 2000
|
||||
Level: 1
|
||||
RingConfigArr:
|
||||
- id: 1100001
|
||||
modelPath: rod_rings/rumoi/rumoi_oxiline_spin
|
||||
group: 0
|
||||
- id: 1100002
|
||||
modelPath: rod_rings/smt/smt_pure_ceramic_bolo
|
||||
group: 0
|
||||
RodConfigArr:
|
||||
- id: 100001
|
||||
modelPath: rods/syberia/tele_10037/tele_10037_t13
|
||||
group: 0
|
||||
type: 1
|
||||
length: 3,7
|
||||
weight: 250
|
||||
strength: 40.82
|
||||
maxRange: 67
|
||||
ring: 0
|
||||
- id: 100002
|
||||
modelPath: rods/syberia/bolo_10021/bolo_10021_LB400
|
||||
group: 0
|
||||
type: 0
|
||||
length: 2,5
|
||||
weight: 120
|
||||
strength: 1.59
|
||||
maxRange: 30
|
||||
ring: 1100002
|
||||
- id: 100003
|
||||
modelPath: rods/syberia/spin_10034/spin_10034_S60H
|
||||
group: 0
|
||||
type: 0
|
||||
length: 2,5
|
||||
weight: 120
|
||||
strength: 1.59
|
||||
maxRange: 30
|
||||
ring: 1100001
|
||||
UnitConfigArr:
|
||||
- id: 310001
|
||||
Type: 1
|
||||
- id: 310002
|
||||
Type: 2
|
||||
- id: 310003
|
||||
Type: 3
|
||||
- id: 310004
|
||||
Type: 4
|
||||
WeightConfigArr:
|
||||
- id: 800001
|
||||
modelPath: Weights/Weight2_5g
|
||||
group: 0
|
||||
type: 0
|
||||
weight: 3
|
||||
Level: 1
|
||||
amount: 1
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace NBF
|
||||
[Serializable]
|
||||
public abstract class ConfigBase
|
||||
{
|
||||
public string name;
|
||||
|
||||
public int id;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace NBF.Fishing2
|
||||
MapUnitInfo mapUnit = new MapUnitInfo();
|
||||
mapUnit.Id = self.RoleId;
|
||||
mapUnit.RoleInfo = self.ToSimpleInfo();
|
||||
mapUnit.Gears = self.Gears;
|
||||
// mapUnit.Gears = self.Gears;
|
||||
return mapUnit;
|
||||
}
|
||||
|
||||
|
||||
@@ -289,14 +289,12 @@ namespace NBF.Fishing2
|
||||
private void StartMovement(MoveState moveState)
|
||||
{
|
||||
targetPosition = moveState.startPosition;
|
||||
PlayerAsset.InputMagnitude = 0.5f;
|
||||
Debug.Log($"开始移动 - 位置: {moveState.startPosition}");
|
||||
}
|
||||
|
||||
private void StopMovement(MoveState moveState)
|
||||
{
|
||||
targetPosition = moveState.startPosition;
|
||||
PlayerAsset.InputMagnitude = 0;
|
||||
Debug.Log($"停止移动 - 最终位置: {moveState.startPosition}");
|
||||
}
|
||||
|
||||
@@ -344,6 +342,8 @@ namespace NBF.Fishing2
|
||||
Vector3 totalMovement = currentVelocity * Time.deltaTime;
|
||||
totalMovement.y = verticalVelocity * Time.deltaTime;
|
||||
|
||||
Log.Info($"移动=== Id={Parent.Id} 位置: {characterController.transform.position} 移动量: {totalMovement}");
|
||||
|
||||
characterController.Move(totalMovement);
|
||||
}
|
||||
|
||||
@@ -351,14 +351,13 @@ namespace NBF.Fishing2
|
||||
private void InterpolatePositionAndRotation()
|
||||
{
|
||||
// 只对非本地玩家进行插值
|
||||
var mapUnit = Parent as MapUnit;
|
||||
if (!mapUnit.IsSelf())
|
||||
if (!IsSelf)
|
||||
{
|
||||
// 插值位置
|
||||
characterController.transform.position = Vector3.Lerp(
|
||||
characterController.transform.position,
|
||||
targetPosition,
|
||||
positionLerpSpeed * Time.deltaTime);
|
||||
// characterController.transform.position = Vector3.Lerp(
|
||||
// characterController.transform.position,
|
||||
// targetPosition,
|
||||
// positionLerpSpeed * Time.deltaTime);
|
||||
|
||||
// 插值旋转 - 使用更平滑的插值方法
|
||||
characterController.transform.rotation = Quaternion.Slerp(
|
||||
|
||||
@@ -82,12 +82,12 @@ namespace NBC
|
||||
BaseInfo = default;
|
||||
RoleId = default;
|
||||
Items.Clear();
|
||||
ItemBinds.Clear();
|
||||
Fishs.Clear();
|
||||
Activities.Clear();
|
||||
Currency.Clear();
|
||||
Slots.Clear();
|
||||
Skills.Clear();
|
||||
Gears.Clear();
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
|
||||
@@ -100,17 +100,17 @@ namespace NBC
|
||||
[ProtoMember(3)]
|
||||
public List<ItemInfo> Items = new List<ItemInfo>();
|
||||
[ProtoMember(4)]
|
||||
public List<FishInfo> Fishs = new List<FishInfo>();
|
||||
public List<ItemBindInfo> ItemBinds = new List<ItemBindInfo>();
|
||||
[ProtoMember(5)]
|
||||
public List<ActivityInfo> Activities = new List<ActivityInfo>();
|
||||
public List<FishInfo> Fishs = new List<FishInfo>();
|
||||
[ProtoMember(6)]
|
||||
public List<KeyValueInt64> Currency = new List<KeyValueInt64>();
|
||||
public List<ActivityInfo> Activities = new List<ActivityInfo>();
|
||||
[ProtoMember(7)]
|
||||
public List<KeyValueInt64> Slots = new List<KeyValueInt64>();
|
||||
public List<KeyValueInt64> Currency = new List<KeyValueInt64>();
|
||||
[ProtoMember(8)]
|
||||
public List<SkillInfo> Skills = new List<SkillInfo>();
|
||||
public List<KeyValueInt64> Slots = new List<KeyValueInt64>();
|
||||
[ProtoMember(9)]
|
||||
public List<GearInfo> Gears = new List<GearInfo>();
|
||||
public List<SkillInfo> Skills = new List<SkillInfo>();
|
||||
[ProtoMember(10)]
|
||||
public int MapId { get; set; }
|
||||
}
|
||||
@@ -199,6 +199,29 @@ namespace NBC
|
||||
public int Count { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家当前使用钓组信息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class ItemBindInfo : AMessage, IProto
|
||||
{
|
||||
public static ItemBindInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<ItemBindInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Item = default;
|
||||
BindItems.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<ItemBindInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Item { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<long> BindItems = new List<long>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 物品信息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
|
||||
@@ -9,4 +9,304 @@ using NBC.Serialize;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// /////////// ******** 物品信息 *******/////////////
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 请求背包列表
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_GetItemsRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_GetItemsRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_GetItemsRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_GetItemsResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求背包列表响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_GetItemsResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_GetItemsResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Items.Clear();
|
||||
Rigs.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_GetItemsResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<ItemInfo> Items = new List<ItemInfo>();
|
||||
[ProtoMember(2)]
|
||||
public List<ItemBindInfo> Rigs = new List<ItemBindInfo>();
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求使用物品
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_UseItemRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_UseItemRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_UseItemRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_UseItemResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求使用物品响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_UseItemResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_UseItemResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_UseItemResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 物品变化
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Game2C_ItemChange Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_ItemChange>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Type = default;
|
||||
Items.Clear();
|
||||
Removes.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_ItemChange>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_ItemChange; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int Type { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<ItemInfo> Items = new List<ItemInfo>();
|
||||
[ProtoMember(3)]
|
||||
public List<long> Removes = new List<long>();
|
||||
}
|
||||
/// <summary>
|
||||
/// /////////// ******** 鱼护 *******/////////////
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 请求鱼护列表
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_GetFishsRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_GetFishsRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_GetFishsRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_GetFishsRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_GetFishsResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_GetFishsRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求鱼护列表响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_GetFishsResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_GetFishsResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_GetFishsResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Fishs.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_GetFishsResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_GetFishsResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<FishInfo> Fishs = new List<FishInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 鱼护变化
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_FishChange : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Game2C_FishChange Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_FishChange>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Type = default;
|
||||
Fishs.Clear();
|
||||
Removes.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_FishChange>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_FishChange; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int Type { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<FishInfo> Fishs = new List<FishInfo>();
|
||||
[ProtoMember(3)]
|
||||
public List<long> Removes = new List<long>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求出售
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_SellFishRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_SellFishRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_SellFishRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Ids.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_SellFishRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_SellFishResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_SellFishRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public List<long> Ids = new List<long>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求出售响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_SellFishResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_SellFishResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_SellFishResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Awards.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_SellFishResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_SellFishResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<AwardInfo> Awards = new List<AwardInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// /////////// ******** 商店 *******/////////////
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 请求购买
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_BuyRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_BuyRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_BuyRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_BuyRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_GetFishsResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求购买响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_BuyResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_BuyResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Awards.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_BuyResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<AwardInfo> Awards = new List<AwardInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,61 +2,73 @@ namespace Fantasy
|
||||
{
|
||||
public static partial class OuterOpcode
|
||||
{
|
||||
public const uint C2Map_CreateRoomRequest = 2281711377;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929105;
|
||||
public const uint C2Game_GetItemsRequest = 2281711377;
|
||||
public const uint Game2C_GetItemsResponse = 2415929105;
|
||||
public const uint C2Game_UseItemRequest = 2281711378;
|
||||
public const uint Game2C_UseItemResponse = 2415929106;
|
||||
public const uint Game2C_ItemChange = 2147493649;
|
||||
public const uint C2Game_GetFishsRequest = 2281711379;
|
||||
public const uint Game2C_GetFishsResponse = 2415929107;
|
||||
public const uint Game2C_FishChange = 2147493650;
|
||||
public const uint C2Game_SellFishRequest = 2281711380;
|
||||
public const uint Game2C_SellFishResponse = 2415929108;
|
||||
public const uint C2Game_BuyRequest = 2281711381;
|
||||
public const uint Game2C_BuyResponse = 2415929109;
|
||||
public const uint C2Map_CreateRoomRequest = 2281711382;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929110;
|
||||
public const uint C2G_ExitRoomRequest = 268445457;
|
||||
public const uint G2C_ExitRoomResponse = 402663185;
|
||||
public const uint C2G_EnterMapRequest = 268445458;
|
||||
public const uint G2C_EnterMapResponse = 402663186;
|
||||
public const uint Map2C_ChangeMap = 2147493649;
|
||||
public const uint Map2C_ChangeMap = 2147493651;
|
||||
public const uint C2A_LoginRequest = 268445459;
|
||||
public const uint A2C_LoginResponse = 402663187;
|
||||
public const uint C2G_LoginRequest = 268445460;
|
||||
public const uint G2C_LoginResponse = 402663188;
|
||||
public const uint G2C_RepeatLogin = 134227729;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711378;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929106;
|
||||
public const uint Map2C_RoleEnterRoomNotify = 2147493650;
|
||||
public const uint Map2C_RoleExitRoomNotify = 2147493651;
|
||||
public const uint C2Map_RolePropertyChange = 2147493652;
|
||||
public const uint Map2C_RoleStateNotify = 2147493653;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493654;
|
||||
public const uint Map2C_RolePropertyChangeNotify = 2147493655;
|
||||
public const uint C2Map_Move = 2147493656;
|
||||
public const uint C2Map_Look = 2147493657;
|
||||
public const uint Map2C_MoveNotify = 2147493658;
|
||||
public const uint Map2C_LookeNotify = 2147493659;
|
||||
public const uint C2S_GetConversationsRequest = 2281711379;
|
||||
public const uint S2C_GetConversationsResponse = 2415929107;
|
||||
public const uint C2S_SendMailRequest = 2281711380;
|
||||
public const uint S2C_SendMailResponse = 2415929108;
|
||||
public const uint C2S_DeleteMailRequest = 2281711381;
|
||||
public const uint S2C_DeleteMailResponse = 2415929109;
|
||||
public const uint S2C_HaveMail = 2147493660;
|
||||
public const uint S2C_MailState = 2147493661;
|
||||
public const uint C2S_CreateChannelRequest = 2281711382;
|
||||
public const uint S2C_CreateChannelResponse = 2415929110;
|
||||
public const uint C2S_JoinChannelRequest = 2281711383;
|
||||
public const uint S2C_JoinChannelResponse = 2415929111;
|
||||
public const uint C2S_SendMessageRequest = 2281711384;
|
||||
public const uint S2C_SendMessageResponse = 2415929112;
|
||||
public const uint S2C_Message = 2147493662;
|
||||
public const uint C2S_CreateClubRequest = 2281711385;
|
||||
public const uint S2C_CreateClubResponse = 2415929113;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711386;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929114;
|
||||
public const uint C2S_GetMemberListRequest = 2281711387;
|
||||
public const uint S2C_GetMemberListResponse = 2415929115;
|
||||
public const uint C2S_GetClubListRequest = 2281711388;
|
||||
public const uint S2C_GetClubListResponse = 2415929116;
|
||||
public const uint C2S_JoinClubRequest = 2281711389;
|
||||
public const uint S2C_JoinClubResponse = 2415929117;
|
||||
public const uint C2S_LeaveClubRequest = 2281711390;
|
||||
public const uint S2C_LeaveClubResponse = 2415929118;
|
||||
public const uint C2S_DissolveClubRequest = 2281711391;
|
||||
public const uint S2C_DissolveClubResponse = 2415929119;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711392;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929120;
|
||||
public const uint S2C_ClubChange = 2147493663;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711383;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929111;
|
||||
public const uint Map2C_RoleEnterRoomNotify = 2147493652;
|
||||
public const uint Map2C_RoleExitRoomNotify = 2147493653;
|
||||
public const uint C2Map_RolePropertyChange = 2147493654;
|
||||
public const uint Map2C_RoleStateNotify = 2147493655;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493656;
|
||||
public const uint Map2C_RolePropertyChangeNotify = 2147493657;
|
||||
public const uint C2Map_Move = 2147493658;
|
||||
public const uint C2Map_Look = 2147493659;
|
||||
public const uint Map2C_MoveNotify = 2147493660;
|
||||
public const uint Map2C_LookeNotify = 2147493661;
|
||||
public const uint C2S_GetConversationsRequest = 2281711384;
|
||||
public const uint S2C_GetConversationsResponse = 2415929112;
|
||||
public const uint C2S_SendMailRequest = 2281711385;
|
||||
public const uint S2C_SendMailResponse = 2415929113;
|
||||
public const uint C2S_DeleteMailRequest = 2281711386;
|
||||
public const uint S2C_DeleteMailResponse = 2415929114;
|
||||
public const uint S2C_HaveMail = 2147493662;
|
||||
public const uint S2C_MailState = 2147493663;
|
||||
public const uint C2S_CreateChannelRequest = 2281711387;
|
||||
public const uint S2C_CreateChannelResponse = 2415929115;
|
||||
public const uint C2S_JoinChannelRequest = 2281711388;
|
||||
public const uint S2C_JoinChannelResponse = 2415929116;
|
||||
public const uint C2S_SendMessageRequest = 2281711389;
|
||||
public const uint S2C_SendMessageResponse = 2415929117;
|
||||
public const uint S2C_Message = 2147493664;
|
||||
public const uint C2S_CreateClubRequest = 2281711390;
|
||||
public const uint S2C_CreateClubResponse = 2415929118;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711391;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929119;
|
||||
public const uint C2S_GetMemberListRequest = 2281711392;
|
||||
public const uint S2C_GetMemberListResponse = 2415929120;
|
||||
public const uint C2S_GetClubListRequest = 2281711393;
|
||||
public const uint S2C_GetClubListResponse = 2415929121;
|
||||
public const uint C2S_JoinClubRequest = 2281711394;
|
||||
public const uint S2C_JoinClubResponse = 2415929122;
|
||||
public const uint C2S_LeaveClubRequest = 2281711395;
|
||||
public const uint S2C_LeaveClubResponse = 2415929123;
|
||||
public const uint C2S_DissolveClubRequest = 2281711396;
|
||||
public const uint S2C_DissolveClubResponse = 2415929124;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711397;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929125;
|
||||
public const uint S2C_ClubChange = 2147493665;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,6 +225,7 @@ namespace NBC
|
||||
Rotation = default;
|
||||
Direction = default;
|
||||
IsStop = default;
|
||||
IsRun = default;
|
||||
Timestamp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_MoveNotify>(this);
|
||||
@@ -244,6 +245,8 @@ namespace NBC
|
||||
[ProtoMember(5)]
|
||||
public bool IsStop { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public bool IsRun { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public long Timestamp { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -29,33 +29,6 @@ namespace NBF
|
||||
#region 动画
|
||||
|
||||
#region 参数定义
|
||||
private static readonly int InputHorizontalHash = Animator.StringToHash("InputHorizontal");
|
||||
private static readonly int InputVerticalHash = Animator.StringToHash("InputVertical");
|
||||
private static readonly int InputMagnitudeHash = Animator.StringToHash("InputMagnitude");
|
||||
private static readonly int IsSprintingHash = Animator.StringToHash("IsSprinting");
|
||||
public float InputHorizontal
|
||||
{
|
||||
get => Animator.GetFloat(InputHorizontalHash);
|
||||
set => Animator.SetFloat(InputHorizontalHash, value);
|
||||
}
|
||||
public float InputVertical
|
||||
{
|
||||
get => Animator.GetFloat(InputVerticalHash);
|
||||
set => Animator.SetFloat(InputVerticalHash, value);
|
||||
}
|
||||
public float InputMagnitude
|
||||
{
|
||||
get => Animator.GetFloat(InputMagnitudeHash);
|
||||
set => Animator.SetFloat(InputMagnitudeHash, value);
|
||||
}
|
||||
public bool IsSprinting
|
||||
{
|
||||
get => Animator.GetBool(IsSprintingHash);
|
||||
set => Animator.SetBool(IsSprintingHash, value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace NBF
|
||||
private static void OnConnectComplete()
|
||||
{
|
||||
Log.Debug("连接成功");
|
||||
// 心跳
|
||||
Session.AddComponent<SessionHeartbeatComponent>().Start(HeartbeatInterval);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user