Example #1
0
    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);
    }
Example #2
0
    public void ResetState()
    {
        tween = null;
        tweener.FlushTweens();

        transform.position = InitialWorldPos;
        CurrentCellPos     = GhostManager.Instance.LevelGrid.WorldToCell(InitialWorldPos);
        TargetCellPos      = CurrentCellPos;

        animator.SetTrigger("StandStill");
    }
Example #3
0
 void TweenToTargetCell(float durationMultiplier = 1)
 {
     tween = tweener.AddTween(transform, CurrentCellPos, TargetCellPos, timeToTravelGridSize * durationMultiplier, true);
 }
Example #4
0
 void TweenToTargetCell()
 {
     tween = PlayerManager.Instance.Tweener.AddTween(transform, CurrentCellPos, TargetCellPos, timeToTravelGridSize, true);
 }
Example #5
0
 void TweenToTargetCell()
 {
     tween = tweener.AddTween(transform, currentCellPos, targetCellPos, timeToTravelGridSize, true);
 }