修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections;
using UnityEngine;
using Obi;
public class RuntimeRopeGeneratorUse : MonoBehaviour
{
public ObiCollider pendulum;
RuntimeRopeGenerator rg;
public IEnumerator Start()
{
rg = new RuntimeRopeGenerator();
// Create a rope:
yield return rg.MakeRope(transform,Vector3.zero,1);
// Add a pendulum (you should adjust the attachment point depending on your particular pendulum object)
rg.AddPendulum(pendulum,Vector3.up*0.5f);
}
public void Update(){
if (Input.GetKey(KeyCode.W)){
rg.ChangeRopeLength(- Time.deltaTime);
}
if (Input.GetKey(KeyCode.S)){
rg.ChangeRopeLength( Time.deltaTime);
}
}
}