public float OnFire(out FireEventData eventData) { eventData = new FireEventData(this, -1); if (validatedItemIndex != -1) { var cooldown = items[validatedItemIndex].weapon.OnFire(); items[validatedItemIndex].ClearInput(); eventData = new FireEventData(this, validatedItemIndex); return(cooldown); } return(-1.0f); }
private void WebViewControlScriptNotify(FireEventData message) { var bridgeMessage = JsonConvert.DeserializeObject <BridgeMessage>((string)message.JsonData); this.OnMessageReceived(bridgeMessage); }