整合SLSUtilities
This commit is contained in:
@@ -10,7 +10,6 @@ namespace Cielonos.MainGame.FunctionalAnimation
|
||||
public class SetRootAdsorptionAdjustment : FuncAnimPayloadBase<bool>
|
||||
{
|
||||
[InfoBox("这个payload只能在运行时由代码调用,不能直接放在动画事件里使用")]
|
||||
private CharacterBase executor => runtimeFuncAnim.executor;
|
||||
private CharacterBase target;
|
||||
private float enableMinDistance;
|
||||
|
||||
@@ -28,12 +27,12 @@ namespace Cielonos.MainGame.FunctionalAnimation
|
||||
|
||||
bool Adsorption()
|
||||
{
|
||||
if (target == null || executor == null)
|
||||
if (target == null || character == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Vector3 centerPointPosition = executor.flexibleCenterPoint.position;
|
||||
Vector3 centerPointPosition = character.flexibleCenterPoint.position;
|
||||
Vector3 adsorptionVector;
|
||||
|
||||
/*if (target.collisionController.mainCollider.enabled)
|
||||
@@ -54,7 +53,7 @@ namespace Cielonos.MainGame.FunctionalAnimation
|
||||
|
||||
if (adsorptionVector.magnitude <= enableMinDistance)
|
||||
{
|
||||
executor.animationSc.isDisablingMoveXZ = true;
|
||||
character.animationSc.isDisablingMoveXZ = true;
|
||||
return true; //已经在攻击范围内
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user