表格相关逻辑修改和组件定义
This commit is contained in:
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameBaits")]
|
||||
public partial class GameBaits : ConfigGearBase
|
||||
public partial class BaitConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -35,9 +35,9 @@ namespace NBF
|
||||
|
||||
public virtual bool CheckIsFishAccept(FishSpecies fishSpecies, float fishWeight = 0f)
|
||||
{
|
||||
var fish = GameFish.Get(t => t.speciesName == fishSpecies);
|
||||
var fish = FishConfig.Get(t => t.speciesName == fishSpecies);
|
||||
if (fish == null) return false;
|
||||
if (fish.type == GameFish.Type.Predator && type == Type.Spinning)
|
||||
if (fish.type == FishConfig.Type.Predator && type == Type.Spinning)
|
||||
{
|
||||
Vector2 vector = weightFishAccept;
|
||||
Debug.Log("Startowa wartosc przynety:" + vector.ToString());
|
||||
@@ -116,7 +116,7 @@ namespace NBF
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (fish.type == GameFish.Type.WhiteFish && type == Type.Natural)
|
||||
else if (fish.type == FishConfig.Type.WhiteFish && type == Type.Natural)
|
||||
{
|
||||
if (acceptFish.Contains(fishSpecies))
|
||||
{
|
||||
@@ -124,7 +124,7 @@ namespace NBF
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (fish.type == GameFish.Type.Predator && type == Type.Natural &&
|
||||
else if (fish.type == FishConfig.Type.Predator && type == Type.Natural &&
|
||||
acceptFish.Contains(fishSpecies))
|
||||
{
|
||||
Debug.Log("Fish accept bait predator weight:" + fishWeight);
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameFloats")]
|
||||
public partial class GameFloats : ConfigGearBase
|
||||
public partial class BobberConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameFeeders")]
|
||||
public partial class GameFeeders : ConfigGearBase
|
||||
public partial class FeederConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameFishAccepts")]
|
||||
public partial class GameFishAccepts : ConfigBase
|
||||
public partial class FishAcceptConfig : ConfigBase
|
||||
{
|
||||
public int bait;
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace NBF
|
||||
}
|
||||
|
||||
[TableName("gameFish")]
|
||||
public partial class GameFish : ConfigBase
|
||||
public partial class FishConfig : ConfigBase
|
||||
{
|
||||
public static GameFish Get(FishSpecies fishSpecies)
|
||||
public static FishConfig Get(FishSpecies fishSpecies)
|
||||
{
|
||||
return Get(t => t.speciesName == fishSpecies);
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameHooks")]
|
||||
public partial class GameHooks : ConfigGearBase
|
||||
public partial class HookConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameLeaders")]
|
||||
public partial class GameLeaders : ConfigGearBase
|
||||
public partial class LeadersConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -13,15 +13,7 @@ namespace NBF
|
||||
Steel = 2,
|
||||
Titanium = 3
|
||||
}
|
||||
|
||||
|
||||
public Type type;
|
||||
|
||||
public float strength = 1f;
|
||||
|
||||
public float size = 0.12f;
|
||||
|
||||
public int Level = 1;
|
||||
|
||||
public int amount = 1;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameLines")]
|
||||
public partial class GameLines : ConfigGearBase
|
||||
public partial class LineConfig : ConfigGearBase
|
||||
{
|
||||
protected override string ModelRoot => "GameItemsPrefabs/";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameLures")]
|
||||
public partial class GameLures : ConfigGearBase
|
||||
public partial class LureConfig : ConfigGearBase
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
@@ -37,7 +37,7 @@ namespace NBF
|
||||
|
||||
public bool CheckIsFishAccept(FishSpecies fishSpecies, float fishWeight = 0)
|
||||
{
|
||||
if (GameFish.Get(fishSpecies).type == GameFish.Type.Predator)
|
||||
if (FishConfig.Get(fishSpecies).type == FishConfig.Type.Predator)
|
||||
{
|
||||
Vector2 vector = weightFishAccept;
|
||||
Debug.Log("诱饵的初始值:" + vector.ToString());
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameReels")]
|
||||
public partial class GameReels : ConfigGearBase
|
||||
public partial class ReelConfig : ConfigGearBase
|
||||
{
|
||||
// protected override string ModelRoot => "GameItemsPrefabs/";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameRings")]
|
||||
public partial class GameRings : ConfigGearBase
|
||||
public partial class RingConfig : ConfigGearBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameRods")]
|
||||
public partial class GameRods : ConfigGearBase
|
||||
public partial class RodConfig : ConfigGearBase
|
||||
{
|
||||
|
||||
public enum Type
|
||||
31
Assets/Scripts/Configs/Mem/UnitConfig.cs
Normal file
31
Assets/Scripts/Configs/Mem/UnitConfig.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameUnit")]
|
||||
public partial class UnitConfig : ConfigBase
|
||||
{
|
||||
public UnitType Type;
|
||||
}
|
||||
|
||||
public enum UnitType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 玩家
|
||||
/// </summary>
|
||||
Player = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 鱼
|
||||
/// </summary>
|
||||
Fish = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 船
|
||||
/// </summary>
|
||||
Boat = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 车
|
||||
/// </summary>
|
||||
Car = 4,
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Configs/Mem/UnitConfig.cs.meta
Normal file
3
Assets/Scripts/Configs/Mem/UnitConfig.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 956ed7b067744c369fcff9a8baef77ee
|
||||
timeCreated: 1756049614
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
namespace NBF
|
||||
{
|
||||
[TableName("gameWeights")]
|
||||
public partial class GameWeights : ConfigGearBase
|
||||
public partial class WeightConfig : ConfigGearBase
|
||||
{
|
||||
protected override string ModelRoot => "GameItemsPrefabs/";
|
||||
|
||||
Reference in New Issue
Block a user