public void VisitDebugConfig() { //Init args DebugConfig debugConfig = new DebugConfig() { IfStart = true }; //Expectations List <string> expectedArgs = new List <string>() { "s3://elasticmapreduce/libs/state-pusher/0.1/fetch" }; //Init visitor BuildRequestVisitor visitor = new BuildRequestVisitor(BuildRequestVisitorTest.GetSettings()); VisitorSubscriber visitorSubscriber = new VisitorSubscriber(visitor); //Action debugConfig.Accept(visitor); //Verify Assert.AreEqual(1, visitorSubscriber.TotalObjCount, "Unexpected number of objects created"); StepConfig actual = visitorSubscriber.stepList[0]; Assert.AreEqual("Start debugging", actual.Name, "Unexpected Name"); Assert.AreEqual(ActionOnFailure.CONTINUE, actual.ActionOnFailure, "Unexpected ActionOnFailure"); Assert.AreEqual("s3://elasticmapreduce/libs/script-runner/script-runner.jar", actual.HadoopJarStep.Jar, "Unexpected Jar"); Assert.IsNull(actual.HadoopJarStep.MainClass, "Unexpected MainClass"); Assert.IsTrue(expectedArgs.SequenceEqual(actual.HadoopJarStep.Args), "Unexpected args list"); }
public GUIStyle fontStyle; //!< for the font /** * Use this for initialization * Finds the debugger and populates all the text representations of values */ void Start() { debugConfig = gameObject.GetComponent <DebugConfig>(); // find a reference to the script on the debugger // get values from the debugger for the variables speed = "" + debugConfig.NutrientSpeed; // populate the string representation of speed spawnTime = "" + debugConfig.NutrientSpawnInterval; // populate the string representation of spawnTime towerBaseCost = "" + debugConfig.TOWER_BASE_COST; // populate the string representation of towerBaseCost towerLvl1Cost = "" + debugConfig.TOWER_UPGRADE_LEVEL_1_COST; // populate the string representation of towerLvl1Cost towerLvl2Cost = "" + debugConfig.TOWER_UPGRADE_LEVEL_2_COST; // populate the string representation of towerLvl2Cost towerLvl1Targets = "" + debugConfig.level1Targets; // populate the string representation of towerLvl1Targets towerLvl2Targets = "" + debugConfig.level2Targets; // populate the string representation of towerLvl2Targets towerBaseCD = "" + debugConfig.BaseCooldown; // populate the string representation of towerBaseCD towerLvl1CD = "" + debugConfig.Level1Cooldown; // populate the string representation of towerLvl1CD towerLvl2CD = "" + debugConfig.Level2Cooldown; // populate the string representation of towerLvl2CD waveTimer = "" + debugConfig.waveTimer; // populate the string representation of waveTimer waveDelay = "" + debugConfig.waveDelay; // populate the string representation of waveDelay minBlobs = "" + debugConfig.minBlobs; // populate the string representation of minBlobs maxBlobs = "" + debugConfig.maxBlobs; // populate the string representation of maxBlobs colors = ""; // for populating the colors string represenation if (debugConfig.colors.Contains(Color.red)) { colors += "R"; } if (debugConfig.colors.Contains(Color.yellow)) { colors += "Y"; } if (debugConfig.colors.Contains(Color.green)) { colors += "G"; } }
static void Main(string[] args) { var screen = new ScreenConfig(8, 8); var debug = new DebugConfig(updateTime: 0.15f, maxLogSize: 20); var config = ConfigurationLoader.Load(ArgumentSet.Parse(args)); var root = new CompositionRoot( screen, debug, config, () => new ReadConsoleReadInputSystem(), new Func <ISystem>[] { () => new ConsoleTriggerSystem(debug), () => new ConsoleClearSystem(), () => new ConsoleRenderSystem(screen), () => new ConsoleLogSystem() }, () => new FinishFrameRealTimeSystem(), () => new DeviceRenderSystem(screen, new DeviceRenderConfig(172))); var(entities, systems) = root.Create(); systems.Init(entities); systems.UpdateLoop(entities); Console.WriteLine($"Your score is: {entities.GetFirstComponent<ScoreState>()?.TotalScore}"); Console.WriteLine($"Time: {entities.GetFirstComponent<TimeState>().UnscaledTotalTime:0.00}"); if (config.IsReplayRecord) { var replay = entities.GetFirstComponent <InputRecordState>(); replay.Save(config.NewReplayPath); } }
public void Draw() { // Draw Editor UI Components this.gridUI.DrawGridOverlay(Systems.camera.posX, Systems.camera.posY, this.scene.xCount, this.scene.yCount); this.DrawCurrentGridSquare(); this.utilityBar.Draw(); this.scroller.Draw(); this.weMenu.Draw(); if (Cursor.MouseY > 75) { this.statusText.Draw(); } // Coordinate Tracker Systems.fonts.counter.Draw(Cursor.MiniGridX + ", " + Cursor.MiniGridY, 12, 5, Color.White); // Zone Counter (Which Zone) Systems.fonts.counter.Draw("Zone #" + this.scene.campaign.zoneId.ToString(), Systems.screen.viewWidth - (byte)WorldmapEnum.TileWidth - 184, 5, Color.White); // Debug Render if (DebugConfig.Debug) { DebugConfig.DrawDebugNotes(); } }
protected override void SetupConfig(IDictionary <FrameworkSetting, object> defaultOverrides) { if (!defaultOverrides.ContainsKey(FrameworkSetting.ExecutionMode)) { defaultOverrides.Add(FrameworkSetting.ExecutionMode, ExecutionMode.SingleThread); } base.SetupConfig(defaultOverrides); DebugConfig.Set(DebugSetting.BypassFrontToBackPass, true); }
public void Visit(DebugConfig debugConfig) { this.CreateStepConfig( Resources.DebugStepName, Resources.DebugStepJarPath, ActionOnFailure.CONTINUE, new List <String>() { Resources.DebugStepArg }); }
void Start() { quaternion = transform.rotation; quaternion.Duration = .5f; // get the debug config unless we are in the small intestine tutorial if (Application.loadedLevelName != "SmallIntestineTutorial") { debugConfig = ((GameObject)GameObject.Find("Debug Config")).GetComponent <DebugConfig>(); } }
private void toolStripButtonSendEmail_Click(object sender, EventArgs e) { var model = new FormSendEmailConfigData.EmailModelData(); model.HtmlContent = this.textBoxHtmlContent.Text; model.TextContent = this.textBoxTextContent.Text; model.Title = this.textBoxSubject.Text; bool ok = false; int emailsSent = 0; try { using (DebugConfig.SetDebug(this.toolStripButtonDEBUG.Checked)) { var checkedIndices = this.checkedListBoxClients.CheckedIndices.Cast <int>().ToArray(); for (int it = 0; it < checkedIndices.Length; it++) { var checkedItemIndex = checkedIndices[it]; var checkedItem = this.checkedListBoxClients.Items[checkedItemIndex]; var user = ((EmailData)checkedItem).ObjectData as User; if (user != null) { var toAddress = new MailAddress(user.Person.Email, user.Person.FullName); var subject = ProcessTemplate(model.Title, checkedItem, false); var bodyText = ProcessTemplate(model.TextContent, checkedItem, false); var bodyHtml = ProcessTemplate(model.HtmlContent, checkedItem, true); var emailMessage = EmailHelper.CreateEmailMessage(toAddress, subject, bodyText, bodyHtml); EmailHelper.SendEmail(emailMessage); emailsSent++; if (!this.toolStripButtonDEBUG.Checked) { this.checkedListBoxClients.SetItemChecked(checkedItemIndex, false); } } } } ok = true; } catch { } if (ok) { MessageBox.Show("E-mails were sent.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(string.Format("An error has occurred. Sent: {0}", emailsSent), "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private static void DebugSpeed() { string currentIns = ConsoleTrack.GetArgAsString(); ConsoleTrack.PrepareTabLookup(debugSpeedCodes, currentIns, "Assign a debug speed / tick rate that the game runs at."); if (ConsoleTrack.activate) { if (debugSpeedCodes.ContainsKey(currentIns)) { DebugConfig.SetTickSpeed((DebugTickSpeed)debugSpeedCodes[currentIns]); return; } } }
public void SkipDebugConfigIfStartFalse() { //Init args DebugConfig debugConfig = new DebugConfig(); //Init visitor BuildRequestVisitor visitor = new BuildRequestVisitor(BuildRequestVisitorTest.GetSettings()); VisitorSubscriber visitorSubscriber = new VisitorSubscriber(visitor); //Action debugConfig.Accept(visitor); //Verify Assert.IsFalse(visitorSubscriber.wasAnyEventFired, "None of the visitor's events should be fired!"); }
internal void Configure(DebugConfig cfg) { lock (Dispatcher.dispatchersLock) { if (cfg.EnvType != EnvType.Auto) { Dispatcher.EnvType = cfg.EnvType; } if (cfg.Enabled.HasValue) { this.Enabled = cfg.Enabled.Value; } if (cfg.LogFormat != LogFormat.Auto) { this.Output = cfg.LogFormat; } if (cfg.Directory != null && cfg.Directory.Length > 0) { Dispatcher.staticInitDirectory(cfg.Directory); } if (cfg.ErrorPage != null && cfg.ErrorPage.Length > 0) { Dispatcher.staticInitWebErrorPage(cfg.ErrorPage); } if (cfg.Depth != null && cfg.Depth.Value > 0) { Dispatcher.DumpDepth = cfg.Depth.Value; } if (cfg.LogWriteMilisecond != null && cfg.LogWriteMilisecond.Value > 0) { Dispatcher.LogWriteMilisecond = cfg.LogWriteMilisecond.Value; FileLog.InitBackgroundWritingIfNecessary(); } if (cfg.SourceLocation.HasValue) { Dispatcher.SourceLocation = cfg.SourceLocation.Value; } if (cfg.Panels != null && cfg.Panels.Length > 0) { Dispatcher.staticInitWebRegisterPanels(cfg.Panels); } } }
public CompositionRoot( ScreenConfig screen, DebugConfig debug, Configuration config, Func <BaseReadInputSystem> inputSystem, Func <ISystem>[] preRenderSystems, Func <BaseFinishFrameRealTimeSystem> realTimeSystem, Func <BaseRenderSystem> renderSystem) { _screen = screen; _debug = debug; _config = config; _inputSystem = inputSystem; _preRenderSystems = preRenderSystems; _realTimeSystem = realTimeSystem; _renderSystem = renderSystem; _systems = new SystemSet(); }
private const float timer = 2.0f; //!< a timer /** * Use for initialization * Finds debugger and checks if we are using it's values */ void Start() { // make sure we aren't in tutorial if (Application.loadedLevelName != "SmallIntestineTutorial") { // if we aren't in the tutorial get a reference to the debugger debugConfig = ((GameObject)GameObject.Find("Debug Config")).GetComponent <DebugConfig>(); // if we are using the debugger values get the tower base cost from there if (debugConfig.debugActive) { TOWER_BASE_COST = debugConfig.TOWER_BASE_COST; } } m_IsSpawnActive = false; // the spawn active should default to false // find a reference to the current intestine game manager m_GameManager = GameObject.Find("Managers").GetComponent <IntestineGameManager> (); }
private void OnSceneSetData(LoadParcelScenesMessage.UnityParcelScene data) { state = State.WAITING_FOR_INIT_MESSAGES; owner.RefreshLoadingState(); #if UNITY_EDITOR DebugConfig debugConfig = DataStore.i.debugConfig; //NOTE(Brian): Don't generate parcel blockers if debugScenes is active and is not the desired scene. if (debugConfig.soloScene && debugConfig.soloSceneCoords != data.basePosition) { SetSceneReady(); return; } #endif if (owner.isTestScene) { SetSceneReady(); } }
private bool m_CanFire; //!< a flag that says whether a tower can currently fire /** * Use this for initialization * INitializes tower values on spawn */ void Start() { gameObject.layer = LayerMask.NameToLayer("Tower"); // move the tower to the tower layer once placed // make sure we aren't in tutorial if (Application.loadedLevelName != "SmallIntestineTutorial") { // if we aren't in the tutorial get the debugger debugConfig = ((GameObject)GameObject.Find("Debug Config")).GetComponent <DebugConfig>(); if (debugConfig.debugActive) // if we're using the debugger get the costs from there { TOWER_BASE_COST = debugConfig.TOWER_BASE_COST; TOWER_UPGRADE_LEVEL_1_COST = debugConfig.TOWER_UPGRADE_LEVEL_1_COST; TOWER_UPGRADE_LEVEL_2_COST = debugConfig.TOWER_UPGRADE_LEVEL_2_COST; } } m_Cooldown = BaseCooldown; // set the base cooldown m_CurrentCooldown = m_Cooldown; // initialize the cooldown timer m_CanFire = true; // set that the tower can fire m_NutrientManager = GameObject.Find("Managers").GetComponent <NutrientManager>(); // find the nutrient manager m_GameManager = GameObject.Find("Managers").GetComponent <IntestineGameManager>(); // find the game manager }
private IEnumerator LoadConfigs() { // Game Config var debugConfigTextLoader = CreateTextLoader(DebugConfigPath); yield return(debugConfigTextLoader); DebugConfig = new DebugConfig(); DebugConfig = JsonConvert.DeserializeObject <DebugConfig>(debugConfigTextLoader.text); LogProxy.LogLevel = DebugConfig.LogLevel; // Photon Config var photonConfigTextLoader = CreateTextLoader(PhotonConfigPath); yield return(photonConfigTextLoader); var photonConfig = JsonConvert.DeserializeObject <ServerSettings>(photonConfigTextLoader.text); PhotonNetwork.PhotonServerSettings = photonConfig; _stateController.EnterState(GameState.StateName); _loaded = true; }
public void Draw() { // Coins / Gems this.atlas.Draw("Treasure/Gem", 10, 10); Systems.fonts.counter.Draw(this.levelState.coins.ToString(), 65, 10, Color.White); // Timer Systems.fonts.counter.Draw(this.levelState.TimeRemaining.ToString(), Systems.screen.viewWidth - 90, 10, Color.White); // Health & Armor if (Systems.localServer.MyPlayer.character is Character) { CharacterWounds wounds = Systems.localServer.MyCharacter.wounds; byte i = 0; while (i < wounds.Health) { this.atlas.Draw("Icon/HP", 10 + 48 * i, this.bottomRow); i++; } while (i < wounds.Health + wounds.Armor) { this.atlas.Draw("Icon/Shield", 10 + 48 * i, this.bottomRow); i++; } // Power Icons this.powerUI.Draw(); } // Debug Render if (DebugConfig.Debug) { DebugConfig.DrawDebugNotes(); } }
/// <summary> /// Configure Desharp assembly from running application environment and override any XML config settings or automatically detected settings. /// </summary> /// <param name="cfg">Specialized Desharp configuration collection - just create new instance with public fields of that.</param> /// <example> /// <code>Desharp.Debug.Configure(new Desharp.DebugConfig { /// Enabled = true, // enable dumps printing to app output /// Depth = 3, // dumped objects max. depth /// Directory = "~/logs", // file logs directory rel./abs. path /// LogFormat = Desharp.LogFormat.Html, // file logs format - text or html /// ... /// });</code> /// </example> public void Configure(DebugConfig cfg) { Dispatcher.GetCurrent().Configure(cfg); }
public MvcConfig() { Debug = new DebugConfig(); Drone = new DroneConfig(); Site = new SiteConfig(); }
public bool end = false; //!< to remember if we are done reading new waves from a script /** * Use this for initialization * Check if game was loaded properly. If not reload. * Start spawning waves. */ void Start() { level = null; // initially set the reference to null GameObject counter = GameObject.Find("ChooseBackground"); // try to find an instance of the background chooser if (counter != null) // if the counter is not null we can continue as normal with initialization { // if the counter was there we can just get the level level = counter.GetComponent <SmallIntestineLoadLevelCounter> (); } else // if we start the level from the game itself just start at level 0, 1, or 2 appropriately { // this part should only happen if we start the game from the wrong scene in the unity editor // if the counter wasn't there reload properly // this will reload the entire game from the level it was supposed to be loaded from if (Application.loadedLevelName == "SmallIntestineTutorial") { // if we load directly from the tutorial scene, then reload the si game from level 0 PlayerPrefs.SetInt("DesiredSILevel", 0); PlayerPrefs.Save(); Application.LoadLevel("LoadLevelSmallIntestine"); } else if (Application.loadedLevelName == "SmallIntestineOdd") { // if we load directly from the si odd scene, then reload the si game from level 1 PlayerPrefs.SetInt("DesiredSILevel", 1); PlayerPrefs.Save(); Application.LoadLevel("LoadLevelSmallIntestine"); } else if (Application.loadedLevelName == "SmallIntestineEven") { // if we load directly from the si even scene, then reload the game from level 2 PlayerPrefs.SetInt("DesiredSILevel", 2); PlayerPrefs.Save(); Application.LoadLevel("LoadLevelSmallIntestine");; } } // load in the script info if (counter != null) // guard check to prevent this code from executing before the game is reloaded { // start loading in the script loadScript = new LoadScript(); // create a new script loader //if (!level.getTutorial ()) { //if not tutorial waves = loadScript.loadIntestineLevel(level.getLevel(), level.isTutorial(), level.getTutorialNum()); // get the waves for the correct script currentWave = 0; // set the current wave index to 0 waveDelay = waves[0].startDelay; // get the start delay from the first parsed wave waveTime = waves[0].runTime; // get the run time from the first parsed wave SpawnInterval = waves[0].nutrientSpawnInterval; // get the nutrient spawn interval from the first parsed wave speed = waves[0].nutrientSpeed; // get the nutrient speed from the first parsed wave availableColors = waves[0].colors; // get the colors for the first parsed wave minNutrients = waves[0].minBlobs; // get the min blobs for the first parsed wave maxNutrients = waves[0].maxBlobs; // get the max blobs for the first parsed wave m_TimeSinceLastSpawn = 0f; // start the timesincelastspawn variable to 0 } // we don't use debug config in the tutorial level so check that we aren't in the tutorial level before // we look for a reference to the debugger to get the debug script if (Application.loadedLevelName != "SmallIntestineTutorial") { debugConfig = ((GameObject)GameObject.Find("Debug Config")).GetComponent <DebugConfig>(); } }
protected override void SetupConfig(IDictionary <FrameworkSetting, object> gameDefaults) { base.SetupConfig(gameDefaults); DebugConfig.Set(DebugSetting.BypassFrontToBackPass, true); }
public void LoadConfig() { AnnouncementConfigData = new AnnouncementConfig(); BadgeAttrConfigData = new BadgeAttrConfig(); ConstStringConfigData = new ConstStringConfig(); CommonConfig = new CommonConfig(); AttrNameConfigData = new AttrNameConfig(); RoleBaseConfigData2 = new BaseDataConfig2(); AttrDataConfigData = new AttrDataConfig(); TeamLevelConfigData = new TeamLevelConfig(); RoleLevelConfigData = new RoleLevelConfig(); NPCConfigData = new NPCDataConfig(); SkillConfig = new SkillConfig(); GoodsConfigData = new GoodsConfig(); StoreGoodsConfigData = new StoreGoodsConfig(); BaseDataBuyConfigData = new BaseDataBuyConfig(); TaskConfigData = new TaskDataConfig(); AwardPackConfigData = new AwardPackDataConfig(); PractiseConfig = new PractiseConfig(); PracticePveConfig = new PracticePveConfig(); PractiseStepConfig = new PractiseStepConfig(); GameModeConfig = new GameModeConfig(); TrainingConfig = new TrainingConfig(); TattooConfig = new TattooConfig(); EquipmentConfigData = new EquipmentConfig(); TourConfig = new TourConfig(); GuideConfig = new GuideConfig(); FunctionConditionConfig = new FunctionConditionConfig(); RoleShapeConfig = new RoleShapeConfig(); FashionConfig = new FashionConfig(); FashionShopConfig = new FashionShopConfig(); VipPrivilegeConfig = new VipPrivilegeConfig(); pushConfig = new PushConfig(); presentHpConfigData = new PresentHpConfig(); LotteryConfig = new LotteryConfig(); starAttrConfig = new StarAttrConfig(); qualityAttrCorConfig = new QualityAttrCorConfig(); skillUpConfig = new SkillUpConfig(); RankConfig = new RankConfig(); signConfig = new SignConfig(); NewComerSignConfig = new NewComerSignConfig(); FightingCapacityConfig = new FightingCapacityConfig(); BodyInfoListConfig = new BodyInfoListConfig(); BadgeSlotsConfig = new BadgeSlotConfig(); GoodsComposeNewConfigData = new GoodsComposeNewConfig(); SceneConfig = new SceneConfig(); ReboundAttrConfigData = new ReboundAttrConfig(); CareerConfigData = new CareerConfig(); PotientialEffectConfig = new PotientialEffectConfig(); PVPPointConfig = new PVPPointConfig(); WinningStreakAwardConfig = new WinningStreakAwardConfig(); ArticleStrengthConfig = new ArticleStrengthConfig(); PhRegainConfig = new PhRegainConfig(); MatchAchievementConfig = new MatchAchievementConfig(); SpecialActionConfig = new SpecialActionConfig(); StealConfig = new StealConfig(); CurveRateConfig = new CurveRateConfig(); DunkRateConfig = new DunkRateConfig(); AIConfig = new AIConfig(); AttrReduceConfig = new AttrReduceConfig(); qualifyingConfig = new QualifyingConfig(); qualifyingNewConfig = new QualifyingNewConfig(); qualifyingNewerConfig = new QualifyingNewerConfig(); bullFightConfig = new BullFightConfig(); HedgingConfig = new HedgingConfig(); roleGiftConfig = new RoleGiftConfig(); DebugConfig = new DebugConfig(); shootGameConfig = new ShootGameConfig(); MapConfig = new MapConfig(); activityConfig = new ActivityConfig(); trialConfig = new TrialConfig(); gameMatchConfig = new GameMatchConfig(); shootSolutionManager = new ShootSolutionManager(); talentConfig = new TalentConfig(); ladderConfig = new LadderConfig(); matchSoundConfig = new MatchSoundConfig(); matchMsgConfig = new MatchMsgConfig(); MatchPointsConfig = new MatchPointsConfig(); AnimationSampleManager.Instance.LoadXml(); }
public static void SaveState() { string currentIns = ConsoleTrack.GetArgAsString(); ConsoleTrack.PrepareTabLookup(autoSave, currentIns, "Save the level state to a macro key."); if (ConsoleTrack.activate) { // Get My Character Character character = (Character)Systems.localServer.MyCharacter; if (character == null) { return; } // Get Macro Strings string headStr = character.head is Head ? "head " + character.head.subStr + " " + character.head.subStr + " | " : ""; string suitStr = character.suit is Suit ? "suit " + character.suit.baseStr + " " + character.suit.subStr + " | " : ""; string hatStr = "hat " + (character.hat is Hat ? character.hat.subStr : "none") + " | "; string mobStr = "power mobility " + (character.mobilityPower is PowerMobility ? character.mobilityPower.subStr : "none") + " | "; string attStr = "power " + (character.attackPower is PowerAttack ? character.attackPower.baseStr + " " + character.attackPower.subStr : "none") + " | "; string healthStr = "health " + character.wounds.Health + " | "; string armorStr = "armor " + character.wounds.Armor + " | "; // Get the macro substring: string macroStr = headStr + suitStr + hatStr + mobStr + attStr + healthStr + armorStr + " move room " + character.room.roomID + " " + character.posX + " " + character.posY; DebugConfig.AddDebugNote(macroStr); // Apply the macro to the appropriate function: if (currentIns == "f1") { Systems.settings.input.macroF1 = macroStr; } else if (currentIns == "f2") { Systems.settings.input.macroF2 = macroStr; } else if (currentIns == "f3") { Systems.settings.input.macroF3 = macroStr; } else if (currentIns == "f4") { Systems.settings.input.macroF4 = macroStr; } else if (currentIns == "f5") { Systems.settings.input.macroF5 = macroStr; } else if (currentIns == "f6") { Systems.settings.input.macroF6 = macroStr; } else if (currentIns == "f7") { Systems.settings.input.macroF7 = macroStr; } else if (currentIns == "f8") { Systems.settings.input.macroF8 = macroStr; } else { return; } // Save the macro into the new settings. Systems.settings.input.SaveSettings(); } }
public ConsoleTriggerSystem(DebugConfig debug) { _debug = debug; }
public DebugState Init(DebugConfig config) { _config = config; return(this); }
private float timeleft; //!< Left time for current interval void Start() { debugConfig = ((GameObject)GameObject.Find("Debug Config")).GetComponent <DebugConfig> (); // find the debugger since // we enable frame rate display with that timeleft = updateInterval; }