【bug】【载具】修正载具初始子弹数量
parent
694b7caa9f
commit
895b6f39c3
|
|
@ -141,7 +141,11 @@ namespace Gameplay.Unit.Data
|
|||
/// <summary>
|
||||
/// 最大弹药量
|
||||
/// </summary>
|
||||
public ObscuredInt maxBulletCount;
|
||||
public ObscuredInt maxBulletCount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public ObscuredInt baseMaxBulletCount;
|
||||
|
||||
public ObscuredFloat criticalRate = 0f;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,11 @@ namespace Gameplay.Vehicle
|
|||
|
||||
public DataBattery rawConfig;
|
||||
|
||||
public int remainBulletCount;
|
||||
public int remainBulletCount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public GameUnit lockEnemy;
|
||||
|
||||
|
|
@ -53,7 +57,6 @@ namespace Gameplay.Vehicle
|
|||
{
|
||||
throw new Exception("炮台必须挂载在NormalVehicle上");
|
||||
}
|
||||
remainBulletCount = this.owner.fightData.maxBulletCount;
|
||||
rawConfig = TableManager.Instance.Tables.BatteryConfig.GetOrDefault(owner.configData.weaponId);
|
||||
}
|
||||
|
||||
|
|
@ -91,9 +94,15 @@ namespace Gameplay.Vehicle
|
|||
|
||||
public void Init()
|
||||
{
|
||||
_InitProp();
|
||||
_InitFsm();
|
||||
}
|
||||
|
||||
private void _InitProp()
|
||||
{
|
||||
remainBulletCount = owner.fightData.maxBulletCount;
|
||||
}
|
||||
|
||||
public bool RotateTower(GameUnit targetEnemy, float dt)
|
||||
{
|
||||
if (rotateTrans == null)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Gameplay.Vehicle
|
|||
var fireEffectId = rawWeaponConfig.FireEffectId;
|
||||
if (fireEffectId > 0)
|
||||
{
|
||||
var rot = rootObj.transform.rotation;
|
||||
var rot = fireTrans.rotation;
|
||||
EffectManager.instance.PlayEffectById(fireEffectId, fireTrans.position, rot, fireTrans);
|
||||
}
|
||||
|
||||
|
|
@ -136,8 +136,7 @@ namespace Gameplay.Vehicle
|
|||
{
|
||||
var firePos = fireTrans.position;
|
||||
firePos.y = 0.1f;
|
||||
var rot = rootObj.transform.rotation;
|
||||
EffectManager.instance.PlayEffectById(groundEffectId, firePos, rot);
|
||||
EffectManager.instance.PlayEffectById(groundEffectId, firePos);
|
||||
}
|
||||
|
||||
var lineEffectId = rawWeaponConfig.FlyEffectId;
|
||||
|
|
|
|||
Loading…
Reference in New Issue