{"id":13661522,"url":"https://github.com/Centribo/RPG-Text-System","last_synced_at":"2025-04-25T02:33:35.423Z","repository":{"id":85511695,"uuid":"47433967","full_name":"Centribo/RPG-Text-System","owner":"Centribo","description":"A system for displaying text in Unity like in old RPG games.","archived":false,"fork":false,"pushed_at":"2015-12-20T00:03:38.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-02T05:13:13.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Centribo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-04T23:28:29.000Z","updated_at":"2022-05-19T08:45:14.000Z","dependencies_parsed_at":"2023-03-15T19:01:27.661Z","dependency_job_id":null,"html_url":"https://github.com/Centribo/RPG-Text-System","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Centribo%2FRPG-Text-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Centribo%2FRPG-Text-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Centribo%2FRPG-Text-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Centribo%2FRPG-Text-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Centribo","download_url":"https://codeload.github.com/Centribo/RPG-Text-System/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223979400,"owners_count":17235392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:01:36.379Z","updated_at":"2024-11-10T16:30:51.261Z","avatar_url":"https://github.com/Centribo.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# RPG-Text-System\r\nA system for displaying text in Unity like in old RPG games.\r\n\r\n## Usage\r\n\r\n1. Add TextHandler prefab to your scene.\r\n\t![Screenshot 1](Screenshots/s1.PNG?raw=true \"Screenshot 1\")\r\n2. Or, create a new object and attach the TextHandler script, and a AudioSource in the inspector\r\n\t![Screenshot 2](Screenshots/s2.PNG?raw=true \"Screenshot 2\")\r\n2. Link the \"Text Box\" field in the TextHandler script to a textbox in the scene  \r\n\t![Screenshot 3](Screenshots/s3.PNG?raw=true \"Screenshot 3\")\r\n3. In another script/object, or internally within TextHandler, create a new Voice().\r\n\tVoice() takes 4 parameters for its constructor:\r\n\t\t1. float rate: How time, in seconds, between each character reveal\r\n\t\t2. float low: The pitch of the lowest possible note (Expressed as a pitch coefficient)\r\n\t\t3. float high: The pitch of the highest possible note\r\n\t\t4. AudioClip sound: A reference to a AudioClip to be played when revealing notes. (See Unity documentation)\r\n4. Link the Voice to TextHandler using TextHandler.SetVoice(Voice v)\r\n\t**For example: GetComponent\u003cTextHandler\u003e().SetVoice(new Voice(0.1f, 1, 5, sound));**\r\n5. Give TextHandler an array of strings to display using TextHandler.SetText(string[] newText)\r\n6. Now, call TextHandler.AdvanceLine() to start advancing lines. (By default, this is set to OnMouseUp)\r\n\r\n## Example Scene\r\n\r\nIncluded is a Example.unity scene is included to show how to properly load TextHandler and use it.\r\nWithin TextHandler.cs, Void Start(), uncomment these lines to try it out:\r\n\r\n```\r\nAudioClip sound = Resources.Load(\"bleep\") as AudioClip;\r\nVoice v = new Voice(0.1f, 1, 3, sound);\r\n\r\nstring [] examples = {\"Hello world!\", \"Test text!\"};\r\n\r\nSetVoice(v);\r\nSetText(examples);\r\n```\r\n\r\n## License\r\nCC0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCentribo%2FRPG-Text-System","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCentribo%2FRPG-Text-System","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCentribo%2FRPG-Text-System/lists"}