public static void GetMain(AnimalDetail detail, MainLua mainLua) { if (detail.animals.Count > 0) { mainLua.AddToQuestTable(BuildAnimalList(detail.animals)); if (detail.animals.Any(animal => animal.target)) { CheckQuestAnimal checkAnimal = new CheckQuestAnimal(mainLua, detail.animalMetadata.objectiveType); mainLua.AddToQuestTable(BuildAnimalTargetList(detail.animals)); mainLua.AddToQStep_Main(QStep_MainCommonMessages.animalTargetMessages); } } }
internal static void GetAnimalAssets(AnimalDetail questDetail, FileAssets fileAssets) { string AniFPKAssetsPath = Path.Combine(animalAssetsPath, "FPK_Files"); string AniFPKDAssetsPath = Path.Combine(animalAssetsPath, "FPKD_Files"); foreach (Animal animal in questDetail.animals) { string animalType = animal.animal; fileAssets.AddFPKFolder(Path.Combine(AniFPKAssetsPath, $"{animalType}_fpk")); fileAssets.AddFPKDFolder(Path.Combine(AniFPKDAssetsPath, $"{animalType}_fpkd")); } }
public static void AddQuestEntities(AnimalDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList) { List <Animal> animals = detail.animals; AnimalMetadata meta = detail.animalMetadata; if (animals.Count() > 0) { foreach (string animalType in AnimalInfo.AnimalTypes) { int typeCount = GetTypeCount(animals, animalType); if (typeCount > 0) { GameObject animalObject = new GameObject(animalType + "_GameObject", dataSet, animalType, typeCount, typeCount); entityList.Add(animalObject); switch (animalType) { case "TppGoat": case "TppNubian": case "TppZebra": TppAnimalParameter animalParam = new TppAnimalParameter(animalObject, GetFirstAnimalOfType(animals, animalType)); animalObject.SetParameter(animalParam); entityList.Add(animalParam); break; case "TppWolf": case "TppJackal": TppWolfParameter wolfParam = new TppWolfParameter(animalObject, GetFirstAnimalOfType(animals, animalType)); animalObject.SetParameter(wolfParam); entityList.Add(wolfParam); break; case "TppBear": TppBearParameter bearParam = new TppBearParameter(animalObject, GetFirstAnimalOfType(animals, animalType)); animalObject.SetParameter(bearParam); entityList.Add(bearParam); break; } } } foreach (Animal animal in animals) { GameObjectLocator locator = new GameObjectLocator(animal.GetObjectName(), dataSet, animal.typeID); Transform transform = new Transform(locator, animal.position); locator.SetTransform(transform); entityList.Add(locator); entityList.Add(transform); switch (animal.typeID) { case "TppGoat": case "TppNubian": case "TppZebra": TppAnimalLocatorParameter animalLocatorParam = new TppAnimalLocatorParameter(locator, animal.count); locator.SetParameter(animalLocatorParam); entityList.Add(animalLocatorParam); break; case "TppWolf": case "TppJackal": TppWolfLocatorParameter wolfLocatorParam = new TppWolfLocatorParameter(locator, animal.count); locator.SetParameter(wolfLocatorParam); entityList.Add(wolfLocatorParam); break; case "TppBear": TppBearLocatorParameter bearLocatorParam = new TppBearLocatorParameter(locator, animal.count); locator.SetParameter(bearLocatorParam); entityList.Add(bearLocatorParam); break; } } } }
public AnimalManager(AnimalDetail detail) : base(detail, visualizer) { }