public static void AddInstance(building obj) { string _key_ = obj.GetKeyInDict(); if (_dict_.ContainsKey(_key_)) { UnityEngine.Debug.LogWarning("在名为building的GDS文件中已经存在: " + _key_); return; } _dict_.Add(_key_, obj); }
public static void Initialize(List <string[]> data) { if (_isInited_) { return; } foreach (var objArr in data) { building _value_ = CreateInstance(objArr); PostProcessor(_value_); string _key_ = _value_.GetKeyInDict(); _dict_.Add(_key_, _value_); } _isInited_ = true; }