You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
741 B
31 lines
741 B
using UnityEngine;
|
|
using Entitas;
|
|
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
[Combat]
|
|
public class CurveBulletComponent : IComponent, IReset
|
|
{
|
|
public Vector2 origin;
|
|
public Vector2 destination;
|
|
public Vector2 control;
|
|
public int explosionRangeEid;
|
|
public float totalTime;
|
|
internal float accumulatedTime;
|
|
|
|
|
|
public void Reset()
|
|
{
|
|
accumulatedTime = 0f;
|
|
if (explosionRangeEid != 0)
|
|
{
|
|
var explosionRangeEnt = Contexts.Combat.GetEntity(explosionRangeEid);
|
|
if (explosionRangeEnt != null)
|
|
{
|
|
explosionRangeEnt.isDestroyEnt = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|