public static void Register(Type type)
        {
            var key = GetModelKey(type);

            if (key.IsNullOrEmpty())
            {
                throw new HxException($"{type.AssemblyQualifiedName} 没有找到ModelKey定义");
            }
            if (Schemes.ContainsKey(key))
            {
                throw new HxException($"ModelKey 存在重复定义:{key}");
            }
            var scheme = GridCreator.Create(type);

            Schemes.TryAdd(key, scheme);
        }
示例#2
0
 private void Start()
 {
     _cells = Creator.Create();
     Creator.CreateCubes(_cells);
 }
示例#3
0
 private void Fill(int gridDimension)
 {
     Clear();
     _gridCreator.Create(gridDimension);
     _holes = CreateHoles(gridDimension);
 }