internal static long CreateBattlefield(EcsRegistrar rgs, IEnumerable <long> battlefieldEntityIds) { var battlefieldId = rgs.CreateEntity(); var battlefieldContainer = new Parts.Container { Description = "battlefield", Tag = Vals.ContainerTag.Battlefield, ItemsAreVisible = true, Preposition = "on" }; battlefieldEntityIds = battlefieldEntityIds ?? new long[] { }; foreach (long entityId in battlefieldEntityIds) { battlefieldContainer.EntityIds.Add(entityId); } rgs.AddPart(battlefieldId, battlefieldContainer); return(battlefieldId); }
internal static long GetEntityFromBlueprint(EcsRegistrar rgs, string blueprintName) { var blueprintJson = File.ReadAllText(_blueprintFolder + blueprintName + _blueprintSuffix); return(rgs.CreateEntity(blueprintJson)); }