示例#1
0
        public void SendEvent(FieldEvent evt)
        {
            if (evt.HasTargetEntity && _fieldEntitiesGuid.TryGetValue(evt.Target, out var ent))
            {
                ent.OnEvent(evt);
                return;
            }

            if (!_ownerDict.TryGetValue(evt.TargetOwner, out var entries))
            {
                return;
            }
            foreach (var entry in entries)
            {
                entry.OnEvent(evt);
            }
        }
示例#2
0
 private void MgSendEvent(FieldEvent evt) => Manager?.SendEvent(evt);