添加了3DText

This commit is contained in:
2025-10-23 11:50:16 +08:00
parent 37ced86e30
commit 30d0d40a52
901 changed files with 11581439 additions and 112 deletions

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FallingObj : MonoBehaviour
{
public float delay;
public Vector3 force;
public void Init(float delay, Vector3 force)
{
this.delay = delay;
this.force = force;
StartCoroutine(Falling());
}
IEnumerator Falling()
{
yield return new WaitForSeconds(delay);
gameObject.AddComponent<MeshCollider>().convex = true;
//gameObject.AddComponent<Rigidbody>().useGravity = false;
gameObject.AddComponent<Rigidbody>().AddForce(force,ForceMode.Impulse);
}
}