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

21 lines
531 B
C#
Raw Normal View History

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-03-02 19:46:33 -08:00
// todo SendInitialState
}
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
}