OpenRA.GameRules.WeaponInfo.LoadProjectile C# (CSharp) Method

LoadProjectile() static private method

static private LoadProjectile ( MiniYaml yaml ) : object
yaml MiniYaml
return object
        static object LoadProjectile(MiniYaml yaml)
        {
            MiniYaml proj;
            if (!yaml.ToDictionary().TryGetValue("Projectile", out proj))
                return null;
            var ret = Game.CreateObject<IProjectileInfo>(proj.Value + "Info");
            FieldLoader.Load(ret, proj);
            return ret;
        }