2022-03-02 19:46:33 -08:00
|
|
|
|
namespace QSB.QuantumSync.WorldObjects;
|
|
|
|
|
|
|
|
|
|
internal class QSBQuantumShuffleObject : QSBQuantumObject<QuantumShuffleObject>
|
2021-01-01 10:17:35 +00:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
public override void SendInitialState(uint to)
|
2021-01-01 10:17:35 +00:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
base.SendInitialState(to);
|
2022-01-25 21:08:04 -08:00
|
|
|
|
|
2022-03-02 19:46:33 -08:00
|
|
|
|
// todo SendInitialState
|
|
|
|
|
}
|
2022-01-25 21:08:04 -08:00
|
|
|
|
|
2022-03-02 19:46:33 -08:00
|
|
|
|
public void ShuffleObjects(int[] indexArray)
|
|
|
|
|
{
|
|
|
|
|
var shuffledObjects = AttachedObject._shuffledObjects;
|
|
|
|
|
var localPositions = AttachedObject._localPositions;
|
|
|
|
|
for (var i = 0; i < shuffledObjects.Length; i++)
|
2021-01-26 14:07:17 +00:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
shuffledObjects[i].localPosition = localPositions[indexArray[i]];
|
2021-01-01 10:17:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-01-26 14:07:17 +00:00
|
|
|
|
}
|