26 lines
654 B
C#
26 lines
654 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ET
|
|
{
|
|
|
|
[ActorMessageHandler]
|
|
public class C2M_StartPetPlayHandler : AMActorLocationRpcHandler<Unit, C2M_StartPetPlay, M2C_StartPetPlay>
|
|
{
|
|
protected override async ETTask Run(Unit unit, C2M_StartPetPlay request, M2C_StartPetPlay response, Action reply)
|
|
{
|
|
Pet pet = unit.GetComponent<Pet>();
|
|
string ret = pet.Play();
|
|
if (ret != null)
|
|
{
|
|
response.Message = ret;
|
|
reply();
|
|
return;
|
|
}
|
|
reply();
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
|
|
}
|