private GBLXAPI gblxapi; // could use GBLXAPI.Instance instead. // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ public void Start() { // add GBLXAPI this.gblxapi = GBLXAPI.Instance; // GBLXAPI.IsActive() -- now true /* * calling init() sets up the DoNotDestroyOnLoad Singleton object for GBLxAPI. * Use IsInit() to check for pre-existing instances before any calls to init(), * because re-initializing will destroy any statements in the pending-to-send queue. */ if (!this.gblxapi.IsInit()) { this.gblxapi.init(GBL_Interface.lrsURL, GBL_Interface.lrsUser, GBL_Interface.lrsPassword, GBL_Interface.standardsConfigDefault, GBL_Interface.standardsConfigUser); } //this.gblxapi.useDefaultCallback = true; this.gblxapi.debugStatement = true; this.gblxapi.ResetDurationSlot((int)GBL_Interface.durationSlots.Application); // using slot 0 to track time // add listeners this.clearButton.onClick.AddListener(delegate { clearButtonClicked(); }); this.submitButton.onClick.AddListener(delegate { submitButtonClicked(); }); this.hashButton.onClick.AddListener(delegate { hashButtonClicked(); }); // text box this.statementText.text = ""; }
private void Awake() { GBLXAPI.Init(new GBLConfig()); GBLXAPI.debugMode = true; GBLXAPI.Timers.ResetSlot(0); }
// TODO: Fold in enqueue better // TODO: Return type? public void Enqueue(Action <string, bool, string> sendCallback = null) { GBLXAPI.EnqueueStatement(Build(), sendCallback); }