public void getSelectedPlayer(Action<ServerPlayer> onComplete) { var req = new Request(player.connection, Commands.Request_getSelectedPlayer, (o) => { onComplete.Invoke(Server.instance.api.getPlayer((byte)o[0])); }); req.Flush(); }
public void getCameraPosition(Action<Vector3> onComplete) { var req = new Request(player.connection, Commands.Request_getCameraPosition, (o) => { onComplete.Invoke((Vector3)o[0]); }); req.Flush(); }
public void worldToScreenProject(Vector3 position, Action<Vector2> onComplete) { var req = new Request(player.connection, Commands.Request_worldToScreen, (o) => { onComplete.Invoke((Vector2)o[0]); }); req.bpf.Add(position); req.Flush(); }
public void isObjectVisible(Vector3 position, Action<bool> onComplete) { var req = new Request(player.connection, Commands.Request_isObjectVisible, (o) => { onComplete.Invoke((bool)o[0]); }); req.bpf.Add(position); req.Flush(); }