{"id":20314342,"url":"https://github.com/normandy72/laser-defender","last_synced_at":"2026-05-09T11:38:53.582Z","repository":{"id":153902808,"uuid":"592356658","full_name":"Normandy72/Laser-Defender","owner":"Normandy72","description":"A \"Laser Defender\" game. Complete C# Unity Game Developer 2D.","archived":false,"fork":false,"pushed_at":"2023-01-26T21:03:07.000Z","size":60436,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T12:46:35.148Z","etag":null,"topics":["csharp","csharp-code","game","game-development","gamedev","unity","unity2d","unity2d-game"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Normandy72.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T15:02:01.000Z","updated_at":"2024-04-09T05:20:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ef36d2b-fdbd-45a0-978a-d6888e3db429","html_url":"https://github.com/Normandy72/Laser-Defender","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/Normandy72%2FLaser-Defender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FLaser-Defender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FLaser-Defender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FLaser-Defender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Normandy72","download_url":"https://codeload.github.com/Normandy72/Laser-Defender/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818842,"owners_count":20025208,"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":["csharp","csharp-code","game","game-development","gamedev","unity","unity2d","unity2d-game"],"created_at":"2024-11-14T18:14:52.281Z","updated_at":"2026-05-09T11:38:48.539Z","avatar_url":"https://github.com/Normandy72.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ~ Unity ~\n## Viewport\n* Viewport space represents a normalized position relative to the camera.\n* `ViewportToWorldPoint()` converts a normalized position on the screen to a in 3D position in world space.\n```\n    (0,1) __________ (1,1)\n         |          |\n         |          |\n         |          |\n         |          |\n         |          |\n    (0,0)|__________|(1,0)\n```\n## Parallax Scrolling\n* Multiple image layers scrolling at different speeds.\n* Gives an artificial sense of depth.\n* More layers give more depth.\n\n## Audio in Three Parts\n1. __Audio Listener__ - to \"hear\" the audio.\n2. __Audio Source__ - to \"play\" the audio.\n3. __Audio File__ - the \"sounds\" that get played.\n***\n# ~ C# ~\n## Mathf.Clamp(float value, float min, float max)\n* Clamps the given value between the given minimum float and maximum float values.\n* Returns the given value if it is within the minimum and maximum range.\n    * Returns the minimum value if the given float value is less than the minimum.\n    * Returns the maximum value if the given value is greater than the maximum value.\n* Use Clamp to restrict a value to a range that is defined by the minimum and maximum values.\n* __NOTE:__ if the minimum value is is greater than the maximum value, the method returns the minimum value.\n* Parameters:\n    * __value__ - the floating point value to restrict inside the range defined by the minimum and maximum values;\n    * __min__ - the minimum floating point value to compare against;\n    * __max__ - the maximum floating point value to compare against.\n* Returns float (the float result between the minimum and maximum values).\n## Types of Loop\n#### for loop\nRuns a set number of times.\n```\nfor(int i = 0; i \u003c parent.childCount; i++)\n{\n    // do stuff\n}\n```\n#### foreach loop\nWorks the same as a for loop but doesn't track the iterator.\n```\nforeach(type child in parent)\n{\n    // do stuff\n}\n```\n#### while loop\nRuns continuously while some condition is true.\n```\nwhile(condition == true)\n{\n    // do stuff\n}\n```\n#### do-while loop\nRuns once and then continuously repeats while some condition is true.\n```\ndo\n{\n    // stuff\n}\nwhile(condition == true);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Flaser-defender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormandy72%2Flaser-defender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Flaser-defender/lists"}