working on guts and player fpp model
This commit is contained in:
25
Assets/jelycho/Code/Ropes/RopesSpawnerTest.cs
Normal file
25
Assets/jelycho/Code/Ropes/RopesSpawnerTest.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using RebootKit.Engine.Main;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
|
||||
namespace RebootReality.jelycho.Ropes {
|
||||
public class RopesSpawnerTest : MonoBehaviour {
|
||||
[SerializeField] int m_RopesCount = 10;
|
||||
|
||||
void Start() {
|
||||
WorldContext worldContext = RR.World.Context as WorldContext;
|
||||
Assert.IsNotNull(worldContext, "Invalid WorldContext");
|
||||
|
||||
RopesManager ropesManager = worldContext.RopesManager;
|
||||
float3 startPosition = transform.position;
|
||||
|
||||
for (int i = 0; i < m_RopesCount; ++i) {
|
||||
float3 start = startPosition + new float3(i * 1.5f, 0, 0);
|
||||
float3 end = start + new float3(0, 0, 15.0f);
|
||||
|
||||
ropesManager.SpawnRope(start, end, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user