You've already forked taptap2024_GJ_chidouren
updat core
This commit is contained in:
@@ -162,20 +162,34 @@ namespace Game.Component
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public bool HasRunaway => MapContent.Instance?.IsRunaway ?? false;
|
||||
|
||||
public float CurMoveSpeed => this._curMoveSpeedOffset * (this.MaxMoveSpeed *
|
||||
(1 +
|
||||
( this._expTimeHandler?.IsPlaying ?? false
|
||||
? (1 - this._expTimeHandler.CurProgress) * this._expSpeedOffset
|
||||
: 0f)
|
||||
)
|
||||
);
|
||||
public float CurMoveSpeed => (MapContent.Instance?.MoveGlobalOffset ?? 0) * this._curMoveSpeedOffset * (this.MaxMoveSpeed *
|
||||
(1 +
|
||||
( this._expTimeHandler?.IsPlaying ?? false
|
||||
? (1 - this._expTimeHandler.CurProgress) * this._expSpeedOffset
|
||||
: 0f)
|
||||
)
|
||||
);
|
||||
#else
|
||||
public bool HasRunaway => MapContent.Instance.IsRunaway ?? false;
|
||||
|
||||
public float CurMoveSpeed => (MapContent.Instance.MoveGlobalOffset) * this._curMoveSpeedOffset * (this.MaxMoveSpeed *
|
||||
(1 +
|
||||
( this._expTimeHandler?.IsPlaying ?? false
|
||||
? (1 - this._expTimeHandler.CurProgress) * this._expSpeedOffset
|
||||
: 0f)
|
||||
)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
public void ResetState ()
|
||||
{
|
||||
this.transform.position = this.CreatePos;
|
||||
this.AnimState.SetState (EnemyAnimStateType.Idle);
|
||||
EndAttack ();
|
||||
this.UpdateSpeedState (false , false);
|
||||
_curAttackingTime = 0;
|
||||
_curAttackCDTime = 0;
|
||||
@@ -267,10 +281,11 @@ namespace Game.Component
|
||||
|
||||
public void CheckUpdateFsmData (bool isUpdate = false)
|
||||
{
|
||||
isUpdate |= _fsmData.HasAttack != this.HasAttack;
|
||||
isUpdate |= _fsmData.HasSafeArea != this.HasSafeArea;
|
||||
isUpdate |= _fsmData.HasRunaway != this.HasRunaway;
|
||||
isUpdate |= _fsmData.HasActive != MapContent.Instance.IsActiveGame;
|
||||
this._aiLerp.speed = this.CurMoveSpeed;
|
||||
isUpdate |= _fsmData.HasAttack != this.HasAttack;
|
||||
isUpdate |= _fsmData.HasSafeArea != this.HasSafeArea;
|
||||
isUpdate |= _fsmData.HasRunaway != this.HasRunaway;
|
||||
isUpdate |= _fsmData.HasActive != MapContent.Instance.IsActiveGame;
|
||||
|
||||
this._fsmData.HasAttack = HasAttack;
|
||||
this._fsmData.HasSafeArea = HasSafeArea;
|
||||
@@ -294,9 +309,8 @@ namespace Game.Component
|
||||
this._expSpeedOffset = offset;
|
||||
this._expTimeHandler?.Kill ();
|
||||
this._expTimeHandler = GameUpdateMgr.Instance.CreateTimer (duration , null);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void EndAttack ()
|
||||
{
|
||||
this._hasAtkState = false;
|
||||
|
||||
Reference in New Issue
Block a user