切换主武器

This commit is contained in:
SoulliesOfficial
2025-12-23 19:47:06 -05:00
parent eaa688c7a9
commit 2a2aa728d5
275 changed files with 12579 additions and 2770 deletions

View File

@@ -18,7 +18,7 @@ namespace Cielonos.MainGame
float angularSpeed, float angularAcceleration, Vector3 initialDirection, bool stopWhenHit) : base(attackArea, stopWhenHit)
{
this.target = target;
this.targetTransform = target.transform;
this.targetTransform = target != null ? target.transform : null;
this.angularSpeed = angularSpeed;
this.angularAcceleration = angularAcceleration;
this.moveSpeed = moveSpeed;
@@ -30,6 +30,11 @@ namespace Cielonos.MainGame
{
if (target == null || target.statusSm.isDead)
{
moveSpeed += moveAcceleration * Time.deltaTime;
moveSpeed = Mathf.Max(moveSpeed, 0f);
unscaledVelocity = projectile.forward * moveSpeed;
scaledVelocity = unscaledVelocity * timeScaleCoefficient; //attackArea.creator.selfTimeModule
projectile.position += scaledVelocity * Time.deltaTime;
return;
}