public override void Attached() { CoopSyncGirlPickupToken coopSyncGirlPickupToken = (CoopSyncGirlPickupToken)base.entity.attachToken; if (!CoopPeerStarter.DedicatedHost && BoltNetwork.isServer && coopSyncGirlPickupToken.playerTarget == LocalPlayer.Entity) { return; } girlPickupCoopSync componentInChildren = base.transform.GetComponentInChildren <girlPickupCoopSync>(); if (coopSyncGirlPickupToken.putDown && componentInChildren) { componentInChildren.setGirlPutDownAnimation(coopSyncGirlPickupToken.playerTarget.transform); } }
public override void OnEvent(syncGirlPickup evnt) { if (!this.ValidateSender(evnt, SenderTypes.Any)) { return; } if (evnt.target) { if (evnt.destroyPickup) { BoltNetwork.Destroy(evnt.target); return; } girlPickupCoopSync componentInChildren = evnt.target.GetComponentInChildren <girlPickupCoopSync>(); if (componentInChildren) { if (evnt.syncPutDownAnimation) { componentInChildren.setGirlPutDownAnimation(evnt.playerTarget.transform); } if (evnt.syncPickupAnimation) { componentInChildren.setGirlPickupAnimation(evnt.playerTarget.transform); } if (evnt.toMachine) { componentInChildren.setGirlToMachine(); } if (evnt.disableTrigger) { componentInChildren.disablePickupTrigger(); } if (evnt.enableTrigger) { componentInChildren.enablePickupTrigger(); } } } }