Upload from upload_mods.ps1
This commit is contained in:
48
Scripts/Network/NetPackageSetScenarioDisplay.cs
Normal file
48
Scripts/Network/NetPackageSetScenarioDisplay.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
public class NetPackageSetScenarioDisplay : NetPackage
|
||||
{
|
||||
private int displayToUpdate;
|
||||
private bool value;
|
||||
|
||||
public NetPackageSetScenarioDisplay Setup(int _displayToUpdate, bool _value)
|
||||
{
|
||||
this.displayToUpdate = _displayToUpdate;
|
||||
this.value = _value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override void read(PooledBinaryReader _br)
|
||||
{
|
||||
this.displayToUpdate = _br.ReadInt32();
|
||||
this.value = _br.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void write(PooledBinaryWriter _bw)
|
||||
{
|
||||
base.write(_bw);
|
||||
_bw.Write(this.displayToUpdate);
|
||||
_bw.Write(this.value);
|
||||
}
|
||||
|
||||
public override int GetLength()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override void ProcessPackage(World _world, GameManager _callbacks)
|
||||
{
|
||||
//Log.Out("NetPackageSetScenarioDisplay-ProcessPackage START");
|
||||
if (_world == null)
|
||||
{
|
||||
//Log.Out("NetPackageSetScenarioDisplay-ProcessPackage 1");
|
||||
return;
|
||||
}
|
||||
|
||||
if (displayToUpdate == 1) // Purge
|
||||
{
|
||||
RebirthVariables.purgeDisplay = this.value;
|
||||
RebirthVariables.purgePrefabName = "";
|
||||
RebirthVariables.purgePrefabPosition = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user