using System; using System.Threading.Tasks; using ETModel; namespace ETHotfix { [ActorMessageHandler(AppType.Map)] public class OneFrameMessageHandler: AMActorRpcHandler { protected override async Task Run(Unit unit, OneFrameMessage message, Action reply) { ActorResponse actorResponse = new ActorResponse(); try { Game.Scene.GetComponent().Add(message); reply(actorResponse); } catch (Exception e) { ReplyError(actorResponse, e, reply); } await Task.CompletedTask; } } }