升级obi

This commit is contained in:
2026-01-22 22:08:21 +08:00
parent 120b8cda26
commit 20f14322bc
1067 changed files with 149894 additions and 29583 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(UnityEngine.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);
}
}
}
}