1
This commit is contained in:
@@ -20,7 +20,7 @@ namespace BITFALL.Entities.Player.Movement
|
||||
{
|
||||
[CustomType(typeof(IEntityMovement))]
|
||||
[CustomType(typeof(IPlayerMovement))]
|
||||
public class PlayerCharacterController : StateBasedPlayerComponent<IEntityMovementState>,IEntityMovement,IPlayerMovement
|
||||
public class PlayerCharacterController : StateBasedPlayerBehavior<IEntityMovementState>,IEntityMovement,IPlayerMovement
|
||||
{
|
||||
[SerializeField] private CharacterActor actor;
|
||||
[SerializeField] private Vector3 initialCameraPosition = new(0,0.11f,0.27f);
|
||||
@@ -228,6 +228,7 @@ namespace BITFALL.Entities.Player.Movement
|
||||
{
|
||||
if (!x.TryGetComponent<OffMeshLink>(out var offMeshLink)) continue;
|
||||
var toTarget = x.transform.position - transform.position;
|
||||
|
||||
toTarget = Vector3.ProjectOnPlane(toTarget, Vector3.up);
|
||||
|
||||
// 获取正前方的向量
|
||||
@@ -361,7 +362,7 @@ namespace BITFALL.Entities.Player.Movement
|
||||
case > 0:
|
||||
break;
|
||||
case < -16:
|
||||
entity.Invoke<DamageMessage>(new DamageMessage()
|
||||
UnityEntity.Invoke<DamageMessage>(new DamageMessage()
|
||||
{
|
||||
Damage = value < -30 ? int.MaxValue : (int)math.abs(value) * 2 ,
|
||||
DamageType = new GravityDamage(),
|
||||
@@ -370,8 +371,8 @@ namespace BITFALL.Entities.Player.Movement
|
||||
position = actor.Position,
|
||||
rotation = actor.Rotation
|
||||
},
|
||||
Initiator = entity,
|
||||
Target = entity,
|
||||
Initiator = UnityEntity,
|
||||
Target = UnityEntity,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user