|
@@ -22,11 +22,14 @@ namespace GameLogic.Combat.CombatTool
|
|
protected CombatController combatController;
|
|
protected CombatController combatController;
|
|
|
|
|
|
private BetterList<CombatHeroEntity> heroDie = new BetterList<CombatHeroEntity>();
|
|
private BetterList<CombatHeroEntity> heroDie = new BetterList<CombatHeroEntity>();
|
|
|
|
+
|
|
private BetterList<CombatHeroEntity> heroDispose = new BetterList<CombatHeroEntity>();
|
|
private BetterList<CombatHeroEntity> heroDispose = new BetterList<CombatHeroEntity>();
|
|
- public CombatHeroEntity playerHeroEntity;
|
|
|
|
|
|
+
|
|
|
|
+ // public CombatHeroEntity playerHeroEntity;
|
|
public Vector3 moveDir = Vector3.forward;
|
|
public Vector3 moveDir = Vector3.forward;
|
|
- public float moveSpeed = 5f;
|
|
|
|
|
|
+ public float moveSpeed = 2f;
|
|
public bool isFlight;
|
|
public bool isFlight;
|
|
|
|
+ private bool _isFlightCameraFinish;
|
|
private float _flightTime;
|
|
private float _flightTime;
|
|
private float _flightAddTime;
|
|
private float _flightAddTime;
|
|
private float _flightCurrTime;
|
|
private float _flightCurrTime;
|
|
@@ -116,24 +119,24 @@ namespace GameLogic.Combat.CombatTool
|
|
|
|
|
|
public Vector3 GetTarget(float d)
|
|
public Vector3 GetTarget(float d)
|
|
{
|
|
{
|
|
- if (playerHeroEntity == null)
|
|
|
|
|
|
+ if (CombatController.currActiveCombat.playerHeroEntity == null)
|
|
{
|
|
{
|
|
return new Vector3(0, 20, 0);
|
|
return new Vector3(0, 20, 0);
|
|
}
|
|
}
|
|
|
|
|
|
- return playerHeroEntity.dotPos + moveDir * d;
|
|
|
|
|
|
+ return CombatController.currActiveCombat.playerHeroEntity.dotPos + moveDir * d;
|
|
}
|
|
}
|
|
|
|
|
|
public void Update(float t)
|
|
public void Update(float t)
|
|
{
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.A))
|
|
if (Input.GetKeyDown(KeyCode.A))
|
|
{
|
|
{
|
|
- CombatController.currActiveCombat.CombatHeroController. Flight(5, -90, 10);
|
|
|
|
|
|
+ CombatController.currActiveCombat.CombatHeroController.Flight(5, -90, 15);
|
|
}
|
|
}
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.D))
|
|
if (Input.GetKeyDown(KeyCode.D))
|
|
{
|
|
{
|
|
- Flight(5, 90, 10);
|
|
|
|
|
|
+ Flight(5, 90, 15);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -159,13 +162,21 @@ namespace GameLogic.Combat.CombatTool
|
|
float flightSpeedCur =
|
|
float flightSpeedCur =
|
|
AnimationCurveManager.Instance.AnimationCurveLibrary.flightSpeedCurve.Evaluate(_flightCurrTime);
|
|
AnimationCurveManager.Instance.AnimationCurveLibrary.flightSpeedCurve.Evaluate(_flightCurrTime);
|
|
moveSpeed = Mathf.Lerp(_flightStartSpeed, _flightSpeed, flightSpeedCur);
|
|
moveSpeed = Mathf.Lerp(_flightStartSpeed, _flightSpeed, flightSpeedCur);
|
|
|
|
+ if (_flightCurrTime > 0.95f&&!_isFlightCameraFinish)
|
|
|
|
+ {
|
|
|
|
+ _isFlightCameraFinish= true;
|
|
|
|
+ CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(70, 1);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (_flightCurrTime >= 1)
|
|
if (_flightCurrTime >= 1)
|
|
{
|
|
{
|
|
moveDir = _flightDir;
|
|
moveDir = _flightDir;
|
|
isFlight = false;
|
|
isFlight = false;
|
|
|
|
+ moveSpeed = 2;
|
|
GObjectPool.Instance.Recycle(_flightFx1);
|
|
GObjectPool.Instance.Recycle(_flightFx1);
|
|
GObjectPool.Instance.Recycle(_flightFx2);
|
|
GObjectPool.Instance.Recycle(_flightFx2);
|
|
- CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(70, 1);
|
|
|
|
|
|
+
|
|
|
|
+ CombatController.currActiveCombat.playerHeroEntity.PlayAnim("idle", true, 0, false, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -192,18 +203,21 @@ namespace GameLogic.Combat.CombatTool
|
|
_flightTime = time;
|
|
_flightTime = time;
|
|
_flightAddTime = 1.0f / time;
|
|
_flightAddTime = 1.0f / time;
|
|
isFlight = true;
|
|
isFlight = true;
|
|
|
|
+ _isFlightCameraFinish = false;
|
|
Quaternion quaternion = Quaternion.Euler(0, jiaoDu, 0);
|
|
Quaternion quaternion = Quaternion.Euler(0, jiaoDu, 0);
|
|
_flightDir = quaternion * moveDir;
|
|
_flightDir = quaternion * moveDir;
|
|
_flightStartDir = moveDir;
|
|
_flightStartDir = moveDir;
|
|
_flightStartSpeed = moveSpeed;
|
|
_flightStartSpeed = moveSpeed;
|
|
_flightSpeed = speed;
|
|
_flightSpeed = speed;
|
|
- CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(80, 1);
|
|
|
|
|
|
+ CombatController.currActiveCombat.playerHeroEntity.PlayAnim("idle2", true, 0, false, 1);
|
|
|
|
+ CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(90, 0.5f);
|
|
GObjectPool.Instance.Recycle(_flightFx1);
|
|
GObjectPool.Instance.Recycle(_flightFx1);
|
|
GObjectPool.Instance.Recycle(_flightFx2);
|
|
GObjectPool.Instance.Recycle(_flightFx2);
|
|
GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx fly qi", delegate(ParticleSystemPool pool)
|
|
GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx fly qi", delegate(ParticleSystemPool pool)
|
|
{
|
|
{
|
|
_flightFx1 = pool;
|
|
_flightFx1 = pool;
|
|
- SpecialDotInfo specialDotInfo = playerHeroEntity.GetSpecialDotInfo("hitpos");
|
|
|
|
|
|
+ SpecialDotInfo specialDotInfo =
|
|
|
|
+ CombatController.currActiveCombat.playerHeroEntity.GetSpecialDotInfo("hitpos");
|
|
pool.own.transform.SetParent(specialDotInfo.targetTran);
|
|
pool.own.transform.SetParent(specialDotInfo.targetTran);
|
|
pool.own.transform.localPosition = Vector3.zero;
|
|
pool.own.transform.localPosition = Vector3.zero;
|
|
});
|
|
});
|
|
@@ -211,7 +225,7 @@ namespace GameLogic.Combat.CombatTool
|
|
{
|
|
{
|
|
_flightFx2 = pool;
|
|
_flightFx2 = pool;
|
|
|
|
|
|
- pool.own.transform.SetParent(playerHeroEntity.GameObject.transform);
|
|
|
|
|
|
+ pool.own.transform.SetParent(CombatController.currActiveCombat.playerHeroEntity.GameObject.transform);
|
|
pool.own.transform.localPosition = Vector3.zero;
|
|
pool.own.transform.localPosition = Vector3.zero;
|
|
});
|
|
});
|
|
}
|
|
}
|