Beispiel #1
0
        private void LoadEnemies()
        {
            foreach (var path in EnemiesPath)
            {
                EnemyContainer obj = Resources.Load <EnemyContainer>(path);

                if (EnemyContainers.ContainsKey(obj.name))
                {
                    throw new System.Exception($"存在重名文件{obj.name}!");
                }

                EnemyContainers.Add(obj.name, obj);
            }
        }
Beispiel #2
0
 public EnemyContainer GetEnemyContainer(string name)
 {
     return(EnemyContainers.ContainsKey(name) ? EnemyContainers[name] : null);
 }