├── .config └── dotnet-tools.json ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .releaserc.json ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── Assets ├── Example.meta └── Example │ ├── Image.meta │ ├── Image │ ├── Square.png │ ├── Square.png.meta │ ├── agate_logo.png │ └── agate_logo.png.meta │ ├── Scene.meta │ ├── Scene │ ├── Home.unity │ ├── Home.unity.meta │ ├── Idle.unity │ ├── Idle.unity.meta │ ├── Splash.unity │ └── Splash.unity.meta │ ├── Script.meta │ └── Script │ ├── Boot.meta │ ├── Boot │ ├── GameMain.cs │ ├── GameMain.cs.meta │ ├── SceneLauncher.cs │ ├── SceneLauncher.cs.meta │ ├── SceneLoader.cs │ ├── SceneLoader.cs.meta │ ├── SplashScreen.cs │ └── SplashScreen.cs.meta │ ├── Global.meta │ ├── Global │ ├── SaveData.meta │ └── SaveData │ │ ├── Controller.meta │ │ └── Controller │ │ ├── SaveDataController.cs │ │ ├── SaveDataController.cs.meta │ │ ├── SaveDataModel.cs │ │ └── SaveDataModel.cs.meta │ ├── Scene.meta │ └── Scene │ ├── Home.meta │ ├── Home │ ├── HomeLauncher.cs │ ├── HomeLauncher.cs.meta │ ├── HomeView.cs │ └── HomeView.cs.meta │ ├── Idle.meta │ └── Idle │ ├── Connector.meta │ ├── Connector │ ├── IdleConnector.cs │ └── IdleConnector.cs.meta │ ├── Launcher.meta │ ├── Launcher │ ├── IdleLauncher.cs │ ├── IdleLauncher.cs.meta │ ├── IdleView.cs │ └── IdleView.cs.meta │ ├── Message.meta │ ├── Message │ ├── EarnGoldMessage.cs │ └── EarnGoldMessage.cs.meta │ ├── Module.meta │ └── Module │ ├── Gold.meta │ ├── Gold │ ├── GoldController.cs │ ├── GoldController.cs.meta │ ├── GoldModel.cs │ ├── GoldModel.cs.meta │ ├── GoldView.cs │ └── GoldView.cs.meta │ ├── Hero.meta │ ├── Hero │ ├── HeroController.cs │ ├── HeroController.cs.meta │ ├── HeroModel.cs │ ├── HeroModel.cs.meta │ ├── HeroView.cs │ └── HeroView.cs.meta │ ├── Tavern.meta │ ├── Tavern │ ├── TavernController.cs │ ├── TavernController.cs.meta │ ├── TavernModel.cs │ ├── TavernModel.cs.meta │ ├── TavernView.cs │ └── TavernView.cs.meta │ ├── Timer.meta │ └── Timer │ ├── TimerModel.cs │ ├── TimerModel.cs.meta │ ├── TimerView.cs │ └── TimerView.cs.meta ├── LICENSE ├── Packages ├── com.agate.mvc.meta ├── com.agate.mvc │ ├── Runtime.meta │ ├── Runtime │ │ ├── Base.meta │ │ ├── Base │ │ │ ├── Boot.meta │ │ │ ├── Boot │ │ │ │ ├── Connect.meta │ │ │ │ ├── Connect │ │ │ │ │ ├── BaseConnector.cs │ │ │ │ │ ├── BaseConnector.cs.meta │ │ │ │ │ ├── IConnector.cs │ │ │ │ │ └── IConnector.cs.meta │ │ │ │ ├── Context.meta │ │ │ │ ├── Context │ │ │ │ │ ├── Context.cs │ │ │ │ │ └── Context.cs.meta │ │ │ │ ├── Launch.meta │ │ │ │ ├── Launch │ │ │ │ │ ├── BaseLauncher.cs │ │ │ │ │ └── BaseLauncher.cs.meta │ │ │ │ ├── Load.meta │ │ │ │ ├── Load │ │ │ │ │ ├── BaseLoader.cs │ │ │ │ │ └── BaseLoader.cs.meta │ │ │ │ ├── Main.meta │ │ │ │ ├── Main │ │ │ │ │ ├── BaseMain.cs │ │ │ │ │ └── BaseMain.cs.meta │ │ │ │ ├── Splash.meta │ │ │ │ └── Splash │ │ │ │ │ ├── BaseSplash.cs │ │ │ │ │ └── BaseSplash.cs.meta │ │ │ ├── MVC.meta │ │ │ └── MVC │ │ │ │ ├── Controller.meta │ │ │ │ ├── Controller │ │ │ │ ├── BaseController.cs │ │ │ │ ├── BaseController.cs.meta │ │ │ │ ├── DataController.cs │ │ │ │ ├── DataController.cs.meta │ │ │ │ ├── GroupController.cs │ │ │ │ ├── GroupController.cs.meta │ │ │ │ ├── ObjectController.cs │ │ │ │ └── ObjectController.cs.meta │ │ │ │ ├── Model.meta │ │ │ │ ├── Model │ │ │ │ ├── BaseModel.cs │ │ │ │ ├── BaseModel.cs.meta │ │ │ │ ├── IBaseModel.cs │ │ │ │ └── IBaseModel.cs.meta │ │ │ │ ├── View.meta │ │ │ │ └── View │ │ │ │ ├── BaseView.cs │ │ │ │ ├── BaseView.cs.meta │ │ │ │ ├── ObjectView.cs │ │ │ │ ├── ObjectView.cs.meta │ │ │ │ ├── SceneView.cs │ │ │ │ └── SceneView.cs.meta │ │ ├── Core.meta │ │ ├── Core │ │ │ ├── DI.meta │ │ │ ├── DI │ │ │ │ ├── DependencyInjection.cs │ │ │ │ └── DependencyInjection.cs.meta │ │ │ ├── MVC.meta │ │ │ ├── MVC │ │ │ │ ├── Boot.meta │ │ │ │ ├── Boot │ │ │ │ │ ├── Launch.meta │ │ │ │ │ ├── Launch │ │ │ │ │ │ ├── ILauncher.cs │ │ │ │ │ │ ├── ILauncher.cs.meta │ │ │ │ │ │ ├── Launcher.cs │ │ │ │ │ │ └── Launcher.cs.meta │ │ │ │ │ ├── Load.meta │ │ │ │ │ ├── Load │ │ │ │ │ │ ├── ILoad.cs │ │ │ │ │ │ ├── ILoad.cs.meta │ │ │ │ │ │ ├── Loader.cs │ │ │ │ │ │ └── Loader.cs.meta │ │ │ │ │ ├── Main.meta │ │ │ │ │ ├── Main │ │ │ │ │ │ ├── IMain.cs │ │ │ │ │ │ ├── IMain.cs.meta │ │ │ │ │ │ ├── Main.cs │ │ │ │ │ │ └── Main.cs.meta │ │ │ │ │ ├── Singleton.meta │ │ │ │ │ ├── Singleton │ │ │ │ │ │ ├── Singleton.cs │ │ │ │ │ │ ├── Singleton.cs.meta │ │ │ │ │ │ ├── SingletonBehaviour.cs │ │ │ │ │ │ └── SingletonBehaviour.cs.meta │ │ │ │ │ ├── Splash.meta │ │ │ │ │ └── Splash │ │ │ │ │ │ ├── ISplash.cs │ │ │ │ │ │ ├── ISplash.cs.meta │ │ │ │ │ │ ├── Splash.cs │ │ │ │ │ │ └── Splash.cs.meta │ │ │ │ ├── Controller.meta │ │ │ │ ├── Controller │ │ │ │ │ ├── Controller.cs │ │ │ │ │ ├── Controller.cs.meta │ │ │ │ │ ├── IController.cs │ │ │ │ │ └── IController.cs.meta │ │ │ │ ├── Model.meta │ │ │ │ ├── Model │ │ │ │ │ ├── IModel.cs │ │ │ │ │ ├── IModel.cs.meta │ │ │ │ │ ├── Model.cs │ │ │ │ │ └── Model.cs.meta │ │ │ │ ├── View.meta │ │ │ │ └── View │ │ │ │ │ ├── ModelView.cs │ │ │ │ │ ├── ModelView.cs.meta │ │ │ │ │ ├── View.cs │ │ │ │ │ └── View.cs.meta │ │ │ ├── PubSub.meta │ │ │ └── PubSub │ │ │ │ ├── Aggregator.meta │ │ │ │ ├── Aggregator │ │ │ │ ├── Aggregator.cs │ │ │ │ └── Aggregator.cs.meta │ │ │ │ ├── PublishSubscribe.cs │ │ │ │ ├── PublishSubscribe.cs.meta │ │ │ │ ├── Subscribe.meta │ │ │ │ └── Subscribe │ │ │ │ ├── ISubscribe.cs │ │ │ │ ├── ISubscribe.cs.meta │ │ │ │ ├── Subscriber.cs │ │ │ │ └── Subscriber.cs.meta │ │ ├── Framework.Architecture.asmdef │ │ └── Framework.Architecture.asmdef.meta │ ├── package.json │ └── package.json.meta ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset ├── XRSettings.asset └── boot.config ├── README.md └── UserSettings ├── EditorUserSettings.asset ├── Layouts └── default-2021.dwlt └── Search.settings /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": {} 5 | } -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | release: 8 | name: release 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | with: 13 | fetch-depth: 0 14 | - name: Semantic release 15 | id: semantic 16 | uses: cycjimmy/semantic-release-action@v3 17 | with: 18 | extra_plugins: | 19 | @semantic-release/changelog 20 | @semantic-release/git 21 | branch: main 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 25 | - name: Create upm branch 26 | run: | 27 | git branch -d upm &> /dev/null || echo upm branch not found 28 | git subtree split -P "$PKG_ROOT" -b upm 29 | git checkout upm 30 | git push -f -u origin upm 31 | env: 32 | PKG_ROOT: Packages/com.agate.mvc 33 | - name: Create upm git tag 34 | if: steps.semantic.outputs.new_release_published == 'true' 35 | run: | 36 | git tag $TAG upm 37 | git push origin --tags 38 | env: 39 | TAG: upm/${{ steps.semantic.outputs.new_release_version }} 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagFormat": "v${version}", 3 | "plugins": [ 4 | ["@semantic-release/commit-analyzer", { "preset": "angular" }], 5 | "@semantic-release/release-notes-generator", 6 | ["@semantic-release/changelog", { "preset": "angular" }], 7 | ["@semantic-release/npm", { "npmPublish": false, "pkgRoot": "Packages/com.agate.mvc" }], 8 | ["@semantic-release/git", { 9 | "assets": ["Packages/com.agate.mvc/package.json", "CHANGELOG.md"], 10 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 11 | }], 12 | "@semantic-release/github" 13 | ] 14 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": ".NET Core Launch (console)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "WARNING01": "*********************************************************************************", 12 | "WARNING02": "The C# extension was unable to automatically decode projects in the current", 13 | "WARNING03": "workspace to create a runnable launch.json file. A template launch.json file has", 14 | "WARNING04": "been created as a placeholder.", 15 | "WARNING05": "", 16 | "WARNING06": "If OmniSharp is currently unable to load your project, you can attempt to resolve", 17 | "WARNING07": "this by restoring any missing project dependencies (example: run 'dotnet restore')", 18 | "WARNING08": "and by fixing any reported errors from building the projects in your workspace.", 19 | "WARNING09": "If this allows OmniSharp to now load your project then --", 20 | "WARNING10": " * Delete this file", 21 | "WARNING11": " * Open the Visual Studio Code command palette (View->Command Palette)", 22 | "WARNING12": " * run the command: '.NET: Generate Assets for Build and Debug'.", 23 | "WARNING13": "", 24 | "WARNING14": "If your project requires a more complex launch configuration, you may wish to delete", 25 | "WARNING15": "this configuration and pick a different template using the 'Add Configuration...'", 26 | "WARNING16": "button at the bottom of this file.", 27 | "WARNING17": "*********************************************************************************", 28 | "preLaunchTask": "build", 29 | "program": "${workspaceFolder}/bin/Debug//.dll", 30 | "args": [], 31 | "cwd": "${workspaceFolder}", 32 | "console": "internalConsole", 33 | "stopAtEntry": false 34 | }, 35 | { 36 | "name": ".NET Core Attach", 37 | "type": "coreclr", 38 | "request": "attach" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/Assembly-CSharp.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/Assembly-CSharp.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "watch", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "watch", 34 | "run", 35 | "--project", 36 | "${workspaceFolder}/Assembly-CSharp.csproj" 37 | ], 38 | "problemMatcher": "$msCompile" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /Assets/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb397a095d8813d43867bbf1bf111114 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Image.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e1ec89be449f1141821d1c6bad03ad0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Image/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgateInternational/MVC/43ccab0612fae735f60cebdb6b7fda0b5824c937/Assets/Example/Image/Square.png -------------------------------------------------------------------------------- /Assets/Example/Image/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb33957a955cb294caa8f7811d71e64d 3 | TextureImporter: 4 | internalIDToNameTable: 5 | - first: 6 | 213: 7482667652216324306 7 | second: Square 8 | externalObjects: {} 9 | serializedVersion: 11 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 1 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapsPreserveCoverage: 0 18 | alphaTestReferenceValue: 0.5 19 | mipMapFadeDistanceStart: 1 20 | mipMapFadeDistanceEnd: 3 21 | bumpmap: 22 | convertToNormalMap: 0 23 | externalNormalMap: 0 24 | heightScale: 0.25 25 | normalMapFilter: 0 26 | isReadable: 0 27 | streamingMipmaps: 0 28 | streamingMipmapsPriority: 0 29 | vTOnly: 0 30 | ignoreMasterTextureLimit: 0 31 | grayScaleToAlpha: 0 32 | generateCubemap: 6 33 | cubemapConvolution: 0 34 | seamlessCubemap: 0 35 | textureFormat: 1 36 | maxTextureSize: 2048 37 | textureSettings: 38 | serializedVersion: 2 39 | filterMode: 1 40 | aniso: 1 41 | mipBias: 0 42 | wrapU: 1 43 | wrapV: 1 44 | wrapW: 1 45 | nPOTScale: 0 46 | lightmap: 0 47 | compressionQuality: 50 48 | spriteMode: 2 49 | spriteExtrude: 1 50 | spriteMeshType: 1 51 | alignment: 0 52 | spritePivot: {x: 0.5, y: 0.5} 53 | spritePixelsToUnits: 256 54 | spriteBorder: {x: 4, y: 4, z: 4, w: 4} 55 | spriteGenerateFallbackPhysicsShape: 1 56 | alphaUsage: 1 57 | alphaIsTransparency: 1 58 | spriteTessellationDetail: 0 59 | textureType: 8 60 | textureShape: 1 61 | singleChannelComponent: 0 62 | flipbookRows: 1 63 | flipbookColumns: 1 64 | maxTextureSizeSet: 0 65 | compressionQualitySet: 0 66 | textureFormatSet: 0 67 | ignorePngGamma: 0 68 | applyGammaDecoding: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | androidETC2FallbackOverride: 0 81 | forceMaximumCompressionQuality_BC6H_BC7: 0 82 | - serializedVersion: 3 83 | buildTarget: Standalone 84 | maxTextureSize: 2048 85 | resizeAlgorithm: 0 86 | textureFormat: -1 87 | textureCompression: 1 88 | compressionQuality: 50 89 | crunchedCompression: 0 90 | allowsAlphaSplitting: 0 91 | overridden: 0 92 | androidETC2FallbackOverride: 0 93 | forceMaximumCompressionQuality_BC6H_BC7: 0 94 | - serializedVersion: 3 95 | buildTarget: iPhone 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | forceMaximumCompressionQuality_BC6H_BC7: 0 106 | - serializedVersion: 3 107 | buildTarget: Android 108 | maxTextureSize: 2048 109 | resizeAlgorithm: 0 110 | textureFormat: -1 111 | textureCompression: 1 112 | compressionQuality: 50 113 | crunchedCompression: 0 114 | allowsAlphaSplitting: 0 115 | overridden: 0 116 | androidETC2FallbackOverride: 0 117 | forceMaximumCompressionQuality_BC6H_BC7: 0 118 | spriteSheet: 119 | serializedVersion: 2 120 | sprites: 121 | - serializedVersion: 2 122 | name: Square 123 | rect: 124 | serializedVersion: 2 125 | x: 0 126 | y: 0 127 | width: 256 128 | height: 256 129 | alignment: 0 130 | pivot: {x: 0.5, y: 0.5} 131 | border: {x: 0, y: 0, z: 0, w: 0} 132 | outline: [] 133 | physicsShape: [] 134 | tessellationDetail: 0 135 | bones: [] 136 | spriteID: 2d009a6b596c7d760800000000000000 137 | internalID: 7482667652216324306 138 | vertices: [] 139 | indices: 140 | edges: [] 141 | weights: [] 142 | outline: [] 143 | physicsShape: 144 | - - {x: -128, y: 128} 145 | - {x: -128, y: -128} 146 | - {x: 128, y: -128} 147 | - {x: 128, y: 128} 148 | bones: [] 149 | spriteID: 5e97eb03825dee720800000000000000 150 | internalID: 0 151 | vertices: [] 152 | indices: 153 | edges: [] 154 | weights: [] 155 | secondaryTextures: [] 156 | nameFileIdTable: 157 | Square: 7482667652216324306 158 | spritePackingTag: 159 | pSDRemoveMatte: 0 160 | pSDShowRemoveMatteOption: 0 161 | userData: 162 | assetBundleName: 163 | assetBundleVariant: 164 | -------------------------------------------------------------------------------- /Assets/Example/Image/agate_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgateInternational/MVC/43ccab0612fae735f60cebdb6b7fda0b5824c937/Assets/Example/Image/agate_logo.png -------------------------------------------------------------------------------- /Assets/Example/Image/agate_logo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3518d26ee4e6ccc4ca479b28be58db54 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 1 40 | wrapV: 1 41 | wrapW: 1 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 1 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 8 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | spriteSheet: 80 | serializedVersion: 2 81 | sprites: [] 82 | outline: [] 83 | physicsShape: [] 84 | bones: [] 85 | spriteID: 5e97eb03825dee720800000000000000 86 | internalID: 0 87 | vertices: [] 88 | indices: 89 | edges: [] 90 | weights: [] 91 | secondaryTextures: [] 92 | nameFileIdTable: {} 93 | spritePackingTag: 94 | pSDRemoveMatte: 0 95 | pSDShowRemoveMatteOption: 0 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/Example/Scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbef99ca9934d9345923b129bdfb13b4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Scene/Home.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 808168e7b41518942b37639ff3f788e9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Example/Scene/Idle.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a30eac6c732acc47b771370a2d5b347 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Example/Scene/Splash.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be5890b40fc580e468299fdba4ba740f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Example/Script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52d8b8ac7c3760c42a268b8097aff072 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73792fd1b5c5f6c4d9be3379f356dd42 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/GameMain.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Agate.MVC.Core; 3 | using System.Collections; 4 | using UnityEngine; 5 | using UnityEngine.EventSystems; 6 | 7 | namespace Example.Boot 8 | { 9 | public class GameMain : BaseMain, IMain 10 | { 11 | protected override IConnector[] GetConnectors() 12 | { 13 | return null; 14 | } 15 | 16 | protected override IController[] GetDependencies() 17 | { 18 | return null; 19 | } 20 | 21 | protected override IEnumerator StartInit() 22 | { 23 | Application.targetFrameRate = 60; 24 | yield return null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/GameMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 440786cbc319d1f429499ac58d253009 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SceneLauncher.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Agate.MVC.Core; 3 | 4 | namespace Example.Boot 5 | { 6 | public abstract class SceneLauncher : BaseLauncher 7 | where TLauncher : SceneLauncher 8 | where TView : BaseSceneView 9 | { 10 | protected override IMain GetMain() 11 | { 12 | return GameMain.Instance; 13 | } 14 | 15 | protected override ILoad GetLoader() 16 | { 17 | return SceneLoader.Instance; 18 | } 19 | 20 | protected override ISplash GetSplash() 21 | { 22 | return SplashScreen.Instance; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SceneLauncher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a7b79fa8e368d14eb56b8fa8a2efe96 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SceneLoader.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | 3 | namespace Example.Boot 4 | { 5 | public class SceneLoader : BaseLoader 6 | { 7 | protected override string SplashScene { get { return "Splash";} } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SceneLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4168b78afb53ddd4fbd7583ee263c722 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SplashScreen.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Agate.MVC.Core; 3 | using UnityEngine; 4 | 5 | namespace Example.Boot 6 | { 7 | public class SplashScreen : BaseSplash 8 | { 9 | [SerializeField] 10 | private GameObject _splashUI; 11 | [SerializeField] 12 | private GameObject _transitionUI; 13 | 14 | protected override IMain GetMain() 15 | { 16 | return GameMain.Instance; 17 | } 18 | 19 | protected override ILoad GetLoader() 20 | { 21 | return SceneLoader.Instance; 22 | } 23 | 24 | protected override void StartSplash() 25 | { 26 | base.StartSplash(); 27 | _splashUI.SetActive(true); 28 | _transitionUI.SetActive(false); 29 | } 30 | 31 | protected override void FinishSplash() 32 | { 33 | base.FinishSplash(); 34 | _splashUI.SetActive(false); 35 | } 36 | 37 | protected override void StartTransition() 38 | { 39 | base.StartTransition(); 40 | _transitionUI.SetActive(true); 41 | } 42 | 43 | protected override void FinishTransition() 44 | { 45 | base.FinishTransition(); 46 | _transitionUI.SetActive(false); 47 | } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Example/Script/Boot/SplashScreen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90a9880f4217bf54598f0b294640509e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bd1ec8283e404d4785aecb98bddfdf9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7975b81d9955544e99884f0bc7eec7a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData/Controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6c5a471a40c9d4438d107cf2bb08b7d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData/Controller/SaveDataController.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | 3 | namespace Example.Module.SaveData 4 | { 5 | public class SaveDataController : BaseController 6 | { 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData/Controller/SaveDataController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa683923434c53744b0f72e73cd88618 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData/Controller/SaveDataModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SaveDataModel : MonoBehaviour 6 | { 7 | // Start is called before the first frame update 8 | void Start() 9 | { 10 | 11 | } 12 | 13 | // Update is called once per frame 14 | void Update() 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Example/Script/Global/SaveData/Controller/SaveDataModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cc138da8d425734bbbc755cc51c5fc0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9535b82c3705294fa3c734640aa393c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Home.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfb4274a20824b04ea596fca385a526a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Home/HomeLauncher.cs: -------------------------------------------------------------------------------- 1 | using Example.Boot; 2 | using Agate.MVC.Base; 3 | using Agate.MVC.Core; 4 | using System.Collections; 5 | 6 | namespace Example.Scene.Home 7 | { 8 | public class HomeLauncher : SceneLauncher 9 | { 10 | public override string SceneName {get {return "Home";}} 11 | 12 | protected override IController[] GetSceneDependencies() 13 | { 14 | return null; 15 | } 16 | 17 | protected override IConnector[] GetSceneConnectors() 18 | { 19 | return null; 20 | } 21 | 22 | protected override IEnumerator LaunchScene() 23 | { 24 | yield return null; 25 | } 26 | 27 | protected override IEnumerator InitSceneObject() 28 | { 29 | _view.SetButtonCallback(GoToGameplay); 30 | yield return null; 31 | } 32 | 33 | private void GoToGameplay() 34 | { 35 | SceneLoader.Instance.LoadScene("Idle"); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Home/HomeLauncher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1403c65e7cb572c4d8a3e3d551a07c42 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Home/HomeView.cs: -------------------------------------------------------------------------------- 1 | using Example.Boot; 2 | using Agate.MVC.Base; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using UnityEngine.Events; 6 | 7 | namespace Example.Scene.Home 8 | { 9 | public class HomeView : BaseSceneView 10 | { 11 | [SerializeField] 12 | private Button _button; 13 | 14 | public void SetButtonCallback(UnityAction callback) 15 | { 16 | _button.onClick.RemoveAllListeners(); 17 | _button.onClick.AddListener(callback); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Home/HomeView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b506d5eee9dd6694eb9b380f347f7152 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d77183c00377a6145b0b66eb27ad1efa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Connector.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5de708a15ae2ea1478cc168cc5a48c9d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Connector/IdleConnector.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Example.Scene.Idle.Gold; 3 | 4 | namespace Example.Scene.Idle 5 | { 6 | public class IdleConnector : BaseConnector 7 | { 8 | private GoldController _gold; 9 | 10 | protected override void Connect() 11 | { 12 | Subscribe(ProcessEarnGold); 13 | } 14 | 15 | protected override void Disconnect() 16 | { 17 | Unsubscribe(ProcessEarnGold); 18 | } 19 | 20 | private void ProcessEarnGold(EarnGoldMessage message) 21 | { 22 | _gold.AddGold(message.Value); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Connector/IdleConnector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13f8c813d62df354abbc05a79ec73398 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Launcher.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5e74196a0704914aa2e5ce7eda175a9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Launcher/IdleLauncher.cs: -------------------------------------------------------------------------------- 1 | using Example.Boot; 2 | using Agate.MVC.Base; 3 | using Agate.MVC.Core; 4 | using System.Collections; 5 | using Example.Scene.Idle.Gold; 6 | using Example.Scene.Idle.Tavern; 7 | 8 | namespace Example.Scene.Idle 9 | { 10 | public class IdleLauncher : SceneLauncher 11 | { 12 | public override string SceneName { get { return "Idle"; } } 13 | 14 | private GoldController _gold; 15 | private TavernController _tavern; 16 | 17 | protected override IController[] GetSceneDependencies() 18 | { 19 | return new IController[]{ 20 | new GoldController(), 21 | new TavernController(), 22 | }; 23 | } 24 | 25 | protected override IConnector[] GetSceneConnectors() 26 | { 27 | return new IConnector[]{ 28 | new IdleConnector() 29 | }; 30 | } 31 | 32 | protected override IEnumerator LaunchScene() 33 | { 34 | yield return null; 35 | } 36 | 37 | protected override IEnumerator InitSceneObject() 38 | { 39 | _view.Init(SceneName, BackToHome, Restart); 40 | _gold.SetView(_view.Gold); 41 | _tavern.SetView(_view.Tavern); 42 | yield return null; 43 | } 44 | 45 | private void BackToHome() 46 | { 47 | SceneLoader.Instance.LoadScene("Home"); 48 | } 49 | 50 | private void Restart() 51 | { 52 | SceneLoader.Instance.RestartScene(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Launcher/IdleLauncher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e16ff80243c89140ac99ba6e7dc9235 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Launcher/IdleView.cs: -------------------------------------------------------------------------------- 1 | using Example.Boot; 2 | using Agate.MVC.Base; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using UnityEngine.Events; 6 | using Example.Scene.Idle.Gold; 7 | using Example.Scene.Idle.Tavern; 8 | 9 | namespace Example.Scene.Idle 10 | { 11 | public class IdleView : BaseSceneView 12 | { 13 | public TavernView Tavern {get {return _tavern;}} 14 | public GoldView Gold {get {return _gold;}} 15 | 16 | [SerializeField] 17 | private TavernView _tavern; 18 | [SerializeField] 19 | private GoldView _gold; 20 | [SerializeField] 21 | private Text _sceneName; 22 | [SerializeField] 23 | private Button _homeButton; 24 | [SerializeField] 25 | private Button _restartButton; 26 | 27 | public void Init(string sceneName, UnityAction onHome, UnityAction onRestart) 28 | { 29 | _sceneName.text = sceneName; 30 | 31 | _homeButton.onClick.RemoveAllListeners(); 32 | _homeButton.onClick.AddListener(onHome); 33 | 34 | _restartButton.onClick.RemoveAllListeners(); 35 | _restartButton.onClick.AddListener(onRestart); 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Launcher/IdleView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d3898b4f7927e34ca708d7276ab7110 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Message.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fe2603fea1100e40923a93e3a3e5eb1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Message/EarnGoldMessage.cs: -------------------------------------------------------------------------------- 1 | namespace Example.Scene.Idle 2 | { 3 | public struct EarnGoldMessage 4 | { 5 | public int Value { get; set; } 6 | 7 | public EarnGoldMessage(int value) 8 | { 9 | Value = value; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Message/EarnGoldMessage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae3d1e29c5848f941b13a772b4b79e53 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e546e0951880cd24dbe96a28dbb2b533 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53a7edc88ddf5584e9f9d4857935e83b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldController.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | 3 | namespace Example.Scene.Idle.Gold 4 | { 5 | public class GoldController : ObjectController 6 | { 7 | public bool SpendGold(int value) 8 | { 9 | return _model.Spend(value); 10 | } 11 | 12 | public void AddGold(int value) 13 | { 14 | _model.Add(value); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0473bf164a7ce3f428c298a9dcd2a780 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | 3 | namespace Example.Scene.Idle.Gold 4 | { 5 | public interface IGoldModel : IBaseModel 6 | { 7 | public int Current { get; } 8 | } 9 | 10 | public class GoldModel : BaseModel, IGoldModel 11 | { 12 | public int Current { get; private set; } = 0; 13 | 14 | public GoldModel() { } 15 | 16 | public void Add(int value) 17 | { 18 | Current += value; 19 | SetDataAsDirty(); 20 | } 21 | 22 | public bool Spend(int value) 23 | { 24 | if (Current >= value) 25 | { 26 | Current -= value; 27 | SetDataAsDirty(); 28 | return true; 29 | } 30 | return false; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b61d517b9378d44086ceccef06acf2c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using UnityEngine.UI; 3 | using UnityEngine; 4 | 5 | namespace Example.Scene.Idle.Gold 6 | { 7 | public class GoldView : ObjectView 8 | { 9 | [SerializeField] 10 | private Text _currentGold; 11 | 12 | protected override void InitRenderModel(IGoldModel model) 13 | { 14 | _currentGold.text = model.Current.ToString(); 15 | } 16 | 17 | protected override void UpdateRenderModel(IGoldModel model) 18 | { 19 | _currentGold.text = model.Current.ToString(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Gold/GoldView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39440c962742a474b916549916d26fe3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a98db4511177f4b4e93da2525f9694a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroController.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Example.Scene.Idle.Gold; 3 | using Example.Scene.Idle.Timer; 4 | using System; 5 | 6 | namespace Example.Scene.Idle.Hero 7 | { 8 | public class HeroController : ObjectController 9 | { 10 | private GoldController _gold; 11 | 12 | public void Init(HeroModel model, HeroView view, TimerView timer) 13 | { 14 | _model = model; 15 | SetView(view); 16 | _view.Init(Upgrade); 17 | timer.SetModel(_model.Timer); 18 | timer.Init(TickTimer); 19 | StartTimer(); 20 | } 21 | 22 | private void Upgrade() 23 | { 24 | if (_gold.SpendGold(_model.Cost)) 25 | { 26 | _model.Upgrade(); 27 | } 28 | } 29 | 30 | private void StartTimer() 31 | { 32 | _model.Timer.StartTimer(GetCurrentTime()); 33 | } 34 | 35 | private void TickTimer() 36 | { 37 | long currentTime = GetCurrentTime(); 38 | _model.Timer.UpdateTimer(currentTime); 39 | if (_model.Timer.IsCompleted) 40 | { 41 | Publish(new EarnGoldMessage(_model.Income)); 42 | _model.Timer.StartTimer(currentTime); 43 | } 44 | } 45 | 46 | private long GetCurrentTime() 47 | { 48 | return DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 258150cd0de1c46448cf474d9721c6c7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Example.Scene.Idle.Timer; 3 | 4 | namespace Example.Scene.Idle.Hero 5 | { 6 | public interface IHeroModel : IBaseModel 7 | { 8 | public string Name { get; } 9 | public int Level { get; } 10 | public int Income { get; } 11 | public int Cost { get; } 12 | } 13 | 14 | public class HeroModel : BaseModel, IHeroModel 15 | { 16 | public string Name { get; private set; } 17 | public int Level { get; private set; } 18 | public int Income { get; private set; } 19 | public int Cost { get; private set; } 20 | public int BaseIncome { get; private set; } 21 | public int BaseCost { get; private set; } 22 | public TimerModel Timer { get; private set; } 23 | 24 | public HeroModel() { } 25 | 26 | public HeroModel(string name, int baseIncome, int baseCost, int duration) 27 | { 28 | Name = name; 29 | Level = 1; 30 | BaseIncome = baseIncome; 31 | Income = BaseIncome; 32 | BaseCost = baseCost; 33 | Cost = BaseCost; 34 | Timer = new TimerModel(duration); 35 | SetDataAsDirty(); 36 | } 37 | 38 | public void Upgrade() 39 | { 40 | Level++; 41 | Income = Level * BaseIncome; 42 | Cost = Level * BaseCost; 43 | SetDataAsDirty(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b9160fb26cfc4443813011f71ebfe8a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | using UnityEngine.Events; 5 | 6 | namespace Example.Scene.Idle.Hero 7 | { 8 | public class HeroView : ObjectView 9 | { 10 | [SerializeField] 11 | private Text _heroName; 12 | [SerializeField] 13 | private Text _heroLevel; 14 | [SerializeField] 15 | private Text _heroIncome; 16 | [SerializeField] 17 | private Text _upgradeCost; 18 | [SerializeField] 19 | private Button _upgradeButton; 20 | 21 | public void Init(UnityAction onUpgrade) 22 | { 23 | _upgradeButton.onClick.RemoveAllListeners(); 24 | _upgradeButton.onClick.AddListener(onUpgrade); 25 | } 26 | 27 | protected override void InitRenderModel(IHeroModel model) 28 | { 29 | _heroName.text = model.Name; 30 | } 31 | 32 | protected override void UpdateRenderModel(IHeroModel model) 33 | { 34 | _heroLevel.text = $"Lv {model.Level}"; 35 | _heroIncome.text = model.Income.ToString(); 36 | _upgradeCost.text = model.Cost.ToString(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Hero/HeroView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91487803be23c4e4d9d06e88332dc607 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81b0c4ecc43b6d842a124d9d9566d726 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernController.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using Example.Scene.Idle.Gold; 3 | using Example.Scene.Idle.Hero; 4 | using Example.Scene.Idle.Timer; 5 | using UnityEngine; 6 | 7 | namespace Example.Scene.Idle.Tavern 8 | { 9 | public class TavernController : ObjectController 10 | { 11 | private GoldController _gold; 12 | 13 | public override void SetView(TavernView view) 14 | { 15 | base.SetView(view); 16 | _view.Init(BuyHero); 17 | } 18 | 19 | private void BuyHero() 20 | { 21 | if (_gold.SpendGold(_model.BuyPrice)) 22 | { 23 | SummonHero(); 24 | } 25 | } 26 | 27 | private void SummonHero() 28 | { 29 | int heroId = _model.HeroCount + 1; 30 | int baseCost = 1 * heroId; 31 | int baseIncome = 2 * heroId; 32 | int duration = 1 * heroId; 33 | 34 | HeroModel heroModel = new HeroModel($"Hero {heroId}", baseIncome, baseCost, duration); 35 | GameObject obj = _view.CreateHeroObject(heroModel.Name); 36 | HeroView heroView = obj.GetComponent(); 37 | TimerView timerView = obj.GetComponent(); 38 | 39 | HeroController hero = new HeroController(); 40 | InjectDependencies(hero); 41 | 42 | hero.Init(heroModel, heroView, timerView); 43 | _model.AddHero(hero); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf50bbcdc1faf934b9b7e7967a2376de 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using System.Collections.Generic; 3 | using Example.Scene.Idle.Hero; 4 | 5 | namespace Example.Scene.Idle.Tavern 6 | { 7 | public interface ITavernModel : IBaseModel 8 | { 9 | public int BuyPrice { get; } 10 | } 11 | 12 | public class TavernModel : BaseModel, ITavernModel 13 | { 14 | public TavernModel() { } 15 | 16 | public int BuyPrice { get; private set; } 17 | public int HeroCount { get; private set; } 18 | private List Heroes = new List(); 19 | 20 | public void AddHero(HeroController hero) 21 | { 22 | Heroes.Add(hero); 23 | HeroCount++; 24 | BuyPrice = 50 * HeroCount; 25 | SetDataAsDirty(); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 538e1dc00a301c64591603a2c080d98b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | using UnityEngine.Events; 5 | 6 | namespace Example.Scene.Idle.Tavern 7 | { 8 | public class TavernView : ObjectView 9 | { 10 | [SerializeField] 11 | private RectTransform _heroContainer; 12 | [SerializeField] 13 | private GameObject _heroTemplate; 14 | [SerializeField] 15 | private Button _buyButton; 16 | [SerializeField] 17 | private Text _buyPrice; 18 | 19 | public void Init(UnityAction onBuy) 20 | { 21 | _buyButton.onClick.RemoveAllListeners(); 22 | _buyButton.onClick.AddListener(onBuy); 23 | } 24 | 25 | public GameObject CreateHeroObject(string objectName) 26 | { 27 | GameObject obj = GameObject.Instantiate(_heroTemplate, _heroContainer); 28 | obj.name = objectName; 29 | obj.SetActive(true); 30 | return obj; 31 | } 32 | 33 | protected override void InitRenderModel(ITavernModel model) 34 | { 35 | } 36 | 37 | protected override void UpdateRenderModel(ITavernModel model) 38 | { 39 | if (model.BuyPrice > 0) 40 | { 41 | _buyPrice.text = model.BuyPrice.ToString(); 42 | } 43 | else 44 | { 45 | _buyPrice.text = "FREE"; 46 | } 47 | } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Tavern/TavernView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59f41698ab86e7c449f180d6b5dc4bfb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Timer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64907d84bb2a8ba4689584c243d666c2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Timer/TimerModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using UnityEngine; 3 | 4 | namespace Example.Scene.Idle.Timer 5 | { 6 | public interface ITimerModel : IBaseModel 7 | { 8 | public float Progress { get; } 9 | public long Remaining { get; } 10 | } 11 | 12 | public class TimerModel : BaseModel, ITimerModel 13 | { 14 | public long Duration { get; private set; } 15 | public long StartTime { get; private set; } 16 | public long Passed { get; private set; } 17 | public long Remaining { get; private set; } 18 | public float Progress { get; private set; } 19 | public bool IsStarted { get; private set; } 20 | public bool IsCompleted { get; private set; } 21 | 22 | public TimerModel() { } 23 | 24 | public TimerModel(int second) 25 | { 26 | Duration = second * 1000; 27 | } 28 | 29 | public void StartTimer(long currentTime) 30 | { 31 | StartTime = currentTime; 32 | IsStarted = true; 33 | IsCompleted = false; 34 | UpdateTimer(currentTime); 35 | SetDataAsDirty(); 36 | } 37 | 38 | public void UpdateTimer(long currentTime) 39 | { 40 | if (IsStarted && !IsCompleted) 41 | { 42 | Passed = currentTime - StartTime; 43 | Remaining = Passed >= Duration ? 0 : Duration - Passed; 44 | Progress = Mathf.Clamp01((float)Passed / (float)Duration); 45 | IsCompleted = Remaining == 0; 46 | SetDataAsDirty(); 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Timer/TimerModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3927d58278514c842ba61e77b344a9ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Timer/TimerView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Base; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | using System; 5 | 6 | namespace Example.Scene.Idle.Timer 7 | { 8 | public class TimerView : ObjectView 9 | { 10 | [SerializeField] 11 | private Text _remainingDuration; 12 | [SerializeField] 13 | private Image _progressBar; 14 | private Action _onUpdate; 15 | 16 | public void Init(Action onUpdate) 17 | { 18 | _onUpdate = onUpdate; 19 | } 20 | 21 | private void Update() 22 | { 23 | _onUpdate?.Invoke(); 24 | } 25 | 26 | protected override void InitRenderModel(ITimerModel model) 27 | { 28 | 29 | } 30 | 31 | protected override void UpdateRenderModel(ITimerModel model) 32 | { 33 | _remainingDuration.text = ((float) model.Remaining / 1000.0f).ToString("F2"); 34 | _progressBar.fillAmount = model.Progress; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Assets/Example/Script/Scene/Idle/Module/Timer/TimerView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66f09c437fb9e204c8d0fb591d8cd712 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 335d32b211b8ce64392ea2879b014078 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 003aea6f9ffb44844af5401d78d1dfc8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1c1f9f28eb56e44db0c3dca495828c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef6690dd1c3afa3459387d3151a097ea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Connect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7efb193b80169254692682da77129a03 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Connect/BaseConnector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public abstract class BaseConnector : IConnector 7 | { 8 | public IEnumerator Init() 9 | { 10 | InitDependencies(); 11 | yield return null; 12 | Connect(); 13 | yield return null; 14 | } 15 | 16 | public IEnumerator Terminate() 17 | { 18 | Disconnect(); 19 | yield return null; 20 | } 21 | 22 | protected virtual void InitDependencies() 23 | { 24 | Context.Instance.InjectDependencies(this); 25 | } 26 | 27 | protected void Subscribe(Action subscriber) where TMessage : struct 28 | { 29 | Context.Instance.Subscribe(subscriber); 30 | } 31 | 32 | protected void Unsubscribe(Action subscriber) where TMessage : struct 33 | { 34 | Context.Instance.Unsubscribe(subscriber); 35 | } 36 | 37 | #region Abstract 38 | protected abstract void Connect(); 39 | protected abstract void Disconnect(); 40 | #endregion 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Connect/BaseConnector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8e509bfc7b629f4486571ebd43ef0cf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Connect/IConnector.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public interface IConnector 6 | { 7 | IEnumerator Init(); 8 | IEnumerator Terminate(); 9 | } 10 | } -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Connect/IConnector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc27f920b054eab44844281be43cda5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Context.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d56519bca1e14ed4fb4bc4f225d42659 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Context/Context.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Agate.MVC.Core; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public class Context 7 | { 8 | private static Context _instance; 9 | public static Context Instance 10 | { 11 | get 12 | { 13 | if (_instance == null) 14 | { 15 | _instance = new Context(); 16 | } 17 | return _instance; 18 | } 19 | } 20 | 21 | protected PublishSubscribe _pubsub; 22 | protected DependencyInjection _inject; 23 | 24 | protected Context() 25 | { 26 | _pubsub = PublishSubscribe.Instance; 27 | _inject = DependencyInjection.Instance; 28 | } 29 | 30 | #region DI 31 | public void RegisterDependencies(Type type, object obj) 32 | { 33 | _inject.RegisterDependencies(type, obj); 34 | } 35 | 36 | public void UnregisterDependencies(Type type) 37 | { 38 | _inject.UnregisterDependencies(type); 39 | } 40 | 41 | public void InjectDependencies(object target) 42 | { 43 | _inject.InjectDependencies(target); 44 | } 45 | #endregion 46 | 47 | #region PubSub 48 | public void Publish(TMessage message) where TMessage : struct 49 | { 50 | _pubsub.Publish(message); 51 | } 52 | 53 | public void Subscribe(Action subscriber) where TMessage : struct 54 | { 55 | _pubsub.Subscribe(subscriber); 56 | } 57 | 58 | public void Unsubscribe(Action subscriber) where TMessage : struct 59 | { 60 | _pubsub.Unsubscribe(subscriber); 61 | } 62 | #endregion 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Context/Context.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1152db7c98624564cb984595ccf02044 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Launch.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab57bc6ce5e2f9a498e000e6042fba6f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Launch/BaseLauncher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using Agate.MVC.Core; 4 | 5 | namespace Agate.MVC.Base 6 | { 7 | public abstract class BaseLauncher : Launcher 8 | where TController : BaseLauncher 9 | where TView : View 10 | { 11 | protected IConnector[] _connectors; 12 | 13 | #region Initialize 14 | protected override IEnumerator InitScene() 15 | { 16 | yield return InitDependencies(); 17 | yield return InitConnector(); 18 | yield return InitSceneView(); 19 | yield return InitSceneObject(); 20 | yield return LaunchScene(); 21 | } 22 | 23 | protected override IEnumerator InitDependencies() 24 | { 25 | Context.Instance.RegisterDependencies(typeof(TController), this); 26 | yield return base.InitDependencies(); 27 | Context.Instance.InjectDependencies(this); 28 | } 29 | 30 | protected virtual IEnumerator InitConnector() 31 | { 32 | _connectors = GetSceneConnectors(); 33 | 34 | if (_connectors != null) 35 | { 36 | int count = _connectors.Length; 37 | for (int i = 0; i < count; i++) 38 | { 39 | yield return _connectors[i].Init(); 40 | } 41 | } 42 | } 43 | #endregion 44 | 45 | #region Terminate 46 | protected override IEnumerator TerminateScene() 47 | { 48 | yield return base.TerminateScene(); 49 | yield return TerminateConnector(); 50 | } 51 | 52 | protected override IEnumerator RemoveDependencies() 53 | { 54 | yield return base.RemoveDependencies(); 55 | Context.Instance.UnregisterDependencies(typeof(TController)); 56 | } 57 | 58 | protected virtual IEnumerator TerminateConnector() 59 | { 60 | if (_connectors != null) 61 | { 62 | int count = _connectors.Length; 63 | for (int i = 0; i < count; i++) 64 | { 65 | yield return _connectors[i].Terminate(); 66 | } 67 | _connectors = null; 68 | } 69 | } 70 | #endregion 71 | 72 | #region Game Pattern 73 | protected virtual void Publish(TMessage message) where TMessage : struct 74 | { 75 | Context.Instance.Publish(message); 76 | } 77 | #endregion 78 | 79 | #region Abstract 80 | protected abstract IConnector[] GetSceneConnectors(); 81 | protected abstract IEnumerator LaunchScene(); 82 | #endregion 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Launch/BaseLauncher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70cdf2fdee96bce4d952d32c9ba62191 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Load.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f10609e1382a184d843962cd0dd2989 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Load/BaseLoader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Agate.MVC.Core; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public abstract class BaseLoader : Loader where T : BaseLoader 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Load/BaseLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38e6b6a62544f884b9d563fe56d7463f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Main.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 752f27063b3d40a438c85f578be63772 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Main/BaseMain.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Agate.MVC.Core; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public abstract class BaseMain : Main where T : BaseMain, IMain 7 | { 8 | protected IConnector[] _connectors; 9 | 10 | protected override IEnumerator FinalizeInit() 11 | { 12 | yield return InitConnector(); 13 | } 14 | 15 | protected virtual IEnumerator InitConnector() 16 | { 17 | _connectors = GetConnectors(); 18 | 19 | if (_connectors != null) 20 | { 21 | int count = _connectors.Length; 22 | for (int i = 0; i < count; i++) 23 | { 24 | yield return _connectors[i].Init(); 25 | } 26 | } 27 | } 28 | 29 | #region Abstract 30 | protected abstract IConnector[] GetConnectors(); 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Main/BaseMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dc3bdc0e44c96a41aefe4a8428bd896 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Splash.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60506fec36f58ed48961aead3bc9f49a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Splash/BaseSplash.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Agate.MVC.Core; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public abstract class BaseSplash : Splash, ISplash where T : BaseSplash 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/Boot/Splash/BaseSplash.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce0301bcc7cccc44faa8f7e6cce26db4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9541658229e606d4c823b1fa622ae65c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74aa96454fa21254ca901b535dbda65b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/BaseController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using Agate.MVC.Core; 4 | 5 | namespace Agate.MVC.Base 6 | { 7 | public class BaseController : Controller 8 | where TController : BaseController 9 | { 10 | public override IEnumerator Initialize() 11 | { 12 | yield return RegisterDependencies(); 13 | } 14 | 15 | public override IEnumerator Finalize() 16 | { 17 | yield return InjectDependencies(); 18 | } 19 | 20 | public override IEnumerator Terminate() 21 | { 22 | UnregisterDependencies(); 23 | yield return null; 24 | } 25 | 26 | #region DI 27 | protected virtual IEnumerator RegisterDependencies() 28 | { 29 | Context.Instance.RegisterDependencies(typeof(TController), this); 30 | yield return null; 31 | } 32 | 33 | protected virtual IEnumerator InjectDependencies() 34 | { 35 | InjectDependencies(this); 36 | yield return null; 37 | } 38 | 39 | protected virtual void InjectDependencies(object obj) 40 | { 41 | Context.Instance.InjectDependencies(obj); 42 | } 43 | 44 | protected virtual void UnregisterDependencies() 45 | { 46 | UnregisterDependencies(typeof(TController)); 47 | } 48 | 49 | protected virtual void UnregisterDependencies(Type type) 50 | { 51 | Context.Instance.UnregisterDependencies(type); 52 | } 53 | #endregion 54 | 55 | #region PubSub 56 | protected virtual void Publish(TMessage message) where TMessage : struct 57 | { 58 | Context.Instance.Publish(message); 59 | } 60 | #endregion 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/BaseController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb8ed24c8eb736245943c0cd66c29a5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/DataController.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Base 2 | { 3 | public abstract class DataController : BaseController 4 | where TController : DataController 5 | where TModel : BaseModel, new() 6 | { 7 | protected TModel _model; 8 | 9 | public DataController() 10 | { 11 | _model = new TModel(); 12 | } 13 | } 14 | 15 | public abstract class DataController : DataController 16 | where TController : DataController 17 | where TModel : BaseModel, TInterfaceModel, new() 18 | where TInterfaceModel : IBaseModel 19 | { 20 | public TInterfaceModel Model 21 | { 22 | get { return _model; } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/DataController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b9b31f06b9734041bf975178965bc12 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/GroupController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Agate.MVC.Core; 3 | 4 | namespace Agate.MVC.Base 5 | { 6 | public abstract class GroupController : BaseController 7 | where TController : GroupController 8 | { 9 | protected IController[] _subControllers; 10 | 11 | public override IEnumerator Initialize() 12 | { 13 | yield return InitializeSystem(); 14 | Context.Instance.RegisterDependencies(typeof(TController), this); 15 | yield return InitSubControllers(); 16 | } 17 | 18 | public override IEnumerator Finalize() 19 | { 20 | InjectDependencies(this); 21 | yield return FinalizeSubControllers(); 22 | yield return FinalizeSystem(); 23 | } 24 | 25 | public override IEnumerator Terminate() 26 | { 27 | UnregisterDependencies(); 28 | yield return TerminateSubControllers(); 29 | yield return TerminateSystem(); 30 | } 31 | 32 | protected virtual IEnumerator InitializeSystem() 33 | { 34 | yield return null; 35 | } 36 | 37 | protected virtual IEnumerator FinalizeSystem() 38 | { 39 | yield return null; 40 | } 41 | 42 | protected virtual IEnumerator TerminateSystem() 43 | { 44 | yield return null; 45 | } 46 | 47 | protected virtual IEnumerator InitSubControllers() 48 | { 49 | _subControllers = GetSubControllers(); 50 | 51 | if (_subControllers != null) 52 | { 53 | int count = _subControllers.Length; 54 | for (int i = 0; i < count; i++) 55 | { 56 | yield return _subControllers[i].Initialize(); 57 | } 58 | } 59 | yield return null; 60 | } 61 | 62 | protected virtual IEnumerator FinalizeSubControllers() 63 | { 64 | if (_subControllers != null) 65 | { 66 | int count = _subControllers.Length; 67 | for (int i = 0; i < count; i++) 68 | { 69 | yield return _subControllers[i].Finalize(); 70 | } 71 | } 72 | yield return null; 73 | } 74 | 75 | protected virtual IEnumerator TerminateSubControllers() 76 | { 77 | if (_subControllers != null) 78 | { 79 | int count = _subControllers.Length; 80 | for (int i = 0; i < count; i++) 81 | { 82 | yield return _subControllers[i].Terminate(); 83 | } 84 | } 85 | yield return null; 86 | } 87 | 88 | #region Abstract 89 | protected abstract IController[] GetSubControllers(); 90 | #endregion 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/GroupController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1da77edd49a15484b8003e97f9481df5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/ObjectController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public abstract class ObjectController : BaseController 6 | where TController : ObjectController 7 | where TView : BaseView 8 | { 9 | protected TView _view; 10 | 11 | public virtual void SetView(TView view) 12 | { 13 | _view = view; 14 | } 15 | } 16 | 17 | public abstract class ObjectController : BaseController 18 | where TController : ObjectController 19 | where TModel : BaseModel, new() 20 | where TView : BaseView 21 | { 22 | protected TView _view; 23 | protected TModel _model; 24 | 25 | public ObjectController() 26 | { 27 | _model = new TModel(); 28 | } 29 | 30 | public virtual void SetView(TView view) 31 | { 32 | _view = view; 33 | } 34 | } 35 | 36 | 37 | public abstract class ObjectController : BaseController 38 | where TController : ObjectController 39 | where TModel : BaseModel, TInterfaceModel, new() 40 | where TInterfaceModel : IBaseModel 41 | where TView : ObjectView 42 | { 43 | protected TView _view; 44 | protected TModel _model; 45 | 46 | public TInterfaceModel Model 47 | { 48 | get { return _model; } 49 | } 50 | 51 | public ObjectController() 52 | { 53 | _model = new TModel(); 54 | } 55 | 56 | public virtual void SetView(TView view) 57 | { 58 | _view = view; 59 | _view.SetModel(_model); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Controller/ObjectController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27af4227c6e490e41b903300a9adffec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Model.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80380034a94725346b8c555c9400d0cf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Model/BaseModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Core; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public class BaseModel : Model 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Model/BaseModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb3b1f9990ef9d04a9a2856cfd6be17d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Model/IBaseModel.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Core; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public interface IBaseModel : IModel 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/Model/IBaseModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c433440e6d1c7448891be86e2d9408c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fd391af76a9f714a9d64d1a51ed4357 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/BaseView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Core; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public class BaseView : View 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/BaseView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d37fb6f75e950ea479a4c1858354401d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/ObjectView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Core; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public abstract class ObjectView : ModelView 6 | where TModel : IBaseModel 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/ObjectView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2a2f8dd7438fbb44ba92d56c9034793 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/SceneView.cs: -------------------------------------------------------------------------------- 1 | using Agate.MVC.Core; 2 | 3 | namespace Agate.MVC.Base 4 | { 5 | public class BaseSceneView : View 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Base/MVC/View/SceneView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9328ba5aa7c3a4142b9d7697cecf8106 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fada2d44c91da2b46ab369d935b4e350 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/DI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 067f8a3efcccf214a8cb5c394b1f12a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/DI/DependencyInjection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace Agate.MVC.Core 6 | { 7 | public class DependencyInjection 8 | { 9 | private static DependencyInjection _instance; 10 | public static DependencyInjection Instance 11 | { 12 | get 13 | { 14 | if (_instance == null) 15 | { 16 | _instance = new DependencyInjection(); 17 | } 18 | return _instance; 19 | } 20 | } 21 | 22 | protected Dictionary _dependencies = new Dictionary(); 23 | 24 | protected DependencyInjection() { } 25 | 26 | #region Register Dependencies 27 | public bool RegisterDependencies() where T : new() 28 | { 29 | Type objectType = typeof(T); 30 | if (!_dependencies.ContainsKey(objectType)) 31 | { 32 | T t = new T(); 33 | _dependencies.Add(typeof(T), t); 34 | return true; 35 | } 36 | return false; 37 | } 38 | 39 | public bool RegisterDependencies(T t) 40 | { 41 | return RegisterDependencies(typeof(T), t); 42 | } 43 | 44 | public bool RegisterDependencies(Type type, object t) 45 | { 46 | if (!_dependencies.ContainsKey(type)) 47 | { 48 | _dependencies.Add(type, t); 49 | return true; 50 | } 51 | return false; 52 | } 53 | #endregion 54 | 55 | #region Unregister 56 | public bool UnregisterDependencies() 57 | { 58 | Type objectType = typeof(T); 59 | return UnregisterDependencies(objectType); 60 | } 61 | 62 | public bool UnregisterDependencies(Type type) 63 | { 64 | if (_dependencies.ContainsKey(type)) 65 | { 66 | _dependencies.Remove(type); 67 | return true; 68 | } 69 | return false; 70 | } 71 | #endregion 72 | 73 | 74 | #region Inject Dependencies 75 | public void InjectDependencies(object target) 76 | { 77 | InjectProperty(target); 78 | InjectField(target); 79 | } 80 | 81 | private void InjectProperty(object target) 82 | { 83 | PropertyInfo[] props = target.GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); 84 | 85 | foreach (var prop in props) 86 | { 87 | if (prop.PropertyType.IsClass || prop.PropertyType.IsInterface) 88 | { 89 | object source; 90 | if (_dependencies.TryGetValue(prop.PropertyType, out source)) 91 | { 92 | prop.SetValue(target, source); 93 | } 94 | } 95 | } 96 | } 97 | 98 | private void InjectField(object target) 99 | { 100 | FieldInfo[] fields = target.GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); 101 | 102 | foreach (var field in fields) 103 | { 104 | if (field.FieldType.IsClass || field.FieldType.IsInterface) 105 | { 106 | object source; 107 | if (_dependencies.TryGetValue(field.FieldType, out source)) 108 | { 109 | field.SetValue(target, source); 110 | } 111 | } 112 | } 113 | } 114 | #endregion 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/DI/DependencyInjection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b409b51f367d3d4ea1cd9a99d2c099b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 494b8648255586149a220b79d1dc9779 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e52368b3c670681438df0fa8853e87b3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Launch.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 479690eaf41f3c64c85f8e2742382338 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Launch/ILauncher.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public delegate void OnLoadFinish(); 4 | 5 | public interface ILauncher 6 | { 7 | void Load(OnLoadFinish onFinish); 8 | void Unload(OnLoadFinish onFinish); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Launch/ILauncher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 431270fb5e1c6e54d8c840165ca14c59 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Launch/Launcher.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace Agate.MVC.Core 5 | { 6 | public enum SceneLoadState 7 | { 8 | NotLoaded = 0, Loading = 1, Loaded = 2, Unloading = 3 9 | } 10 | 11 | public abstract class Launcher : MonoBehaviour, ILauncher 12 | where TView : View 13 | { 14 | #region Interface Implementation 15 | public SceneLoadState State { get; protected set; } 16 | public abstract string SceneName { get; } 17 | #endregion 18 | 19 | [SerializeField] 20 | protected TView _view; 21 | protected IController[] _dependencies; 22 | 23 | protected void Awake() 24 | { 25 | StartCoroutine(AutoInitialize()); 26 | } 27 | 28 | #region Auto Initialize 29 | protected virtual IEnumerator AutoInitialize() 30 | { 31 | ILoad loader = GetLoader(); 32 | if (!loader.IsInitialized) 33 | { 34 | loader.InitLoader(); 35 | yield return null; 36 | } 37 | 38 | ISplash splash = GetSplash(); 39 | if (!splash.IsInitialized) 40 | { 41 | splash.InitSplash(); 42 | yield return null; 43 | } 44 | 45 | IMain main = GetMain(); 46 | if (main.IsInitialized) 47 | { 48 | RegisterLauncher(); 49 | } 50 | else 51 | { 52 | main.OnInitializeFinish += InitWhenReady; 53 | main.InitMain(); 54 | yield return null; 55 | } 56 | } 57 | 58 | protected virtual void InitWhenReady() 59 | { 60 | IMain main = GetMain(); 61 | main.OnInitializeFinish -= InitWhenReady; 62 | RegisterLauncher(); 63 | } 64 | #endregion 65 | 66 | #region Loading 67 | protected virtual void RegisterLauncher() 68 | { 69 | var loader = GetLoader(); 70 | loader.RegisterLauncher(SceneName, this); 71 | } 72 | 73 | public virtual void Load(OnLoadFinish onFinish) 74 | { 75 | if (State == SceneLoadState.NotLoaded) 76 | { 77 | StartCoroutine(LoadingScene(onFinish)); 78 | } 79 | } 80 | 81 | protected virtual IEnumerator LoadingScene(OnLoadFinish onFinish) 82 | { 83 | State = SceneLoadState.Loading; 84 | yield return InitScene(); 85 | State = SceneLoadState.Loaded; 86 | 87 | if (onFinish != null) 88 | { 89 | onFinish(); 90 | } 91 | } 92 | #endregion 93 | 94 | #region Unload 95 | public virtual void Unload(OnLoadFinish onFinish) 96 | { 97 | if (State == SceneLoadState.Loaded) 98 | { 99 | StartCoroutine(UnloadingScene(onFinish)); 100 | } 101 | } 102 | 103 | protected virtual IEnumerator UnloadingScene(OnLoadFinish onFinish) 104 | { 105 | State = SceneLoadState.Unloading; 106 | yield return TerminateScene(); 107 | State = SceneLoadState.NotLoaded; 108 | 109 | if (onFinish != null) 110 | { 111 | onFinish(); 112 | } 113 | } 114 | #endregion 115 | 116 | 117 | #region Initialize 118 | protected virtual IEnumerator InitScene() 119 | { 120 | yield return InitDependencies(); 121 | yield return InitSceneView(); 122 | yield return InitSceneObject(); 123 | } 124 | 125 | protected virtual IEnumerator InitDependencies() 126 | { 127 | _dependencies = GetSceneDependencies(); 128 | 129 | if (_dependencies != null) 130 | { 131 | int count = _dependencies.Length; 132 | for (int i = 0; i < count; i++) 133 | { 134 | yield return _dependencies[i].Initialize(); 135 | } 136 | 137 | for (int i = 0; i < count; i++) 138 | { 139 | yield return _dependencies[i].Finalize(); 140 | } 141 | } 142 | } 143 | 144 | protected virtual IEnumerator InitSceneView() 145 | { 146 | // if scene is not assigned, initialize scene object here 147 | // otherwise do nothing 148 | yield return null; 149 | } 150 | #endregion 151 | 152 | #region Terminate 153 | protected virtual IEnumerator TerminateScene() 154 | { 155 | yield return RemoveDependencies(); 156 | yield return DestroySceneView(); 157 | } 158 | 159 | protected virtual IEnumerator RemoveDependencies() 160 | { 161 | if (_dependencies != null) 162 | { 163 | int count = _dependencies.Length; 164 | for (int i = 0; i < count; i++) 165 | { 166 | yield return _dependencies[i].Terminate(); 167 | } 168 | _dependencies = null; 169 | } 170 | } 171 | 172 | protected virtual IEnumerator DestroySceneView() 173 | { 174 | GameObject.Destroy(_view.gameObject); 175 | yield return null; 176 | } 177 | #endregion 178 | 179 | #region Abstract Method 180 | protected abstract IMain GetMain(); 181 | protected abstract ILoad GetLoader(); 182 | protected abstract ISplash GetSplash(); 183 | protected abstract IController[] GetSceneDependencies(); 184 | protected abstract IEnumerator InitSceneObject(); 185 | #endregion 186 | } 187 | } 188 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Launch/Launcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd29f38dfcdfa1c4685ede7c9297c9a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Load.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaeea805bf6d38e4fa654b7c52f47901 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Load/ILoad.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public delegate void SceneLoadEvent(string sceneName); 4 | public delegate void TransitionEvent(); 5 | 6 | public interface ILoad 7 | { 8 | event SceneLoadEvent OnSceneChanged; 9 | event TransitionEvent OnStartTransition; 10 | event TransitionEvent OnFinishTransition; 11 | bool IsInitialized { get; } 12 | 13 | void InitLoader(); 14 | void LoadScene(string sceneName); 15 | void RestartScene(); 16 | void RegisterLauncher(string sceneName, ILauncher launcher); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Load/ILoad.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b2f05af94ea9364cbcd9c927d4d3f2c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Load/Loader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.SceneManagement; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | namespace Agate.MVC.Core 7 | { 8 | public abstract class Loader : SingletonBehaviour, ILoad where T : Loader 9 | { 10 | public event SceneLoadEvent OnSceneChanged; 11 | public event TransitionEvent OnStartTransition; 12 | public event TransitionEvent OnFinishTransition; 13 | 14 | public string PreviousScene { get { return _previousScene; } } 15 | public string CurrentScene { get { return _currentScene; } } 16 | public string RequestedScene { get { return _requestedScene; } } 17 | 18 | public bool IsInitialized { get; protected set; } = false; 19 | 20 | protected Dictionary _sceneLaunchers = new Dictionary(); 21 | protected string _currentScene = null; 22 | protected string _previousScene = null; 23 | protected string _requestedScene = null; 24 | 25 | #region Init 26 | public void InitLoader() 27 | { 28 | if(!IsInitialized){ 29 | // load splash scene 30 | SceneManager.LoadScene(SplashScene, LoadSceneMode.Additive); 31 | IsInitialized = true; 32 | } 33 | } 34 | #endregion 35 | 36 | 37 | #region Load 38 | public void LoadScene(string sceneName) 39 | { 40 | if (!string.IsNullOrEmpty(sceneName)) 41 | { 42 | UnityEngine.Debug.Log("Load Scene " + sceneName); 43 | _requestedScene = sceneName; 44 | 45 | if (string.IsNullOrEmpty(_currentScene)) 46 | { 47 | // if current scene is fully unloaded 48 | SceneManager.LoadScene(sceneName, LoadSceneMode.Additive); 49 | } 50 | else 51 | { 52 | // otherwise unload current scene first 53 | StartUnload(); 54 | } 55 | } 56 | } 57 | 58 | public void RegisterLauncher(string sceneName, ILauncher sceneLauncher) 59 | { 60 | UnityEngine.Debug.Log("Register Scene Launcher" + sceneName); 61 | if (!_sceneLaunchers.ContainsKey(sceneName)) 62 | { 63 | _sceneLaunchers.Add(sceneName, sceneLauncher); 64 | } 65 | 66 | _requestedScene = sceneName; 67 | 68 | if (string.IsNullOrEmpty(_currentScene)) 69 | { 70 | StartLoad(); 71 | } 72 | else 73 | { 74 | StartUnload(); 75 | } 76 | } 77 | 78 | protected virtual void StartLoad() 79 | { 80 | UnityEngine.Debug.Log("Start Load " + _requestedScene); 81 | StartTransition(); 82 | 83 | if (_requestedScene != _currentScene) 84 | { 85 | if (OnSceneChanged != null) 86 | { 87 | OnSceneChanged(_requestedScene); 88 | } 89 | } 90 | _sceneLaunchers[_requestedScene].Load(FinishLoad); 91 | } 92 | 93 | protected virtual void FinishLoad() 94 | { 95 | UnityEngine.Debug.Log("Finish Load " + _requestedScene); 96 | _currentScene = _requestedScene; 97 | _requestedScene = null; 98 | FinishTransition(); 99 | } 100 | #endregion 101 | 102 | #region Unload 103 | protected virtual void StartUnload() 104 | { 105 | UnityEngine.Debug.Log("Start Unload " + _currentScene); 106 | StartTransition(); 107 | 108 | if (!string.IsNullOrEmpty(_currentScene)) 109 | { 110 | _sceneLaunchers[_currentScene].Unload(UnloadScene); 111 | _sceneLaunchers.Remove(_currentScene); 112 | } 113 | } 114 | 115 | protected virtual void UnloadScene() 116 | { 117 | UnityEngine.Debug.Log("Unload Scene " + _currentScene); 118 | var async = SceneManager.UnloadSceneAsync(_currentScene, UnloadSceneOptions.None); 119 | 120 | if (_previousScene != _currentScene) 121 | { 122 | _previousScene = _currentScene; 123 | } 124 | _currentScene = null; 125 | async.completed += (a) => { FinishUnload(); }; 126 | } 127 | 128 | protected virtual void FinishUnload() 129 | { 130 | UnityEngine.Debug.Log("Finish Unload"); 131 | LoadScene(_requestedScene); 132 | } 133 | #endregion 134 | 135 | #region Restart Scene 136 | public void RestartScene() 137 | { 138 | UnityEngine.Debug.Log("Restart Scene " + _currentScene); 139 | StartTransition(); 140 | _requestedScene = _currentScene; 141 | StartUnload(); 142 | } 143 | #endregion 144 | 145 | #region Broadcast Event 146 | protected virtual void StartTransition() 147 | { 148 | if (OnStartTransition != null) 149 | { 150 | OnStartTransition(); 151 | } 152 | } 153 | 154 | protected virtual void FinishTransition() 155 | { 156 | if (OnFinishTransition != null) 157 | { 158 | OnFinishTransition(); 159 | } 160 | } 161 | #endregion 162 | 163 | #region Abstract Method 164 | protected abstract string SplashScene { get; } 165 | #endregion 166 | } 167 | } -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Load/Loader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9a1ffcf4198cdb4ba46491a8b98521e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Main.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e581990cfa6628c4ba96fb6c3ba66207 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Main/IMain.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public delegate void InitializeProgress(int progress, int total); 4 | public delegate void InitializeEvent(); 5 | 6 | public interface IMain 7 | { 8 | event InitializeProgress OnInitializing; 9 | event InitializeEvent OnInitializeStart; 10 | event InitializeEvent OnInitializeFinish; 11 | bool IsInitialized { get; } 12 | void InitMain(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Main/IMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbdb82d8a6a59e14fb6823012fdf5c0e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Main/Main.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public enum InitializeState 6 | { 7 | NotInitialized = 0, Initializing = 1, Initialized, 8 | } 9 | 10 | public abstract class Main : SingletonBehaviour where T : Main, IMain 11 | { 12 | #region Interface Implementation 13 | public event InitializeProgress OnInitializing; 14 | public event InitializeEvent OnInitializeStart; 15 | public event InitializeEvent OnInitializeFinish; 16 | public InitializeState State { get; protected set; } 17 | public bool IsInitialized { get { return State == InitializeState.Initialized; } } 18 | #endregion 19 | 20 | #region Initialize Process 21 | public void InitMain() 22 | { 23 | if (State == InitializeState.NotInitialized) 24 | { 25 | StartCoroutine(Initialize()); 26 | } 27 | } 28 | 29 | protected virtual IEnumerator Initialize() 30 | { 31 | if (State == InitializeState.NotInitialized) 32 | { 33 | State = InitializeState.Initializing; 34 | 35 | if (OnInitializeStart != null) 36 | { 37 | OnInitializeStart(); 38 | } 39 | 40 | yield return StartInit(); 41 | yield return InitDependencies(); 42 | yield return FinalizeInit(); 43 | 44 | State = InitializeState.Initialized; 45 | 46 | if (OnInitializeFinish != null) 47 | { 48 | OnInitializeFinish(); 49 | } 50 | } 51 | } 52 | 53 | protected virtual IEnumerator InitDependencies() 54 | { 55 | var systems = GetDependencies(); 56 | if (systems != null) 57 | { 58 | int count = systems.Length; 59 | for (int i = 0; i < count; i++) 60 | { 61 | yield return systems[i].Initialize(); 62 | } 63 | 64 | for (int i = 0; i < count; i++) 65 | { 66 | yield return systems[i].Finalize(); 67 | 68 | if (OnInitializing != null) 69 | { 70 | OnInitializing(i + 1, count); 71 | } 72 | yield return null; 73 | } 74 | } 75 | yield return null; 76 | } 77 | #endregion 78 | 79 | 80 | #region Abstract Method 81 | protected abstract IController[] GetDependencies(); 82 | protected abstract IEnumerator StartInit(); 83 | protected abstract IEnumerator FinalizeInit(); 84 | #endregion 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Main/Main.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 989da9e5b97f46a419c592cf3918caf4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Singleton.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a36871bc23f27f6458403cebdc6f9643 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Singleton/Singleton.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public class Singleton where T : class, new() 4 | { 5 | private static T _instance = null; 6 | public static T Instance 7 | { 8 | get 9 | { 10 | if (_instance == null) 11 | { 12 | _instance = new T(); 13 | } 14 | return _instance; 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Singleton/Singleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20aa31e29268ad34394c70d38fd4124a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Singleton/SingletonBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public class SingletonBehaviour : MonoBehaviour where T : SingletonBehaviour 6 | { 7 | private static T _instance; 8 | private static readonly object padlock = new object(); 9 | public static T Instance 10 | { 11 | get 12 | { 13 | lock (padlock) 14 | { 15 | if (_instance == null) 16 | { 17 | T t = GameObject.FindObjectOfType(); 18 | if (t != null) 19 | { 20 | _instance = t; 21 | } 22 | else 23 | { 24 | GameObject obj = new GameObject(typeof(T).Name + ""); 25 | _instance = obj.AddComponent(); 26 | GameObject.DontDestroyOnLoad(obj); 27 | } 28 | } 29 | return _instance; 30 | } 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Singleton/SingletonBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6889750fea0256744adc2c112d2222d3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Splash.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0e533f4bb678ce4f8c227383bc50bfb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Splash/ISplash.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public interface ISplash 4 | { 5 | bool IsInitialized { get; } 6 | void InitSplash(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Splash/ISplash.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f92bbaaab52ce794ca44043dbcbe50fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Splash/Splash.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public abstract class Splash : SingletonBehaviour where T : Splash, ISplash 6 | { 7 | public bool IsInitialized { get; protected set; } = false; 8 | 9 | public virtual void InitSplash() 10 | { 11 | if (!IsInitialized) 12 | { 13 | IsInitialized = true; 14 | 15 | IMain main = GetMain(); 16 | main.OnInitializeStart += StartSplash; 17 | main.OnInitializeFinish += FinishSplash; 18 | 19 | ILoad loader = GetLoader(); 20 | loader.OnStartTransition += StartTransition; 21 | loader.OnFinishTransition += FinishTransition; 22 | } 23 | } 24 | 25 | protected virtual void StartSplash() 26 | { 27 | this.gameObject.SetActive(true); 28 | } 29 | 30 | protected virtual void FinishSplash() 31 | { 32 | this.gameObject.SetActive(false); 33 | } 34 | 35 | protected virtual void StartTransition() 36 | { 37 | this.gameObject.SetActive(true); 38 | } 39 | 40 | protected virtual void FinishTransition() 41 | { 42 | this.gameObject.SetActive(false); 43 | } 44 | 45 | #region Abstract 46 | protected abstract IMain GetMain(); 47 | protected abstract ILoad GetLoader(); 48 | #endregion 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Boot/Splash/Splash.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5f5e35c16829794ca30c8abf5174d93 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37c1f07ea31a3434e8f52b4fd16b4372 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Controller/Controller.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public abstract class Controller : IController 6 | { 7 | public virtual IEnumerator Initialize() 8 | { 9 | yield return null; 10 | } 11 | 12 | public virtual IEnumerator Finalize() 13 | { 14 | yield return null; 15 | } 16 | 17 | public virtual IEnumerator Terminate() 18 | { 19 | yield return null; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Controller/Controller.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86a3a33626944eb468276267b367d6c9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Controller/IController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public interface IController 6 | { 7 | IEnumerator Initialize(); 8 | IEnumerator Finalize(); 9 | IEnumerator Terminate(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Controller/IController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8b31124c92878e4c996772d4f78fd2f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Model.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da113490b8b5b9342a6ddaa490cc7b21 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Model/IModel.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public interface IModel 4 | { 5 | event OnDataModified OnDataModified; 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Model/IModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f1ffcce4dadfae4792f0c726a6c7b52 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Model/Model.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public delegate void OnDataModified(); 4 | 5 | public class Model 6 | { 7 | public event OnDataModified OnDataModified; 8 | 9 | protected void SetDataAsDirty() 10 | { 11 | if (OnDataModified != null) 12 | { 13 | OnDataModified(); 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/Model/Model.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee107c0fe8369934dbc7b66dc189f25d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/View.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27fa5bfe0df6f5c42a8f043172ca4408 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/View/ModelView.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public abstract class ModelView : View 4 | where TModel : IModel 5 | { 6 | protected TModel _model; 7 | 8 | public void SetModel(TModel model) 9 | { 10 | if (_model != null) 11 | { 12 | _model.OnDataModified -= UpdateView; 13 | } 14 | 15 | if (model != null) 16 | { 17 | _model = model; 18 | _model.OnDataModified += UpdateView; 19 | InitRenderModel(_model); 20 | UpdateRenderModel(_model); 21 | } 22 | } 23 | 24 | public virtual void UpdateView() 25 | { 26 | if (_model != null) 27 | { 28 | UpdateRenderModel(_model); 29 | } 30 | } 31 | 32 | protected abstract void InitRenderModel(TModel model); 33 | protected abstract void UpdateRenderModel(TModel model); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/View/ModelView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0683ccf85f5669469e2d79e567690a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/View/View.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public class View : MonoBehaviour 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/MVC/View/View.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47eec1e2c73375846865c4dac32ad7a3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b746b540a3a3d44abca5406b8e1a346 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Aggregator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6d3d182533c9394fb4a5d4ff25c2319 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Aggregator/Aggregator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Agate.MVC.Core 5 | { 6 | public class Aggregator 7 | { 8 | protected Dictionary _subscribers = new Dictionary(); 9 | 10 | #region Type Identifier 11 | protected virtual Type GetMessageIdentifier() 12 | { 13 | return typeof(TMessage); 14 | } 15 | #endregion 16 | 17 | #region Publish 18 | 19 | public virtual void Publish(TMessage message) 20 | { 21 | var messageType = GetMessageIdentifier(); 22 | 23 | if (_subscribers.ContainsKey(messageType)) 24 | { 25 | var sub = _subscribers[messageType] as Subscriber; 26 | sub.SendMessage(message); 27 | } 28 | } 29 | #endregion 30 | 31 | #region Subsribe 32 | public virtual void Subscribe(Action subscriber) 33 | { 34 | var messageType = GetMessageIdentifier(); 35 | 36 | if (!_subscribers.ContainsKey(messageType)) 37 | { 38 | _subscribers.Add(messageType, new Subscriber()); 39 | } 40 | 41 | var sub = _subscribers[messageType] as Subscriber; 42 | sub.Add(subscriber); 43 | } 44 | #endregion 45 | 46 | #region Unsubscribe 47 | public virtual void UnsubscribeAll() 48 | { 49 | _subscribers.Clear(); 50 | } 51 | 52 | public virtual void UnsubscribeAll() 53 | { 54 | var messageType = GetMessageIdentifier(); 55 | 56 | if (_subscribers.ContainsKey(messageType)) 57 | { 58 | _subscribers.Remove(messageType); 59 | } 60 | } 61 | 62 | public virtual void Unsubscribe(Action subscriber) 63 | { 64 | var messageType = GetMessageIdentifier(); 65 | 66 | if (_subscribers.ContainsKey(messageType)) 67 | { 68 | var sub = _subscribers[messageType] as Subscriber; 69 | sub.Remove(subscriber); 70 | } 71 | } 72 | #endregion 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Aggregator/Aggregator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4793c857cb0927443b155e07c4a08c51 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/PublishSubscribe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Agate.MVC.Core 4 | { 5 | public class PublishSubscribe 6 | { 7 | private static PublishSubscribe _instance; 8 | public static PublishSubscribe Instance 9 | { 10 | get 11 | { 12 | if (_instance == null) 13 | { 14 | _instance = new PublishSubscribe(); 15 | } 16 | return _instance; 17 | } 18 | } 19 | 20 | protected PublishSubscribe() { } 21 | 22 | private Aggregator _aggregator = new Aggregator(); 23 | 24 | public virtual void Publish(TMessage message) where TMessage : struct 25 | { 26 | _aggregator.Publish(message); 27 | } 28 | 29 | public virtual void Subscribe(Action subscriber) where TMessage : struct 30 | { 31 | _aggregator.Subscribe(subscriber); 32 | } 33 | 34 | public virtual void UnsubscribeAll() 35 | { 36 | _aggregator.UnsubscribeAll(); 37 | } 38 | 39 | public virtual void UnsubscribeAll() where TMessage : struct 40 | { 41 | _aggregator.UnsubscribeAll(); 42 | } 43 | 44 | public virtual void Unsubscribe(Action subscriber) where TMessage : struct 45 | { 46 | _aggregator.Unsubscribe(subscriber); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/PublishSubscribe.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 244f834dcedcc104e9977645858f3c92 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Subscribe.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3d531ddfe70557419b30716bd923f33 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Subscribe/ISubscribe.cs: -------------------------------------------------------------------------------- 1 | namespace Agate.MVC.Core 2 | { 3 | public interface ISubscribe 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Subscribe/ISubscribe.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9393165a8e1abc54899694a4c42d1457 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Subscribe/Subscriber.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Agate.MVC.Core 5 | { 6 | public class Subscriber : ISubscribe 7 | { 8 | protected List> _subscribers = new List>(); 9 | 10 | public void Add(Action subscriber) 11 | { 12 | _subscribers.Add(subscriber); 13 | } 14 | 15 | public void Remove(Action subscriber) 16 | { 17 | _subscribers.Remove(subscriber); 18 | } 19 | 20 | public void SendMessage(TMessage message) 21 | { 22 | foreach (var sub in _subscribers) 23 | { 24 | sub(message); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Core/PubSub/Subscribe/Subscriber.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d093ca7bc43882548a7292a801b0b5c0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Framework.Architecture.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Agate.MVC", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Packages/com.agate.mvc/Runtime/Framework.Architecture.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f533272193062c549bb514633d9e7783 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.agate.mvc", 3 | "version": "1.0.0", 4 | "displayName": "Agate MVC", 5 | "unity": "2019.1", 6 | "keywords": [ 7 | "MVC", 8 | "Framework" 9 | ], 10 | "author": { 11 | "name": "Agate International", 12 | "email": "wafi@agate.id", 13 | "url": "https://agate.id/" 14 | }, 15 | "description": "MVC Framework for Unity" 16 | } 17 | -------------------------------------------------------------------------------- /Packages/com.agate.mvc/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47ae4cb3f5d2bdd438400fd9a57d997e 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.animation": "7.0.4", 4 | "com.unity.2d.sprite": "1.0.0", 5 | "com.unity.ide.vscode": "1.2.5", 6 | "com.unity.textmeshpro": "3.0.6", 7 | "com.unity.ugui": "1.0.0", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.androidjni": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.agate.mvc": { 4 | "version": "file:com.agate.mvc", 5 | "depth": 0, 6 | "source": "embedded", 7 | "dependencies": {} 8 | }, 9 | "com.unity.2d.animation": { 10 | "version": "7.0.4", 11 | "depth": 0, 12 | "source": "registry", 13 | "dependencies": { 14 | "com.unity.2d.common": "6.0.3", 15 | "com.unity.2d.sprite": "1.0.0", 16 | "com.unity.modules.animation": "1.0.0", 17 | "com.unity.modules.uielements": "1.0.0" 18 | }, 19 | "url": "https://packages.unity.com" 20 | }, 21 | "com.unity.2d.common": { 22 | "version": "6.0.3", 23 | "depth": 1, 24 | "source": "registry", 25 | "dependencies": { 26 | "com.unity.2d.sprite": "1.0.0", 27 | "com.unity.mathematics": "1.1.0", 28 | "com.unity.modules.uielements": "1.0.0", 29 | "com.unity.burst": "1.5.1" 30 | }, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.2d.sprite": { 34 | "version": "1.0.0", 35 | "depth": 0, 36 | "source": "builtin", 37 | "dependencies": {} 38 | }, 39 | "com.unity.burst": { 40 | "version": "1.6.5", 41 | "depth": 2, 42 | "source": "registry", 43 | "dependencies": { 44 | "com.unity.mathematics": "1.2.1" 45 | }, 46 | "url": "https://packages.unity.com" 47 | }, 48 | "com.unity.ide.vscode": { 49 | "version": "1.2.5", 50 | "depth": 0, 51 | "source": "registry", 52 | "dependencies": {}, 53 | "url": "https://packages.unity.com" 54 | }, 55 | "com.unity.mathematics": { 56 | "version": "1.2.6", 57 | "depth": 2, 58 | "source": "registry", 59 | "dependencies": {}, 60 | "url": "https://packages.unity.com" 61 | }, 62 | "com.unity.textmeshpro": { 63 | "version": "3.0.6", 64 | "depth": 0, 65 | "source": "registry", 66 | "dependencies": { 67 | "com.unity.ugui": "1.0.0" 68 | }, 69 | "url": "https://packages.unity.com" 70 | }, 71 | "com.unity.ugui": { 72 | "version": "1.0.0", 73 | "depth": 0, 74 | "source": "builtin", 75 | "dependencies": { 76 | "com.unity.modules.ui": "1.0.0", 77 | "com.unity.modules.imgui": "1.0.0" 78 | } 79 | }, 80 | "com.unity.modules.ai": { 81 | "version": "1.0.0", 82 | "depth": 0, 83 | "source": "builtin", 84 | "dependencies": {} 85 | }, 86 | "com.unity.modules.androidjni": { 87 | "version": "1.0.0", 88 | "depth": 0, 89 | "source": "builtin", 90 | "dependencies": {} 91 | }, 92 | "com.unity.modules.animation": { 93 | "version": "1.0.0", 94 | "depth": 0, 95 | "source": "builtin", 96 | "dependencies": {} 97 | }, 98 | "com.unity.modules.assetbundle": { 99 | "version": "1.0.0", 100 | "depth": 0, 101 | "source": "builtin", 102 | "dependencies": {} 103 | }, 104 | "com.unity.modules.audio": { 105 | "version": "1.0.0", 106 | "depth": 0, 107 | "source": "builtin", 108 | "dependencies": {} 109 | }, 110 | "com.unity.modules.cloth": { 111 | "version": "1.0.0", 112 | "depth": 0, 113 | "source": "builtin", 114 | "dependencies": { 115 | "com.unity.modules.physics": "1.0.0" 116 | } 117 | }, 118 | "com.unity.modules.director": { 119 | "version": "1.0.0", 120 | "depth": 0, 121 | "source": "builtin", 122 | "dependencies": { 123 | "com.unity.modules.audio": "1.0.0", 124 | "com.unity.modules.animation": "1.0.0" 125 | } 126 | }, 127 | "com.unity.modules.imageconversion": { 128 | "version": "1.0.0", 129 | "depth": 0, 130 | "source": "builtin", 131 | "dependencies": {} 132 | }, 133 | "com.unity.modules.imgui": { 134 | "version": "1.0.0", 135 | "depth": 0, 136 | "source": "builtin", 137 | "dependencies": {} 138 | }, 139 | "com.unity.modules.jsonserialize": { 140 | "version": "1.0.0", 141 | "depth": 0, 142 | "source": "builtin", 143 | "dependencies": {} 144 | }, 145 | "com.unity.modules.particlesystem": { 146 | "version": "1.0.0", 147 | "depth": 0, 148 | "source": "builtin", 149 | "dependencies": {} 150 | }, 151 | "com.unity.modules.physics": { 152 | "version": "1.0.0", 153 | "depth": 0, 154 | "source": "builtin", 155 | "dependencies": {} 156 | }, 157 | "com.unity.modules.physics2d": { 158 | "version": "1.0.0", 159 | "depth": 0, 160 | "source": "builtin", 161 | "dependencies": {} 162 | }, 163 | "com.unity.modules.screencapture": { 164 | "version": "1.0.0", 165 | "depth": 0, 166 | "source": "builtin", 167 | "dependencies": { 168 | "com.unity.modules.imageconversion": "1.0.0" 169 | } 170 | }, 171 | "com.unity.modules.subsystems": { 172 | "version": "1.0.0", 173 | "depth": 1, 174 | "source": "builtin", 175 | "dependencies": { 176 | "com.unity.modules.jsonserialize": "1.0.0" 177 | } 178 | }, 179 | "com.unity.modules.terrain": { 180 | "version": "1.0.0", 181 | "depth": 0, 182 | "source": "builtin", 183 | "dependencies": {} 184 | }, 185 | "com.unity.modules.terrainphysics": { 186 | "version": "1.0.0", 187 | "depth": 0, 188 | "source": "builtin", 189 | "dependencies": { 190 | "com.unity.modules.physics": "1.0.0", 191 | "com.unity.modules.terrain": "1.0.0" 192 | } 193 | }, 194 | "com.unity.modules.tilemap": { 195 | "version": "1.0.0", 196 | "depth": 0, 197 | "source": "builtin", 198 | "dependencies": { 199 | "com.unity.modules.physics2d": "1.0.0" 200 | } 201 | }, 202 | "com.unity.modules.ui": { 203 | "version": "1.0.0", 204 | "depth": 0, 205 | "source": "builtin", 206 | "dependencies": {} 207 | }, 208 | "com.unity.modules.uielements": { 209 | "version": "1.0.0", 210 | "depth": 0, 211 | "source": "builtin", 212 | "dependencies": { 213 | "com.unity.modules.ui": "1.0.0", 214 | "com.unity.modules.imgui": "1.0.0", 215 | "com.unity.modules.jsonserialize": "1.0.0", 216 | "com.unity.modules.uielementsnative": "1.0.0" 217 | } 218 | }, 219 | "com.unity.modules.uielementsnative": { 220 | "version": "1.0.0", 221 | "depth": 1, 222 | "source": "builtin", 223 | "dependencies": { 224 | "com.unity.modules.ui": "1.0.0", 225 | "com.unity.modules.imgui": "1.0.0", 226 | "com.unity.modules.jsonserialize": "1.0.0" 227 | } 228 | }, 229 | "com.unity.modules.umbra": { 230 | "version": "1.0.0", 231 | "depth": 0, 232 | "source": "builtin", 233 | "dependencies": {} 234 | }, 235 | "com.unity.modules.unityanalytics": { 236 | "version": "1.0.0", 237 | "depth": 0, 238 | "source": "builtin", 239 | "dependencies": { 240 | "com.unity.modules.unitywebrequest": "1.0.0", 241 | "com.unity.modules.jsonserialize": "1.0.0" 242 | } 243 | }, 244 | "com.unity.modules.unitywebrequest": { 245 | "version": "1.0.0", 246 | "depth": 0, 247 | "source": "builtin", 248 | "dependencies": {} 249 | }, 250 | "com.unity.modules.unitywebrequestassetbundle": { 251 | "version": "1.0.0", 252 | "depth": 0, 253 | "source": "builtin", 254 | "dependencies": { 255 | "com.unity.modules.assetbundle": "1.0.0", 256 | "com.unity.modules.unitywebrequest": "1.0.0" 257 | } 258 | }, 259 | "com.unity.modules.unitywebrequestaudio": { 260 | "version": "1.0.0", 261 | "depth": 0, 262 | "source": "builtin", 263 | "dependencies": { 264 | "com.unity.modules.unitywebrequest": "1.0.0", 265 | "com.unity.modules.audio": "1.0.0" 266 | } 267 | }, 268 | "com.unity.modules.unitywebrequesttexture": { 269 | "version": "1.0.0", 270 | "depth": 0, 271 | "source": "builtin", 272 | "dependencies": { 273 | "com.unity.modules.unitywebrequest": "1.0.0", 274 | "com.unity.modules.imageconversion": "1.0.0" 275 | } 276 | }, 277 | "com.unity.modules.unitywebrequestwww": { 278 | "version": "1.0.0", 279 | "depth": 0, 280 | "source": "builtin", 281 | "dependencies": { 282 | "com.unity.modules.unitywebrequest": "1.0.0", 283 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 284 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 285 | "com.unity.modules.audio": "1.0.0", 286 | "com.unity.modules.assetbundle": "1.0.0", 287 | "com.unity.modules.imageconversion": "1.0.0" 288 | } 289 | }, 290 | "com.unity.modules.vehicles": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.physics": "1.0.0" 296 | } 297 | }, 298 | "com.unity.modules.video": { 299 | "version": "1.0.0", 300 | "depth": 0, 301 | "source": "builtin", 302 | "dependencies": { 303 | "com.unity.modules.audio": "1.0.0", 304 | "com.unity.modules.ui": "1.0.0", 305 | "com.unity.modules.unitywebrequest": "1.0.0" 306 | } 307 | }, 308 | "com.unity.modules.vr": { 309 | "version": "1.0.0", 310 | "depth": 0, 311 | "source": "builtin", 312 | "dependencies": { 313 | "com.unity.modules.jsonserialize": "1.0.0", 314 | "com.unity.modules.physics": "1.0.0", 315 | "com.unity.modules.xr": "1.0.0" 316 | } 317 | }, 318 | "com.unity.modules.wind": { 319 | "version": "1.0.0", 320 | "depth": 0, 321 | "source": "builtin", 322 | "dependencies": {} 323 | }, 324 | "com.unity.modules.xr": { 325 | "version": "1.0.0", 326 | "depth": 0, 327 | "source": "builtin", 328 | "dependencies": { 329 | "com.unity.modules.physics": "1.0.0", 330 | "com.unity.modules.jsonserialize": "1.0.0", 331 | "com.unity.modules.subsystems": "1.0.0" 332 | } 333 | } 334 | } 335 | } 336 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Example/Scene/Home.unity 10 | guid: 808168e7b41518942b37639ff3f788e9 11 | - enabled: 1 12 | path: Assets/Example/Scene/Idle.unity 13 | guid: 9a30eac6c732acc47b771370a2d5b347 14 | - enabled: 1 15 | path: Assets/Example/Scene/Splash.unity 16 | guid: be5890b40fc580e468299fdba4ba740f 17 | m_configObjects: {} 18 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 1 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | m_AssetPipelineMode: 1 32 | m_CacheServerMode: 0 33 | m_CacheServerEndpoint: 34 | m_CacheServerNamespacePrefix: default 35 | m_CacheServerEnableDownload: 1 36 | m_CacheServerEnableUpload: 1 37 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_LogWhenShaderIsCompiled: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.1f1 2 | m_EditorVersionWithRevision: 2021.3.1f1 (3b70a0754835) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo Switch: 5 229 | PS4: 5 230 | Stadia: 5 231 | Standalone: 5 232 | WebGL: 3 233 | Windows Store Apps: 5 234 | XboxOne: 5 235 | iPhone: 2 236 | tvOS: 2 237 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /ProjectSettings/boot.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgateInternational/MVC/43ccab0612fae735f60cebdb6b7fda0b5824c937/ProjectSettings/boot.config -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | **Agate MVC Framework** is a toolkit for game developer that uses Unity as their game engine’s of choices. It’s goal is to make developing project easier and more structured rather than starting from scratch. By providing an easy access to implementing known programming concept such as **Dependency Injection** and **Pub Sub** pattern, **Agate MVC Framework** lets you focus more on developing your project while maintaining modularity of your code to follow MVC pattern. 3 | 4 | ## Do you need Agate MVC Framework? 5 | 6 | **Agate MVC Framework** will be your go-to, if : 7 | 8 | - You need to maintain and expand your code in a long time, 9 | - You need clear responsibility for each of your module, 10 | - You want to avoid Spaghetti code, 11 | - You need your game easy to scale, 12 | - You want new programmer have easier time navigating through big codebase. 13 | - You need better readability for your code 14 | 15 | In conclusion, **Agate MVC Framework** can help your project code have clearer responsibility, and better scalability in future. Do note that since implementing **Agate MVC Framework** requires time for setup and designing, if your game is simple and very much straightforward with small amount of code, you don’t really need to use **Agate MVC Framework**. 16 | 17 | Although learning a new framework can somewhat be difficult yet exciting at the same time. To ease your journey, we’ve created a go-to list for you to read below : 18 | 19 | - [Good-to-know Programming Concept](https://www.notion.so/Agate-MVC-Framework-750fd583975d401ab0aadf545a7a260f) - A list of programming concept that would be helpful in using **Agate MVC Framework**. 20 | - [Getting started](https://www.notion.so/Agate-MVC-Framework-750fd583975d401ab0aadf545a7a260f) - Get to know step by step on how to install and use modules that covered in **Agate MVC Framework** such as MVC itself, Dependency Injection, and Pub Sub. 21 | - [API Documentation](https://www.notion.so/Agate-MVC-Framework-750fd583975d401ab0aadf545a7a260f) - Learn how each base class constructed and what they do. 22 | 23 | After reading those bite sized reads, you can start implementing **Agate MVC Framework**. Head to [Usage Manual](https://www.notion.so/Agate-MVC-Framework-750fd583975d401ab0aadf545a7a260f) for additional guidance on how you work with **Agate MVC Framework** or you can go to [Examples](https://www.notion.so/Agate-MVC-Framework-750fd583975d401ab0aadf545a7a260f) to see how **Agate MVC Framework** applied to games! 24 | 25 | # Documentation 26 | To learn how to use this framework, you can visit [Documentation Page](http://s.agate.id/mvc) 27 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedSceneGuid-0: 9 | value: 5507010006045e5a5a56587b47700e44134e4d73292d7f64747f186ae7b8603b 10 | flags: 0 11 | RecentlyUsedSceneGuid-1: 12 | value: 0154015e5c050b0f5d080f7748735a44404f4a73752e22322c7d1f32b5b4643e 13 | flags: 0 14 | RecentlyUsedSceneGuid-2: 15 | value: 5a50075600540a0d0e595f7011205c4441154f7d7d7b71602c7b1966e0b3606f 16 | flags: 0 17 | RecentlyUsedSceneGuid-3: 18 | value: 5b010c57530d0c0c0f5a5d77417b064444154b7d7a7b7f362b7a1b64bab83161 19 | flags: 0 20 | RecentlyUsedScenePath-0: 21 | value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d 22 | flags: 0 23 | vcSharedLogLevel: 24 | value: 0d5e400f0650 25 | flags: 0 26 | m_VCAutomaticAdd: 1 27 | m_VCDebugCom: 0 28 | m_VCDebugCmd: 0 29 | m_VCDebugOut: 0 30 | m_SemanticMergeMode: 2 31 | m_DesiredImportWorkerCount: 2 32 | m_StandbyImportWorkerCount: 2 33 | m_IdleImportWorkerShutdownDelay: 60000 34 | m_VCShowFailedCheckout: 1 35 | m_VCOverwriteFailedCheckoutAssets: 1 36 | m_VCProjectOverlayIcons: 1 37 | m_VCHierarchyOverlayIcons: 1 38 | m_VCOtherOverlayIcons: 1 39 | m_VCAllowAsyncUpdate: 1 40 | m_ArtifactGarbageCollection: 1 41 | -------------------------------------------------------------------------------- /UserSettings/Search.settings: -------------------------------------------------------------------------------- 1 | {} --------------------------------------------------------------------------------