移除无用脚本
This commit is contained in:
@@ -26,7 +26,7 @@ public class MapRoom : Entity
|
|||||||
/// 房间玩家
|
/// 房间玩家
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<long, Player> Units = new Dictionary<long, Player>();
|
public Dictionary<long, Player> Units = new Dictionary<long, Player>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 房主
|
/// 房主
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ public class MapUnitComponent : Entity
|
|||||||
/// 旋转
|
/// 旋转
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float3 Rotation;
|
public float3 Rotation;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 钓组信息
|
|
||||||
/// </summary>
|
|
||||||
public List<MapUnitGear> Gears = new List<MapUnitGear>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 房间Id
|
/// 房间Id
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
using Fantasy.Entitas;
|
|
||||||
using Unity.Mathematics;
|
|
||||||
|
|
||||||
namespace NB.Game;
|
|
||||||
|
|
||||||
public enum MapGearState
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Take = 1,
|
|
||||||
Put = 2,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 钓组信息
|
|
||||||
/// </summary>
|
|
||||||
public class MapUnitGear : Entity
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 杆子
|
|
||||||
/// </summary>
|
|
||||||
public long Item;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 杆子配件
|
|
||||||
/// </summary>
|
|
||||||
public List<long> Rings = new List<long>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 杆子状态
|
|
||||||
/// </summary>
|
|
||||||
public MapGearState State;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 位置
|
|
||||||
/// </summary>
|
|
||||||
public float3 Position;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 旋转
|
|
||||||
/// </summary>
|
|
||||||
public float3 Rotation;
|
|
||||||
}
|
|
||||||
@@ -32,13 +32,13 @@ public class C2Map_TakeItemRequestHandler : RouteRPC<Player, C2Map_TakeItemReque
|
|||||||
var itemType = ItemHelper.GetType(item.ConfigId);
|
var itemType = ItemHelper.GetType(item.ConfigId);
|
||||||
if (itemType == ItemBasicType.Rod)
|
if (itemType == ItemBasicType.Rod)
|
||||||
{
|
{
|
||||||
itemContainer.Binding.TryGetValue(item.Id, out var itemRod);
|
// itemContainer.Binding.TryGetValue(item.Id, out var itemRod);
|
||||||
//鱼竿
|
// //鱼竿
|
||||||
var itemGear = mapUnit.GetOrAddItemGear(item);
|
// var itemGear = mapUnit.GetOrAddItemGear(item);
|
||||||
if (itemRod != null)
|
// if (itemRod != null)
|
||||||
{
|
// {
|
||||||
itemGear.Rings.AddRange(itemRod);
|
// itemGear.Rings.AddRange(itemRod);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,19 +5,6 @@ namespace NB.Game;
|
|||||||
|
|
||||||
public static class MapUnitComponentSystem
|
public static class MapUnitComponentSystem
|
||||||
{
|
{
|
||||||
public static MapUnitGear GetOrAddItemGear(this MapUnitComponent self, Item item)
|
|
||||||
{
|
|
||||||
var mapItem = self.Gears.Find(t => t.Item == item.Id);
|
|
||||||
if (mapItem == null)
|
|
||||||
{
|
|
||||||
mapItem = new MapUnitGear();
|
|
||||||
mapItem.Item = item.Id;
|
|
||||||
self.Gears.Add(mapItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
return mapItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<GearInfo> ToMapUnitInfo(this MapUnitComponent self)
|
public static List<GearInfo> ToMapUnitInfo(this MapUnitComponent self)
|
||||||
{
|
{
|
||||||
List<GearInfo> ret = new List<GearInfo>();
|
List<GearInfo> ret = new List<GearInfo>();
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ public static class PlayerSystem
|
|||||||
ret.Rotation.x = mapUnit.Rotation.x;
|
ret.Rotation.x = mapUnit.Rotation.x;
|
||||||
ret.Rotation.y = mapUnit.Rotation.y;
|
ret.Rotation.y = mapUnit.Rotation.y;
|
||||||
ret.Rotation.z = mapUnit.Rotation.z;
|
ret.Rotation.z = mapUnit.Rotation.z;
|
||||||
|
|
||||||
|
// ret.Gears
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user