private void OnMoveAnimationEmpty(object sender, EventArgs args) { MoveDone?.Invoke(this, EventArgs.Empty); if (!_timer.IsEnabled) { _timer.Start(); } }
private void UpdatePosition(Vector2 direction, float displacement, int frameCount = -1) { character.transform.position += (Vector3)direction * displacement; frameCount--; if (frameCount > 0) { LeanTween.delayedCall(Time.deltaTime, () => { UpdatePosition(direction, displacement, frameCount); }); } else { MoveDone?.Invoke(); MoveDone = null; } }
internal void MoveResponse(MoveResponse status) { //fire the event MoveDone?.Invoke(_arm, new DataEventArg <MoveResponse>(status)); }
public void Move(Move move) { MoveDone?.Invoke(this, move); }
protected void OnMoveDone(Move move) => MoveDone?.Invoke(move);
public void SetMoveDone(MoveDone func) { CallWhenMoveDone = func; }