private void TimeScale(string[] args) { string amount = args[2]; Time.timeScale = float.Parse(amount); CommandLineCore.Print("TimeScale set to " + Time.timeScale); }
private void PrintArgs(string[] args) { foreach (var item in args) { CommandLineCore.Print(item); } }
public void DestroyTag(string[] args) { GameObject[] objsTag = (GameObject.FindGameObjectsWithTag(CommandLineCore.StringWithSpaces(args, 2))); foreach (var item in objsTag) { Destroy(item); } }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.AppendLine("example"); helpMessage.Append("printargs string:messageToPrint"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("timescale float:amount\n"); helpMessage.Append("slowmo float:amount float:duration\n"); helpMessage.Append("devicetime\n"); helpMessage.Append("currenttimescale"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("loadscene int:sceneIndex\n"); helpMessage.Append("reloadscene\n"); helpMessage.Append("loadnextscene\n"); helpMessage.Append("loadpreviousscene\n"); helpMessage.Append("sceneindex"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("call string:methodName string:gameObjectName\n"); helpMessage.Append("callbytag string:methodName string:gameObjectTag\n"); helpMessage.Append("callall string:methodName\n"); helpMessage.Append("destroy string:gameObjectName\n"); helpMessage.Append("destroytag string:gameObjectsTag\n"); helpMessage.Append("instantiate string:pathInAResourcesFolder"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("getint string:key\n"); helpMessage.Append("getfloat string:key\n"); helpMessage.Append("getstring string:key\n"); helpMessage.Append("setint string:keyWithPipes int:value\n"); helpMessage.Append("setfloat string:keyWithPipes float:value\n"); helpMessage.Append("setstring string:keyWithPipes string:value\n"); helpMessage.Append("saveprefs\n"); helpMessage.Append("deleteallprefs"); CommandLineCore.Print(helpMessage.ToString()); }
public virtual void Help() { StringBuilder builder = new StringBuilder(); int counter = 0; foreach (var item in commands) { builder.Append(item.Key); counter++; if (counter < commands.Count) { builder.Append("\n"); } } CommandLineCore.Print(builder.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("position float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("move float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("rotation float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("rotate float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("scale float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("addscale float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("getposition string:gameObjectName\n"); helpMessage.Append("getrotation string:gameObjectName\n"); helpMessage.Append("getscale string:gameObjectName"); CommandLineCore.Print(helpMessage.ToString()); }
private void ChangeTransform(string[] args) { switch (args[1]) { case "position": case "setposition": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.position = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "move": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.position += new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "rotation": case "setrotation": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.eulerAngles = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "rotate": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.Rotate(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "scale": case "setscale": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.localScale = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "addscale": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.localScale += new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "getposition": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.position.ToString()); break; case "getrotation": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.rotation.ToString()); break; case "getscale": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.localScale.ToString()); break; } }
public void Execute(string[] args) { try { string command = args[1].ToLower(); if (args[0].ToLower() == "h" || args[0].ToLower() == "-h" || args[0].ToLower() == "help" || command == "h" || command == "-h" || command == "help") { Help(); } else if (commands.ContainsKey(command)) { commands[command](args); } } catch (System.Exception e) { CommandLineCore.PrintError(e.ToString()); } }
void AppStartup(Object sender, StartupEventArgs e) { ErrorHandlingCore.Init(); CommandLineCore.Init(e); CoreData.Init(); Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; //LoginWindow loginWindow = new LoginWindow(); //if (loginWindow.ShowDialog() != true) //{ // Current.Shutdown(); // return; //} Current.ShutdownMode = ShutdownMode.OnMainWindowClose; MainWindow mainWindow = new MainWindow(); mainWindow.Show(); }
private void SomeMethod(string[] args) { Debug.Log("SomeMethod() was called"); CommandLineCore.Print("This is an example message."); }
public void DestroyObj(string[] args) { Destroy(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2))); }
private void CurrentTimeScale(string[] args) { CommandLineCore.Print("Current TimeScale: " + Time.timeScale); }
private void SetString(string[] args) { PlayerPrefs.SetString(CommandLineCore.StringWithPipes(args[2]), CommandLineCore.StringWithPipes(args[3])); }
public void SceneIndex(string[] args) { CommandLineCore.Print("Current scene index: " + SceneManager.GetActiveScene().buildIndex); }
private void DeviceTime(string[] args) { CommandLineCore.Print(System.DateTime.Now.ToString()); }
public void InstantiateObj(string[] args) { Instantiate(Resources.Load(CommandLineCore.StringWithSpaces(args, 2))); }
private void GetString(string[] args) { CommandLineCore.Print(PlayerPrefs.GetString(CommandLineCore.StringWithPipes(args[2]))); }
private void SaveAll(string[] args) { PlayerPrefs.Save(); CommandLineCore.PrintSuccess("PlayerPrefs successfully saved!"); }
private void SetFloat(string[] args) { PlayerPrefs.SetFloat(CommandLineCore.StringWithPipes(args[2]), float.Parse(args[3])); }
public void CallTag(string[] args) { GameObject objTag = GameObject.FindGameObjectWithTag(CommandLineCore.StringWithSpaces(args, 3)); objTag.SendMessage(args[2]); }
public void Call(string[] args) { GameObject obj = GameObject.Find(CommandLineCore.StringWithSpaces(args, 3)); obj.SendMessage(args[2]); }
private void DeleteAll(string[] args) { PlayerPrefs.DeleteAll(); CommandLineCore.PrintSuccess("All PlayerPrefs were successfully deleted!"); }