更新obi到7.1

This commit is contained in:
Bob.Song
2025-11-03 11:53:45 +08:00
parent d12e1bc495
commit 7cf7f545bc
1161 changed files with 158924 additions and 37802 deletions

View File

@@ -1,16 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
[RequireComponent(typeof(ObiActor))]
public class AddRandomVelocity : MonoBehaviour {
namespace Obi.Samples
{
[RequireComponent(typeof(ObiActor))]
public class AddRandomVelocity : MonoBehaviour
{
public float intensity = 5;
void Update () {
if (Input.GetKeyDown(KeyCode.Space)){
GetComponent<ObiActor>().AddForce(Random.onUnitSphere*intensity,ForceMode.VelocityChange);
}
}
public float intensity = 5;
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
GetComponent<ObiActor>().AddForce(UnityEngine.Random.onUnitSphere * intensity, ForceMode.VelocityChange);
}
}
}
}