Example #1
0
 /// <summary>
 /// Loads default color ranges
 /// </summary>
 private void GetReferenceColors()
 {
     FurnaceIconOrange = RGBHSBRangeFactory.FurnaceIconOrange();
     BankIconDollar    = RGBHSBRangeFactory.BankIconDollar();
     BuildingFloor     = RGBHSBRangeFactory.PhasmatysBuildingFloorLight();
     Furnace           = RGBHSBRangeFactory.Furnace();
     BankBooth         = RGBHSBRangeFactory.BankBoothPhasmatys();
 }
Example #2
0
        /// <summary>
        /// Determines an appropriate value to use for building floor color range
        /// </summary>
        protected bool ScanForBuildingFloor()
        {
            List <RGBHSBRange> colorRanges = new List <RGBHSBRange>()
            {
                RGBHSBRangeFactory.PhasmatysBuildingFloorDark(), RGBHSBRangeFactory.PhasmatysBuildingFloorLight()
            };
            Blob  bankIcon, bankFloor, furnaceIcon, furnaceFloor;
            Point offset;

            foreach (RGBHSBRange colorRange in colorRanges)
            {
                if (BankLocation(out bankIcon, out bankFloor, out offset, colorRange) && (bankFloor != null) && BankFloorSizeCheck(bankFloor.Size) &&
                    FurnaceLocation(out furnaceIcon, out furnaceFloor, out offset, colorRange) && (furnaceFloor != null) && FurnaceFloorSizeCheck(furnaceFloor.Size))
                {
                    BuildingFloor = colorRange;
                    return(true);
                }
            }
            return(false);
        }