增加收获属性逻辑,优化掉落物表现效果
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class DropSpawnRequestedEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(DropSpawnRequestedEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public Vector3 Position { get; private set; }
|
||||
|
||||
public DropSpawnRequestedEventArgs()
|
||||
{
|
||||
Position = Vector3.zero;
|
||||
}
|
||||
|
||||
public static DropSpawnRequestedEventArgs Create(Vector3 position)
|
||||
{
|
||||
var args = ReferencePool.Acquire<DropSpawnRequestedEventArgs>();
|
||||
args.Position = position;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Position = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17f56868934d4df4b230b3a12924fba7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class WaveHarvestSettlementEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(WaveHarvestSettlementEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int HarvestIncome { get; private set; }
|
||||
public int HarvestGrowth { get; private set; }
|
||||
public int CurrentHarvest { get; private set; }
|
||||
|
||||
public WaveHarvestSettlementEventArgs()
|
||||
{
|
||||
HarvestIncome = 0;
|
||||
HarvestGrowth = 0;
|
||||
CurrentHarvest = 0;
|
||||
}
|
||||
|
||||
public static WaveHarvestSettlementEventArgs Create(int income, int growth, int currentHarvest)
|
||||
{
|
||||
var args = ReferencePool.Acquire<WaveHarvestSettlementEventArgs>();
|
||||
args.HarvestIncome = income;
|
||||
args.HarvestGrowth = growth;
|
||||
args.CurrentHarvest = currentHarvest;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
HarvestIncome = 0;
|
||||
HarvestGrowth = 0;
|
||||
CurrentHarvest = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b78ae26ee6734a84aad77ca563607ee2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class ShopGoodsLockEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(ShopGoodsLockEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int GoodsIndex { get; private set; }
|
||||
|
||||
public ShopGoodsLockEventArgs()
|
||||
{
|
||||
GoodsIndex = -1;
|
||||
}
|
||||
|
||||
public static ShopGoodsLockEventArgs Create(int index)
|
||||
{
|
||||
var args = ReferencePool.Acquire<ShopGoodsLockEventArgs>();
|
||||
args.GoodsIndex = index;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
GoodsIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57dd9523362d470fa6e823b2478c18ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -52,8 +52,14 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
CritMultiplier = _buf.ReadFloat();
|
||||
DropEntityCoinCount = _buf.ReadInt();
|
||||
DropEntityExpCount = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);DropEntityAssetNames = new System.Collections.Generic.List<string>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { string _e0; _e0 = _buf.ReadString(); DropEntityAssetNames.Add(_e0);}}
|
||||
EnemyBodyRadius = _buf.ReadFloat();
|
||||
EnemySeparationIterations = _buf.ReadInt();
|
||||
RecoilDistance = _buf.ReadFloat();
|
||||
RecoilDuration = _buf.ReadFloat();
|
||||
DashAccelerationDuration = _buf.ReadFloat();
|
||||
DashMaxSpeedMultiplier = _buf.ReadFloat();
|
||||
TurnSpeed = _buf.ReadFloat();
|
||||
}
|
||||
|
||||
public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
|
||||
@@ -200,6 +206,11 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int DropEntityExpCount;
|
||||
/// <summary>
|
||||
/// 掉落物预制体名列表
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.List<string> DropEntityAssetNames;
|
||||
public System.Collections.Generic.List<EntityConfig> DropEntityAssetNames_Ref;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public readonly float EnemyBodyRadius;
|
||||
@@ -207,6 +218,26 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
/// 敌人分离迭代次数
|
||||
/// </summary>
|
||||
public readonly int EnemySeparationIterations;
|
||||
/// <summary>
|
||||
/// 掉落物拾取时后退距离
|
||||
/// </summary>
|
||||
public readonly float RecoilDistance;
|
||||
/// <summary>
|
||||
/// 掉落物拾取时后退时间
|
||||
/// </summary>
|
||||
public readonly float RecoilDuration;
|
||||
/// <summary>
|
||||
/// 冲刺加速时长
|
||||
/// </summary>
|
||||
public readonly float DashAccelerationDuration;
|
||||
/// <summary>
|
||||
/// 冲刺最高倍率(基于吸收速度)
|
||||
/// </summary>
|
||||
public readonly float DashMaxSpeedMultiplier;
|
||||
/// <summary>
|
||||
/// 转向速度
|
||||
/// </summary>
|
||||
public readonly float TurnSpeed;
|
||||
|
||||
public const int __ID__ = -958250779;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -247,6 +278,14 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
DropEntityAssetNames_Ref = new System.Collections.Generic.List<EntityConfig>();
|
||||
foreach (var _v in DropEntityAssetNames) { DropEntityAssetNames_Ref.Add(tables.TbEntityConfig.GetOrDefault(_v)); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -288,8 +327,14 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
+ "critMultiplier:" + CritMultiplier + ","
|
||||
+ "dropEntityCoinCount:" + DropEntityCoinCount + ","
|
||||
+ "dropEntityExpCount:" + DropEntityExpCount + ","
|
||||
+ "dropEntityAssetNames:" + Luban.StringUtil.CollectionToString(DropEntityAssetNames) + ","
|
||||
+ "enemyBodyRadius:" + EnemyBodyRadius + ","
|
||||
+ "enemySeparationIterations:" + EnemySeparationIterations + ","
|
||||
+ "recoilDistance:" + RecoilDistance + ","
|
||||
+ "recoilDuration:" + RecoilDuration + ","
|
||||
+ "dashAccelerationDuration:" + DashAccelerationDuration + ","
|
||||
+ "dashMaxSpeedMultiplier:" + DashMaxSpeedMultiplier + ","
|
||||
+ "turnSpeed:" + TurnSpeed + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ public partial class TbGlobalConfig
|
||||
/// </summary>
|
||||
public int DropEntityExpCount => _data.DropEntityExpCount;
|
||||
/// <summary>
|
||||
/// 掉落物预制体名列表
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<string> DropEntityAssetNames => _data.DropEntityAssetNames;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public float EnemyBodyRadius => _data.EnemyBodyRadius;
|
||||
@@ -174,6 +178,26 @@ public partial class TbGlobalConfig
|
||||
/// 敌人分离迭代次数
|
||||
/// </summary>
|
||||
public int EnemySeparationIterations => _data.EnemySeparationIterations;
|
||||
/// <summary>
|
||||
/// 掉落物拾取时后退距离
|
||||
/// </summary>
|
||||
public float RecoilDistance => _data.RecoilDistance;
|
||||
/// <summary>
|
||||
/// 掉落物拾取时后退时间
|
||||
/// </summary>
|
||||
public float RecoilDuration => _data.RecoilDuration;
|
||||
/// <summary>
|
||||
/// 冲刺加速时长
|
||||
/// </summary>
|
||||
public float DashAccelerationDuration => _data.DashAccelerationDuration;
|
||||
/// <summary>
|
||||
/// 冲刺最高倍率(基于吸收速度)
|
||||
/// </summary>
|
||||
public float DashMaxSpeedMultiplier => _data.DashMaxSpeedMultiplier;
|
||||
/// <summary>
|
||||
/// 转向速度
|
||||
/// </summary>
|
||||
public float TurnSpeed => _data.TurnSpeed;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user