public ISpreadProcessor CreateSpreadProcessor(SpreadLogicConfig config) { if (config is FixedSpreadLogicConfig) { return(new FixedSpreadProcessor()); } else if (config is PistolSpreadLogicConfig) { return(new PistolSpreadProcessor()); } else if (config is SniperSpreadLogicConfig) { return(new SniperSpreadProcessor()); } else if (config is RifleSpreadLogicConfig) { return(new RifleSpreadProcessor()); } return(null); }
public ISpreadLogic CreateSpreadLogic(SpreadLogicConfig config, CommonFireConfig common) { if (config is FixedSpreadLogicConfig) { return(new FixedSpreadLogic(config as FixedSpreadLogicConfig)); } else if (config is PistolSpreadLogicConfig) { return(new PistolSpreadLogic(config as PistolSpreadLogicConfig)); } else if (config is SniperSpreadLogicConfig) { return(new SniperSpreadLogic(config as SniperSpreadLogicConfig)); } else if (config is RifleSpreadLogicConfig) { return(new RifleSpreadLogic(config as RifleSpreadLogicConfig)); } return(null); }
public ISpreadLogic CreateSpreadLogic(SpreadLogicConfig config) { if (config is FixedSpreadLogicConfig) { return(new FixedSpreadLogic()); } else if (config is PistolSpreadLogicConfig) { return(new PistolSpreadLogic()); } else if (config is SniperSpreadLogicConfig) { return(new SniperSpreadLogic(_contexts)); } else if (config is RifleSpreadLogicConfig) { return(new RifleSpreadLogic()); } return(null); }