public override void OnEnable() { var coco_ = (IEnumerator)PrivateUtilities.callPrivateMethod(stateTransceiver, "PostFixedUpdateCoroutine"); PrivateUtilities.setPrivateField(stateTransceiver, "coco_", coco_); transceiver.StartCoroutine(coco_); }
public override void use(ClientPlayerInfo p, string message) { var clientLogic = G.Sys.PlayerManager_.GetComponent <ClientLogic>(); if (clientLogic == null) { MessageUtilities.sendMessage(p, "Error : Client logic null !"); return; } try { var client = clientLogic.GetLocalPlayerInfo(); var oldName = client.Username_; PrivateUtilities.setPrivateField(client, "username_", message); MessageUtilities.sendMessage(p, oldName + " renamed to " + client.Username_); } catch (Exception e) { Console.WriteLine(e); MessageUtilities.sendMessage(p, "Error : can't change your name !"); } }
public override void Awake() { // Do RigidbodyStateTransceiver Awake PrivateUtilities.setPrivateField(stateTransceiver, "rigidbody_", transceiver.GetComponent <Rigidbody>()); PrivateUtilities.setPrivateField(stateTransceiver, "setPositionImmediate_", true); // Do NetworkStateTransceiverGeneric Awake PrivateUtilities.setPrivateField(stateTransceiver, "buffer_", new Distance::SortedCircularBuffer <Distance::RigidbodyStateTransceiver.Snapshot>(32)); stateTransceiver.Clear(); }
public override void Awake() { // Do CarStateTransceiver Awake CarLogicBridge = new CarLogicBridge(); PrivateUtilities.setPrivateField(stateTransceiver, "carLogic_", CarLogicBridge); PrivateUtilities.setPrivateField(stateTransceiver, "mode_", new GameModeBridge()); // Do NetworkStateTransceiverGeneric Awake PrivateUtilities.setPrivateField(stateTransceiver, "buffer_", new Distance::SortedCircularBuffer <Distance::CarDirectives>(32)); stateTransceiver.Clear(); }