protected override void setReferences() { base.setReferences(); // Also checks the current GameObject (as per the current prefab setup) buttonController = GetComponentInChildren <DogBrowserButtonController>(); dogSlots = GetComponentsInChildren <DogSlot>(); database = DogDatabase.GetInstance; }
protected override void fetchReferences() { base.fetchReferences(); database = DogDatabase.GetInstance; EventController.Event(PPEvent.LoadShelter); var dogs = populateAvailableDogs(database); dogShelterProfile.buttonController.Init(dogShelterProfile, dogs); }
public override bool RunTest(out string feedback) { DogDatabase data = DogDatabase.GetInstance; for (int i = 0; i < dogWorldSlots.Length; i++) { dataController.Adopt(data.Dogs[i]); } feedback = "Good job, Joel"; return(true); }
DogSpriteDisplayTool[] displayAllDogs() { DogDatabase data = DogDatabase.GetInstance; int numDogs = data.Dogs.Length; DogDescriptor[] dogs = data.Dogs; DogSpriteDisplayTool[] displays = new DogSpriteDisplayTool[numDogs]; viewParent.sizeDelta = Vector2.one + Vector2.right * numDogs * widthPerDisplay; for (int i = 0; i < numDogs; i++) { displays[i] = addDogToView(dogs[i]); } return(displays); }
protected override void setReferences() { base.setReferences(); if (isSingleton) { dogDatabase = parseDogDatabase(); shop = parseShopDatabase(); gifts = parseGiftDatabase(); tuning = parseTuning(); languages = initLanguages(); shop.Initialize(); gifts.Initialize(); } }
private Dog chooseDog(Dog dogQualities) { Dog appropriateDog = null; DogDatabase database = new DogDatabase(); foreach (Dog currentDog in database.database) { if (checkChildren(dogQualities.GoodWithChildren, currentDog.GoodWithChildren)) if (checkDrools(dogQualities.Drools, currentDog.Drools)) if (dogQualities.Coatlength.Equals(currentDog.Coatlength)) if (checkScalers(dogQualities.ActivityLevel, currentDog.ActivityLevel)) if (checkScalers(dogQualities.SheddingLevel, currentDog.SheddingLevel)) if (checkScalers(dogQualities.GroomingLevel, currentDog.GroomingLevel)) if (checkScalers(dogQualities.IntelligenceLevel, currentDog.IntelligenceLevel)) if (checkSize(dogQualities.Size, currentDog.Size)) appropriateDog = currentDog; } return appropriateDog; }
DogDescriptor[] populateAvailableDogs(DogDatabase database) { DogDescriptor[] dogs; if (tuning.SampleShelterDogsInOrder) { dogs = database.GetInOrderDogList( availableDogPortraits.Length, skipAdopted: true, startIndex: 0, maxMasterIndex: (tuning.ShouldLimitShelterDogs ? tuning.ShelterDogsLimit : int.MaxValue)); } else { dogs = database.GetDailyRandomDogList(availableDogPortraits.Length); } dogs = fillInEmptySlots(dogs); for (int i = 0; i < dogs.Length; i++) { availableDogPortraits[i].Init(dogs[i]); } return(dogs); }
public DogBreed(DogDatabase data) : base(data) { // NOTHING }
public DogTrait(DogDatabase data) : base(data) { }
public PPDescriptor(DogDatabase data) : base(data) { // NOTHING }
public bool AllDogsAdopted(DogDatabase dogDatabase) { return(dogDatabase.Dogs.Length <= AdoptedDogs.Count); }
public virtual void Initialize(DogDatabase data) { this.database = data; }
public PPData(DogDatabase data) { Initialize(data); }
public PPData() { this.database = null; }