{"id":15292744,"url":"https://github.com/joyixir/game-manager","last_synced_at":"2025-09-05T02:38:15.112Z","repository":{"id":57203693,"uuid":"401342530","full_name":"joyixir/game-manager","owner":"joyixir","description":"A simple unity game management system to handle loading a game, its levels and saving the levels data such as score, gained money, level number. Technically its a full game circle. Also it provides enough public Actions for other classes to do things based on game status changes like listening to level finish to send analytics, etc.","archived":false,"fork":false,"pushed_at":"2022-07-15T09:13:58.000Z","size":1068,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-10T06:51:29.893Z","etag":null,"topics":["csharp","game","unity","unity-game-development","unity3d","unitypackage"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joyixir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-30T12:51:51.000Z","updated_at":"2024-10-31T03:09:12.000Z","dependencies_parsed_at":"2022-09-17T15:00:34.478Z","dependency_job_id":null,"html_url":"https://github.com/joyixir/game-manager","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/joyixir/game-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyixir%2Fgame-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyixir%2Fgame-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyixir%2Fgame-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyixir%2Fgame-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joyixir","download_url":"https://codeload.github.com/joyixir/game-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyixir%2Fgame-manager/sbom","scorecard":{"id":535108,"data":{"date":"2025-08-11","repo":{"name":"github.com/joyixir/game-manager","commit":"5b0e0ccdb0223a8ccf8edf4f9fda3f5668bf6143"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 3.2.1 not signed: https://api.github.com/repos/joyixir/game-manager/releases/72072444","Warn: release artifact 3.2.0 not signed: https://api.github.com/repos/joyixir/game-manager/releases/66314581","Warn: release artifact 3.1.0 not signed: https://api.github.com/repos/joyixir/game-manager/releases/52149258","Warn: release artifact 3.0.0 not signed: https://api.github.com/repos/joyixir/game-manager/releases/52125770","Warn: release artifact 2.1.0 not signed: https://api.github.com/repos/joyixir/game-manager/releases/48721948","Warn: release artifact 3.2.1 does not have provenance: https://api.github.com/repos/joyixir/game-manager/releases/72072444","Warn: release artifact 3.2.0 does not have provenance: https://api.github.com/repos/joyixir/game-manager/releases/66314581","Warn: release artifact 3.1.0 does not have provenance: https://api.github.com/repos/joyixir/game-manager/releases/52149258","Warn: release artifact 3.0.0 does not have provenance: https://api.github.com/repos/joyixir/game-manager/releases/52125770","Warn: release artifact 2.1.0 does not have provenance: https://api.github.com/repos/joyixir/game-manager/releases/48721948"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T06:44:21.386Z","repository_id":57203693,"created_at":"2025-08-20T06:44:21.386Z","updated_at":"2025-08-20T06:44:21.386Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703084,"owners_count":25152998,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","game","unity","unity-game-development","unity3d","unitypackage"],"created_at":"2024-09-30T16:26:27.816Z","updated_at":"2025-09-05T02:38:15.061Z","avatar_url":"https://github.com/joyixir.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GameManager\n\n A simple unity game management system to handle loading a game, its levels and saving the levels data such as score, gained money, level number. Technically its a full game circle.\n Also it provides enough public Actions for other classes to do things based on game status changes like listening to level finish to send analytics, etc. \n\n## Features\n\n- Starts, ends, restarts levels\n- Handles level number, score, money, satisfaction\n- Initialization is separated from level start\n- Handles all required actions\n- Tracks number of attempts\n\n\n## Installation\nThere are three ways to use it\n**Keep in mind that this repo is dependent to Unity TMPro**\n\n### Unitypackage\n- Go to the releases section and download the .unitypackage file\n\n\n### PackageManager\n##### Scoped Registry\n**No longer supported(Latest version is 2.1.0)**\n\nTo add Joyixir scope to NPM scopedregistry, add the following to manifest.json\n```json\n{\n    \"scopedRegistries\": [\n      {\n        \"name\": \"npmjs\",\n        \"url\": \"https://registry.npmjs.org/\",\n        \"scopes\": [\n          \"com.joyixir\"\n        ]\n      }\n    ]\n}\n```\n\n##### Install the package\nOpen Window/PackageManager and head to My Registries. Install your desired version of Joyixir/GameManager\n\n### Clone the repo\nYou can just clone the repo and do whatever you like with it. Even to make it better.\nKeep in mind that in order to have the needed dependencies you have to clone using\n```sh\ngit clone --recurse-submodules -j8 https://github.com/joyixir/game-manager.git\n```\n\n\n# Use\n\nCheck the demo folder. \nGenerally, you need to inherit from BaseLevelConfig and BaseLevel.\n\n## LevelConfig\nLevelConfig is the config that you need in order to initialize a level, like player speed, a list of obstacles or road to generate.\n\nThe package supports scene per config types, you just have to set the scene name in the build config when you override from BaseLevelConfig, like this:\n\n```csharp\n// MySceneBasedLevelConfig.cs\npublic override string SceneName =\u003e \"SceneBasedLevelScene\";\n```\nthis way, the LevelManager loads this scene and then starts its level.\nYou can use an empty string in case you want to load your level in the same scene that you have the GameManager GameObject in it. **This method is not recommended specially when you have multiple level type**\n\nAnd lastly, you have to assign the level prefab through its own config.\n\n## Level and LevelManager\n\nLevel is your rules of what the player will do. \nImplementing a logic for calculating satisfaction and what “win” means is mandatory in what you inherited. \nYou will use level config in order to initialize the level. Like instantiating player, then listening to what it does etc.(Check demo)\n\nThe safest way for you is to listen to static actions within LevelManager.\n```csharp\n// LevelManager.cs\npublic static LevelManager Instance;\npublic static Action\u003cLevelData\u003e OnLevelFinish;\npublic static Action OnLevelStart;\npublic static Action OnLevelReady;\npublic static Action\u003cint\u003e OnLevelUnlocked; // Starts from 0\n```\n## What is LevelData?\nThe short answer is the simplified data of ANY kind of levels. Doesn’t matter if a baseball or a shooter, simulation or a runner, every sort of level should be simplified to some general parameters.\nYou will have to implement the below functions within your Level in order to help GameManager, UI, Analytics, Currency .etc to work properly.\n```csharp\n// BaseLevel.cs\nprotected internal override int CalculateEarnedMoney()\n{\n    return 10; // Your estimate\n}\nprotected internal override float CalculateSatisfaction()\n{\n    return .5f; // Your estimate\n}\nprotected internal override int CalculateScore()\n{\n    return 100; // Your estimate\n}\nprotected internal override bool IsWon()\n{\n    return CalculateSatisfaction() \u003e .6f; // Your rules\n}\n```\n\n## LevelData\nThe implemented functions will help BaseLevel to make a LevelData for others to use.\n```csharp\n// BaseLevel.cs\npublic class LevelData\n{\n    public int EarnedMoney;\n    public LevelFinishStatus ForcedStatus;\n    public float Satisfaction;\n    public int Score;\n    public int LevelNumber;\n    public int HumanReadableLevelNumber =\u003e LevelNumber + 1;\n    public bool WinStatus;\n    public int Attempt;\n\n    public static LevelData GenerateFromLevel(BaseLevel level)\n    {\n        var levelData = new LevelData();\n        levelData.EarnedMoney = level.CalculateEarnedMoney();\n        levelData.Score = level.CalculateScore();\n        levelData.WinStatus = level.IsWon();\n        levelData.Satisfaction = level.CalculateSatisfaction();\n        levelData.ForcedStatus = level.ForcedFinishStatus;\n        levelData.LevelNumber = level.LevelNumber;\n        return levelData;\n    }\n}\n```\n\n*\\* We encourage you to use the provided ```public``` and ```public static``` variables and avoid using the ```internal``` ones.*\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyixir%2Fgame-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoyixir%2Fgame-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyixir%2Fgame-manager/lists"}