Ejemplo n.º 1
0
 public async Task AddEventAsync(CprEvent cprEvent)
 {
     cprEvents.Add(new CprEventListViewModel {
         Time = DateTime.Now, CprEvent = cprEvent
     });
     await this.hubContext.Clients.All.SendAsync("RefreshData");
 }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public override void OnEvent(CprEvent evnt)
 {
     BoltEntity target = evnt.TargEnt;
     target.gameObject.GetComponentInChildren<CprScript> ().ress ();
     target.gameObject.GetComponentInChildren<TestPlayerBehaviour>().animation.Play("M_Idle");
 }