mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
22 lines
548 B
C#
22 lines
548 B
C#
namespace QSB.QuantumSync.WorldObjects
|
|
{
|
|
internal class QSBQuantumShuffleObject : QSBQuantumObject<QuantumShuffleObject>
|
|
{
|
|
public override void SendInitialState(uint to)
|
|
{
|
|
base.SendInitialState(to);
|
|
|
|
// todo SendResyncInfo
|
|
}
|
|
|
|
public void ShuffleObjects(int[] indexArray)
|
|
{
|
|
var shuffledObjects = AttachedObject._shuffledObjects;
|
|
var localPositions = AttachedObject._localPositions;
|
|
for (var i = 0; i < shuffledObjects.Length; i++)
|
|
{
|
|
shuffledObjects[i].localPosition = localPositions[indexArray[i]];
|
|
}
|
|
}
|
|
}
|
|
} |