替换玩家模型素材,添加 ChildrenMap 配置挂点
This commit is contained in:
@@ -23,6 +23,8 @@ namespace SepCore.UI
|
||||
public int Price;
|
||||
public Vector3 TargetPos;
|
||||
public Action<int, int> OnRecycle;
|
||||
public bool CanCombine;
|
||||
public Action<int> OnCombine;
|
||||
public int LastWaveDamage;
|
||||
public IReadOnlyDictionary<WeaponTag, int> CurrentTagCounts;
|
||||
}
|
||||
|
||||
@@ -351,5 +351,26 @@ namespace SepCore.UI
|
||||
{
|
||||
return Mathf.FloorToInt(basePrice * GameEntry.Luban.Global.WeaponRecycleRate);
|
||||
}
|
||||
|
||||
public bool CanCombineWeapon(int index, out int matchIndex, out WeaponConfig nextTierConfig)
|
||||
{
|
||||
return _player.CanCombineWeapon(index, out matchIndex, out nextTierConfig);
|
||||
}
|
||||
|
||||
public async UniTask<bool> TryCombineWeaponAsync(int index)
|
||||
{
|
||||
if (!_player.CanCombineWeapon(index, out int matchIndex, out WeaponConfig nextTierConfig))
|
||||
{
|
||||
Log.Warning("ShopUseCase.TryCombineWeaponAsync: Cannot combine weapon at index {0}.", index);
|
||||
return false;
|
||||
}
|
||||
|
||||
var weapons = _player.Weapons;
|
||||
WeaponBase weaponA = weapons[index];
|
||||
WeaponBase weaponB = weapons[matchIndex];
|
||||
|
||||
WeaponBase newWeapon = await _player.CombineWeaponsAsync(weaponA, weaponB, nextTierConfig);
|
||||
return newWeapon != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user