30 lines
706 B
C#
30 lines
706 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public abstract class MoveSubmoduleBase : AttackAreaSubmoduleBase
|
|
{
|
|
public float timeScaleCoefficient;
|
|
public Vector3 unscaledVelocity;
|
|
public Vector3 scaledVelocity;
|
|
|
|
public MoveSubmoduleBase(AttackAreaBase owner, float timeScaleCoefficient = 1) : base(owner)
|
|
{
|
|
this.timeScaleCoefficient = timeScaleCoefficient;
|
|
}
|
|
|
|
public virtual void Update()
|
|
{
|
|
if (scaledVelocity.magnitude < 0.01f)
|
|
{
|
|
OnStopMove();
|
|
}
|
|
}
|
|
|
|
protected virtual void OnStopMove()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |