mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 17:26:03 +08:00
18 lines
406 B
C#
18 lines
406 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using DG.Tweening;
|
|
|
|
public class DOJumpRigidbody2D : MonoBehaviour
|
|
{
|
|
public Rigidbody r3D;
|
|
public Rigidbody2D r2D;
|
|
|
|
IEnumerator Start()
|
|
{
|
|
yield return new WaitForSeconds(1);
|
|
|
|
r3D.DOJump(new Vector3(5f, 0, 0), 3f, 2, 2f, false);
|
|
r2D.DOJump(new Vector2(5f, 0), 3f, 2, 2f, false);
|
|
// r2D.transform.DOJump(new Vector2(5f, 0), 3f, 2, 2f, false);
|
|
}
|
|
} |