1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using UnityEngine;
- using UnityEngine.AI;
- namespace GameLogic.Combat.Hero.SubStatus
- {
- public class RepelledStatusState : SubStatusBasic
- {
- private float repelledDis;
- private float speed;
- private System.Action callBack;
- private float _currMoveDis;
- private Vector3 dir;
- public RepelledStatusState(Vector3 dir, float repelledDis, float speed, System.Action callBack)
- {
- this.repelledDis = repelledDis;
- this.speed = speed;
- this.callBack = callBack;
- this.dir = dir.normalized;
- _currMoveDis = 0;
- }
- public override string IsGetStateName()
- {
- return CombatHeroStateType.NullState;
- }
- protected override void ProDispose()
- {
- CombatHeroEntity.CombatAIBasic.stateControl.ChangeState(CombatHeroStateType.idle);
- }
- protected override void ProUpdate(float t)
- {
- float addDis = speed * t;
- Vector3 pos= CombatHeroEntity.combatHeroGameObject.transform.position + dir * addDis;
-
- }
- }
- }
|