导入敌人模型素材,统一经验和金币掉落物
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
namespace SepCore.Entity
|
||||
{
|
||||
public class CoinData : EntityDataBase
|
||||
{
|
||||
private int _value;
|
||||
|
||||
public CoinData(int value, int entityId, string assetName = "CoinEntity") : base(assetName, entityId)
|
||||
{
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public int Value
|
||||
{
|
||||
get => _value;
|
||||
set => _value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9caee22d67a42018113acc77155d6ba
|
||||
timeCreated: 1770292597
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace SepCore.Entity
|
||||
{
|
||||
public class DropData : EntityDataBase
|
||||
{
|
||||
private int _coinCount;
|
||||
private int _expCount;
|
||||
|
||||
public DropData(int coinCount, int expCount, int entityId, string assetName = "DropEntity")
|
||||
: base(assetName, entityId)
|
||||
{
|
||||
_coinCount = coinCount;
|
||||
_expCount = expCount;
|
||||
}
|
||||
|
||||
public int CoinCount
|
||||
{
|
||||
get => _coinCount;
|
||||
set => _coinCount = value;
|
||||
}
|
||||
|
||||
public int ExpCount
|
||||
{
|
||||
get => _expCount;
|
||||
set => _expCount = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fde8f604fb5b7646b201ca25bb5b86b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SepCore.Definition;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -32,10 +31,6 @@ namespace SepCore.Entity
|
||||
|
||||
public float SpeedBase => Config.Speed;
|
||||
|
||||
public int DropCoin => Config.CoinDrop;
|
||||
|
||||
public int DropExp => Config.ExpDrop;
|
||||
|
||||
public float DropPercent => Config.DropPercent;
|
||||
|
||||
public float Scale => Config.Scale;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace SepCore.Entity
|
||||
{
|
||||
public class ExpData : EntityDataBase
|
||||
{
|
||||
private int _value;
|
||||
|
||||
public ExpData(int value, int entityId, string assetName = "ExpEntity") : base(assetName, entityId)
|
||||
{
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public int Value
|
||||
{
|
||||
get => _value;
|
||||
set => _value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0f6c8e117da49f1ad04fd8810882043
|
||||
timeCreated: 1770292932
|
||||
@@ -24,8 +24,6 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
AttackCooldown = _buf.ReadFloat();
|
||||
AttackRange = _buf.ReadFloat();
|
||||
Speed = _buf.ReadFloat();
|
||||
CoinDrop = _buf.ReadInt();
|
||||
ExpDrop = _buf.ReadInt();
|
||||
DropPercent = _buf.ReadFloat();
|
||||
Scale = _buf.ReadFloat();
|
||||
Color = _buf.ReadString();
|
||||
@@ -71,14 +69,6 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly float Speed;
|
||||
/// <summary>
|
||||
/// 金币掉落
|
||||
/// </summary>
|
||||
public readonly int CoinDrop;
|
||||
/// <summary>
|
||||
/// 经验掉落
|
||||
/// </summary>
|
||||
public readonly int ExpDrop;
|
||||
/// <summary>
|
||||
/// 掉落概率
|
||||
/// </summary>
|
||||
public readonly float DropPercent;
|
||||
@@ -112,8 +102,6 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
}
|
||||
|
||||
@@ -128,8 +116,6 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
+ "attackCooldown:" + AttackCooldown + ","
|
||||
+ "attackRange:" + AttackRange + ","
|
||||
+ "speed:" + Speed + ","
|
||||
+ "coinDrop:" + CoinDrop + ","
|
||||
+ "expDrop:" + ExpDrop + ","
|
||||
+ "dropPercent:" + DropPercent + ","
|
||||
+ "scale:" + Scale + ","
|
||||
+ "color:" + Color + ","
|
||||
|
||||
@@ -48,8 +48,10 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
ProjectileEntity = _buf.ReadString();
|
||||
ProjectileEntity_Ref = null;
|
||||
DamageTextYOffset = _buf.ReadInt();
|
||||
EntityAsyncTimeout = _buf.ReadInt();
|
||||
EntityAsyncTimeout = _buf.ReadFloat();
|
||||
CritMultiplier = _buf.ReadFloat();
|
||||
DropEntityCoinCount = _buf.ReadInt();
|
||||
DropEntityExpCount = _buf.ReadInt();
|
||||
EnemyBodyRadius = _buf.ReadFloat();
|
||||
EnemySeparationIterations = _buf.ReadInt();
|
||||
}
|
||||
@@ -184,12 +186,20 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
/// <summary>
|
||||
/// 实体生成超时时间
|
||||
/// </summary>
|
||||
public readonly int EntityAsyncTimeout;
|
||||
public readonly float EntityAsyncTimeout;
|
||||
/// <summary>
|
||||
/// 暴击伤害倍率
|
||||
/// </summary>
|
||||
public readonly float CritMultiplier;
|
||||
/// <summary>
|
||||
/// 掉落物金币数
|
||||
/// </summary>
|
||||
public readonly int DropEntityCoinCount;
|
||||
/// <summary>
|
||||
/// 掉落物经验数
|
||||
/// </summary>
|
||||
public readonly int DropEntityExpCount;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public readonly float EnemyBodyRadius;
|
||||
@@ -237,6 +247,8 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -274,6 +286,8 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
+ "damageTextYOffset:" + DamageTextYOffset + ","
|
||||
+ "entityAsyncTimeout:" + EntityAsyncTimeout + ","
|
||||
+ "critMultiplier:" + CritMultiplier + ","
|
||||
+ "dropEntityCoinCount:" + DropEntityCoinCount + ","
|
||||
+ "dropEntityExpCount:" + DropEntityExpCount + ","
|
||||
+ "enemyBodyRadius:" + EnemyBodyRadius + ","
|
||||
+ "enemySeparationIterations:" + EnemySeparationIterations + ","
|
||||
+ "}";
|
||||
|
||||
@@ -153,12 +153,20 @@ public partial class TbGlobalConfig
|
||||
/// <summary>
|
||||
/// 实体生成超时时间
|
||||
/// </summary>
|
||||
public int EntityAsyncTimeout => _data.EntityAsyncTimeout;
|
||||
public float EntityAsyncTimeout => _data.EntityAsyncTimeout;
|
||||
/// <summary>
|
||||
/// 暴击伤害倍率
|
||||
/// </summary>
|
||||
public float CritMultiplier => _data.CritMultiplier;
|
||||
/// <summary>
|
||||
/// 掉落物金币数
|
||||
/// </summary>
|
||||
public int DropEntityCoinCount => _data.DropEntityCoinCount;
|
||||
/// <summary>
|
||||
/// 掉落物经验数
|
||||
/// </summary>
|
||||
public int DropEntityExpCount => _data.DropEntityExpCount;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public float EnemyBodyRadius => _data.EnemyBodyRadius;
|
||||
|
||||
Reference in New Issue
Block a user