Upload from upload_mods.ps1
This commit is contained in:
41
Scripts/Network/NetPackageEntityPrimeDetonatorRebirth.cs
Normal file
41
Scripts/Network/NetPackageEntityPrimeDetonatorRebirth.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
public class NetPackageEntityPrimeDetonatorRebirth : NetPackage
|
||||
{
|
||||
public NetPackageEntityPrimeDetonatorRebirth Setup(EntityZombieCopRebirth entity)
|
||||
{
|
||||
this.id = entity.entityId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override void read(PooledBinaryReader _br)
|
||||
{
|
||||
this.id = _br.ReadInt32();
|
||||
}
|
||||
|
||||
public override void write(PooledBinaryWriter _bw)
|
||||
{
|
||||
base.write(_bw);
|
||||
_bw.Write(this.id);
|
||||
}
|
||||
|
||||
public override void ProcessPackage(World _world, GameManager _callbacks)
|
||||
{
|
||||
if (_world == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EntityZombieCopRebirth entityZombieCop = _world.GetEntity(this.id) as EntityZombieCopRebirth;
|
||||
if (entityZombieCop == null)
|
||||
{
|
||||
Log.Out("Discarding " + base.GetType().Name);
|
||||
return;
|
||||
}
|
||||
entityZombieCop.PrimeDetonator();
|
||||
}
|
||||
|
||||
public override int GetLength()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
private int id;
|
||||
}
|
||||
Reference in New Issue
Block a user