public void MoveStraightByTime(Vector3 end, float time, bool keeFace, bool keepAni) { isPathfinding = true; GOEEntityMoveToDirect move = this.AddComponent <GOEEntityMoveToDirect>(); move.EndPos = end; move.MaxTime = time; move.StartPos = Position; }
internal override void OnTrigger() { base.OnTrigger(); List <Entity> listTarget = this.EntityAct.TargetList; if (listTarget.Count > 0) { target = listTarget[0]; move = target.AddComponent <GOEEntityMoveToDirect>(); move.MaxTime = MoveTime; move.StartPos = target.Position; move.EndPos = EntityAct.TargetPos; } }
public void RestartMove() { GOEEntityMoveTo mt = this.GetComponent <GOEEntityMoveTo>(); if (mt != null) { mt.RestartMove(); } GOEEntityMoveToDirect md = this.GetComponent <GOEEntityMoveToDirect>(); if (md != null) { md.Restart(); } }
public void PauseMove() { GOEEntityMoveTo mt = this.GetComponent <GOEEntityMoveTo>(); if (mt != null) { mt.PauseMove(); } GOEEntityMoveToDirect md = this.GetComponent <GOEEntityMoveToDirect>(); if (md != null) { md.Pause(); } }