public async Task AddEventAsync(CprEvent cprEvent) { cprEvents.Add(new CprEventListViewModel { Time = DateTime.Now, CprEvent = cprEvent }); await this.hubContext.Clients.All.SendAsync("RefreshData"); }
public async Task <IActionResult> PostEvent([FromBody] CprEvent cprEvent) { if (this.eventService.RejectEventsMode) { return(Problem("Event receiver is in reject mode. Flip the switch to accept events")); } await this.eventService.AddEventAsync(cprEvent); return(Ok()); }
public override void OnEvent(CprEvent evnt) { BoltEntity target = evnt.TargEnt; target.gameObject.GetComponentInChildren<CprScript> ().ress (); target.gameObject.GetComponentInChildren<TestPlayerBehaviour>().animation.Play("M_Idle"); }