quantum-space-buddies/QSB/QuantumSync/WorldObjects/QSBQuantumShuffleObject.cs

22 lines
550 B
C#
Raw Normal View History

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