切换主武器
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user