public CellTween AddTween(Transform targetObject, Vector3Int startCellPos, Vector3Int endCellPos, float duration, bool replaceIfTransformExists = false) { var tween = new CellTween(targetObject, startCellPos, endCellPos, Time.time, duration); AddTween(tween, replaceIfTransformExists); return(tween); }
public void ResetState() { tween = null; tweener.FlushTweens(); transform.position = InitialWorldPos; CurrentCellPos = GhostManager.Instance.LevelGrid.WorldToCell(InitialWorldPos); TargetCellPos = CurrentCellPos; animator.SetTrigger("StandStill"); }
void TweenToTargetCell(float durationMultiplier = 1) { tween = tweener.AddTween(transform, CurrentCellPos, TargetCellPos, timeToTravelGridSize * durationMultiplier, true); }
void TweenToTargetCell() { tween = PlayerManager.Instance.Tweener.AddTween(transform, CurrentCellPos, TargetCellPos, timeToTravelGridSize, true); }
void TweenToTargetCell() { tween = tweener.AddTween(transform, currentCellPos, targetCellPos, timeToTravelGridSize, true); }