123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- using YooAsset;
- namespace ET.Client
- {
- [Invoke]
- public class GetAllConfigBytes: AInvokeHandler<ConfigComponent.GetAllConfigBytes, Dictionary<Type, byte[]>>
- {
- public override Dictionary<Type, byte[]> Handle(ConfigComponent.GetAllConfigBytes args)
- {
- Dictionary<Type, byte[]> output = new Dictionary<Type, byte[]>();
- HashSet<Type> configTypes = EventSystem.Instance.GetTypes(typeof (ConfigAttribute));
- foreach (Type configType in configTypes)
- {
- var op = YooAssets.GetRawFileAsync(configType.Name);
- output[configType] = op.GetRawBytes();
- Log.Debug($"load config {configType} ok.");
- }
- return output;
- }
- }
-
- [Invoke]
- public class GetOneConfigBytes: AInvokeHandler<ConfigComponent.GetOneConfigBytes, byte[]>
- {
- public override byte[] Handle(ConfigComponent.GetOneConfigBytes args)
- {
-
-
- throw new NotImplementedException("client cant use LoadOneConfig");
- }
- }
- }
|