├── .gitattributes
├── .gitignore
├── .vs
└── DesignPatterns
│ ├── v15
│ └── Server
│ │ └── sqlite3
│ │ ├── db.lock
│ │ └── storage.ide
│ └── xs
│ ├── UserPrefs.xml
│ ├── project-cache
│ ├── Assembly-CSharp-Debug.json
│ ├── LeanCommon-Debug.json
│ ├── LeanPool-Debug.json
│ └── Tests-Debug.json
│ └── sqlite3
│ ├── db.lock
│ └── storage.ide
├── .vsconfig
├── Assets
├── BuilderDesignPattern.meta
├── BuilderDesignPattern
│ ├── BuilderDesignPatternDemo.unity
│ ├── BuilderDesignPatternDemo.unity.meta
│ ├── Scripts.meta
│ └── Scripts
│ │ ├── BuilderPatternDemo.cs
│ │ ├── BuilderPatternDemo.cs.meta
│ │ ├── BurgerShop.meta
│ │ ├── BurgerShop
│ │ ├── BeefBurgerBuilder.cs
│ │ ├── BeefBurgerBuilder.cs.meta
│ │ ├── Burger.cs
│ │ ├── Burger.cs.meta
│ │ ├── BurgerDirector.cs
│ │ ├── BurgerDirector.cs.meta
│ │ ├── BurgerShopDemo.cs
│ │ ├── BurgerShopDemo.cs.meta
│ │ ├── IBurgerBuilder.cs
│ │ ├── IBurgerBuilder.cs.meta
│ │ ├── VeggieBurgerBuilder.cs
│ │ └── VeggieBurgerBuilder.cs.meta
│ │ ├── CarBuilder.cs
│ │ ├── CarBuilder.cs.meta
│ │ ├── Director.cs
│ │ ├── Director.cs.meta
│ │ ├── TruckBuilder.cs
│ │ ├── TruckBuilder.cs.meta
│ │ ├── Vehicle.cs
│ │ ├── Vehicle.cs.meta
│ │ ├── VehicleBuilder.cs
│ │ └── VehicleBuilder.cs.meta
├── CommandDesignPattern.meta
├── CommandDesignPattern
│ ├── Materials.meta
│ ├── Materials
│ │ ├── Actor.mat
│ │ ├── Actor.mat.meta
│ │ ├── Ground.mat
│ │ └── Ground.mat.meta
│ ├── Scenes.meta
│ ├── Scenes
│ │ ├── CommandDesignPattern.unity
│ │ └── CommandDesignPattern.unity.meta
│ ├── Scripts.meta
│ └── Scripts
│ │ ├── Actor.cs
│ │ ├── Actor.cs.meta
│ │ ├── AppEventManager.cs
│ │ ├── AppEventManager.cs.meta
│ │ ├── AppManager.cs
│ │ ├── AppManager.cs.meta
│ │ ├── BaseObject.cs
│ │ ├── BaseObject.cs.meta
│ │ ├── Command.cs
│ │ ├── Command.cs.meta
│ │ ├── GameManager.cs
│ │ ├── GameManager.cs.meta
│ │ ├── InputHandler.cs
│ │ ├── InputHandler.cs.meta
│ │ ├── JumpCommand.cs
│ │ ├── JumpCommand.cs.meta
│ │ ├── MoveDownCommand.cs
│ │ ├── MoveDownCommand.cs.meta
│ │ ├── MoveLeftCommand.cs
│ │ ├── MoveLeftCommand.cs.meta
│ │ ├── MoveRightCommand.cs
│ │ ├── MoveRightCommand.cs.meta
│ │ ├── MoveUpCommand.cs
│ │ └── MoveUpCommand.cs.meta
├── CommonScripts.meta
├── CommonScripts
│ ├── CameraManager.cs
│ └── CameraManager.cs.meta
├── ComponentDesignPattern.meta
├── ComponentDesignPattern
│ ├── ComponentDesignPatternDemo.unity
│ ├── ComponentDesignPatternDemo.unity.meta
│ ├── Scripts.meta
│ └── Scripts
│ │ ├── Atletic.cs
│ │ ├── Atletic.cs.meta
│ │ ├── ComponentDesignPatternDemo.cs
│ │ ├── ComponentDesignPatternDemo.cs.meta
│ │ ├── JumpAbility.cs
│ │ ├── JumpAbility.cs.meta
│ │ ├── Jumper.cs
│ │ ├── Jumper.cs.meta
│ │ ├── PhysicsComponent.cs
│ │ ├── PhysicsComponent.cs.meta
│ │ ├── Player.cs
│ │ ├── Player.cs.meta
│ │ ├── RunAbility.cs
│ │ ├── RunAbility.cs.meta
│ │ ├── Runner.cs
│ │ └── Runner.cs.meta
├── DecoraterDesignPattern.meta
├── DecoraterDesignPattern
│ ├── Attack.cs
│ ├── Attack.cs.meta
│ ├── AttackDecorator.cs
│ ├── AttackDecorator.cs.meta
│ ├── DecoraterDesignDemo.cs
│ ├── DecoraterDesignDemo.cs.meta
│ ├── FireAttackDecorator.cs
│ ├── FireAttackDecorator.cs.meta
│ ├── HighKick.cs
│ ├── HighKick.cs.meta
│ ├── PoisonAttackDecorator.cs
│ ├── PoisonAttackDecorator.cs.meta
│ ├── Punch.cs
│ └── Punch.cs.meta
├── FactoryDesignPattern.meta
├── FactoryDesignPattern
│ ├── Cube.cs
│ ├── Cube.cs.meta
│ ├── Shape.cs
│ ├── Shape.cs.meta
│ ├── ShapeFactory.cs
│ ├── ShapeFactory.cs.meta
│ ├── ShapeRenderer.cs
│ ├── ShapeRenderer.cs.meta
│ ├── ShapeTypeContainer.cs
│ ├── ShapeTypeContainer.cs.meta
│ ├── Sphere.cs
│ └── Sphere.cs.meta
├── MVC.meta
├── MVC
│ ├── BuildingController.cs
│ ├── BuildingController.cs.meta
│ ├── BuildingModel.cs
│ ├── BuildingModel.cs.meta
│ ├── BuildingView.cs
│ ├── BuildingView.cs.meta
│ ├── MVCDemo.cs
│ └── MVCDemo.cs.meta
├── ObjectPoolDesignPattern.meta
├── ObjectPoolDesignPattern
│ ├── Prefabs.meta
│ ├── Prefabs
│ │ ├── Bullet.prefab
│ │ └── Bullet.prefab.meta
│ ├── Scenes.meta
│ ├── Scenes
│ │ ├── ObjectPoolDemo.unity
│ │ └── ObjectPoolDemo.unity.meta
│ ├── Scripts.meta
│ └── Scripts
│ │ ├── Bullet.cs
│ │ ├── Bullet.cs.meta
│ │ ├── BulletEventManager.cs
│ │ ├── BulletEventManager.cs.meta
│ │ ├── BulletManager.cs
│ │ ├── BulletManager.cs.meta
│ │ ├── BulletPool.cs
│ │ ├── BulletPool.cs.meta
│ │ ├── Gun.cs
│ │ └── Gun.cs.meta
├── ObserverDesignPattern.meta
├── ObserverDesignPattern
│ ├── Achievement.cs
│ ├── Achievement.cs.meta
│ ├── BabySteps.cs
│ ├── BabySteps.cs.meta
│ ├── ImmortalPlayer.cs
│ ├── ImmortalPlayer.cs.meta
│ ├── ObserverDesignPatternDemo.cs
│ ├── ObserverDesignPatternDemo.cs.meta
│ ├── ScoreDataObserver.cs
│ ├── ScoreDataObserver.cs.meta
│ ├── ScoreDataSubject.cs
│ ├── ScoreDataSubject.cs.meta
│ ├── SuperScorer.cs
│ └── SuperScorer.cs.meta
├── StateDesignPattern.meta
└── StateDesignPattern
│ ├── FiniteStateMachine.cs
│ ├── FiniteStateMachine.cs.meta
│ ├── PlatformerSample.meta
│ ├── PlatformerSample
│ ├── DiveState.cs
│ ├── DiveState.cs.meta
│ ├── IdleState.cs
│ ├── IdleState.cs.meta
│ ├── JumpState.cs
│ ├── JumpState.cs.meta
│ ├── RunState.cs
│ ├── RunState.cs.meta
│ ├── Simulator.cs
│ ├── Simulator.cs.meta
│ ├── Soldier.cs
│ ├── Soldier.cs.meta
│ ├── SoldierFSM.cs
│ ├── SoldierFSM.cs.meta
│ ├── SuperKickState.cs
│ └── SuperKickState.cs.meta
│ ├── Sprites.meta
│ ├── Sprites
│ ├── soldier_duck.png
│ ├── soldier_duck.png.meta
│ ├── soldier_idle.png
│ ├── soldier_idle.png.meta
│ ├── soldier_jump.png
│ ├── soldier_jump.png.meta
│ ├── soldier_kick.png
│ ├── soldier_kick.png.meta
│ ├── soldier_walk1.png
│ ├── soldier_walk1.png.meta
│ ├── soldier_walk2.png
│ └── soldier_walk2.png.meta
│ ├── State.cs
│ ├── State.cs.meta
│ ├── StateDesignPatternScene.unity
│ └── StateDesignPatternScene.unity.meta
├── Logs
├── ApiUpdaterCheck.txt
├── AssetImportWorker0.log
├── Packages-Update.log
├── shadercompiler-AssetImportWorker0.log
├── shadercompiler-UnityShaderCompiler.exe0.log
├── shadercompiler-UnityShaderCompiler.exe1.log
└── shadercompiler-UnityShaderCompiler.exe2.log
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NetworkManager.asset
├── PackageManagerSettings.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── XRSettings.asset
└── UserSettings
└── EditorUserSettings.asset
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /[Ll]ibrary/
2 | /[Tt]emp/
3 | /[Oo]bj/
4 | /[Bb]uild/
5 | /[Bb]uilds/
6 | /Assets/AssetStoreTools*
7 |
8 | # Autogenerated VS/MD solution and project files
9 | ExportedObj/
10 | *.csproj
11 | *.unityproj
12 | *.sln
13 | *.suo
14 | *.tmp
15 | *.user
16 | *.userprefs
17 | *.pidb
18 | *.booproj
19 | *.svd
20 |
21 |
22 | # Unity3D generated meta files
23 | *.pidb.meta
24 |
25 | # Unity3D Generated File On Crash Reports
26 | sysinfo.txt
27 |
28 | # Builds
29 | *.apk
30 | *.unitypackage
31 |
32 | # =========================
33 | # Operating System Files
34 | # =========================
35 |
36 | # OSX
37 | # =========================
38 |
39 | .DS_Store
40 | .AppleDouble
41 | .LSOverride
42 |
43 | # Thumbnails
44 | ._*
45 |
46 | # Files that might appear in the root of a volume
47 | .DocumentRevisions-V100
48 | .fseventsd
49 | .Spotlight-V100
50 | .TemporaryItems
51 | .Trashes
52 | .VolumeIcon.icns
53 |
54 | # Directories potentially created on remote AFP share
55 | .AppleDB
56 | .AppleDesktop
57 | Network Trash Folder
58 | Temporary Items
59 | .apdisk
60 |
61 | # Windows
62 | # =========================
63 |
64 | # Windows image file caches
65 | Thumbs.db
66 | ehthumbs.db
67 |
68 | # Folder config file
69 | Desktop.ini
70 |
71 | # Recycle Bin used on file shares
72 | $RECYCLE.BIN/
73 |
74 | # Windows Installer files
75 | *.cab
76 | *.msi
77 | *.msm
78 | *.msp
79 |
80 | # Windows shortcuts
81 | *.lnk
82 |
--------------------------------------------------------------------------------
/.vs/DesignPatterns/v15/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/.vs/DesignPatterns/v15/Server/sqlite3/db.lock
--------------------------------------------------------------------------------
/.vs/DesignPatterns/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/.vs/DesignPatterns/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vs/DesignPatterns/xs/UserPrefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.vs/DesignPatterns/xs/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/.vs/DesignPatterns/xs/sqlite3/db.lock
--------------------------------------------------------------------------------
/.vs/DesignPatterns/xs/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/.vs/DesignPatterns/xs/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vsconfig:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "components": [
4 | "Microsoft.VisualStudio.Workload.ManagedGame"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 99dd661fdb40b6d4dbe8a78324ca8db5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/BuilderDesignPatternDemo.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 3
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_TemporalCoherenceThreshold: 1
54 | m_EnvironmentLightingMode: 0
55 | m_EnableBakedLightmaps: 0
56 | m_EnableRealtimeLightmaps: 0
57 | m_LightmapEditorSettings:
58 | serializedVersion: 10
59 | m_Resolution: 2
60 | m_BakeResolution: 40
61 | m_AtlasSize: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFilterTypeDirect: 0
81 | m_PVRFilterTypeIndirect: 0
82 | m_PVRFilterTypeAO: 0
83 | m_PVRFilteringMode: 1
84 | m_PVRCulling: 1
85 | m_PVRFilteringGaussRadiusDirect: 1
86 | m_PVRFilteringGaussRadiusIndirect: 5
87 | m_PVRFilteringGaussRadiusAO: 2
88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
90 | m_PVRFilteringAtrousPositionSigmaAO: 1
91 | m_ShowResolutionOverlay: 1
92 | m_LightingDataAsset: {fileID: 0}
93 | m_UseShadowmask: 1
94 | --- !u!196 &4
95 | NavMeshSettings:
96 | serializedVersion: 2
97 | m_ObjectHideFlags: 0
98 | m_BuildSettings:
99 | serializedVersion: 2
100 | agentTypeID: 0
101 | agentRadius: 0.5
102 | agentHeight: 2
103 | agentSlope: 45
104 | agentClimb: 0.4
105 | ledgeDropHeight: 0
106 | maxJumpAcrossDistance: 0
107 | minRegionArea: 2
108 | manualCellSize: 0
109 | cellSize: 0.16666667
110 | manualTileSize: 0
111 | tileSize: 256
112 | accuratePlacement: 0
113 | debug:
114 | m_Flags: 0
115 | m_NavMeshData: {fileID: 0}
116 | --- !u!1 &438205297
117 | GameObject:
118 | m_ObjectHideFlags: 0
119 | m_CorrespondingSourceObject: {fileID: 0}
120 | m_PrefabInternal: {fileID: 0}
121 | serializedVersion: 6
122 | m_Component:
123 | - component: {fileID: 438205300}
124 | - component: {fileID: 438205299}
125 | - component: {fileID: 438205298}
126 | - component: {fileID: 438205301}
127 | m_Layer: 0
128 | m_Name: Main Camera
129 | m_TagString: MainCamera
130 | m_Icon: {fileID: 0}
131 | m_NavMeshLayer: 0
132 | m_StaticEditorFlags: 0
133 | m_IsActive: 1
134 | --- !u!81 &438205298
135 | AudioListener:
136 | m_ObjectHideFlags: 0
137 | m_CorrespondingSourceObject: {fileID: 0}
138 | m_PrefabInternal: {fileID: 0}
139 | m_GameObject: {fileID: 438205297}
140 | m_Enabled: 1
141 | --- !u!20 &438205299
142 | Camera:
143 | m_ObjectHideFlags: 0
144 | m_CorrespondingSourceObject: {fileID: 0}
145 | m_PrefabInternal: {fileID: 0}
146 | m_GameObject: {fileID: 438205297}
147 | m_Enabled: 1
148 | serializedVersion: 2
149 | m_ClearFlags: 1
150 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
151 | m_projectionMatrixMode: 1
152 | m_SensorSize: {x: 36, y: 24}
153 | m_LensShift: {x: 0, y: 0}
154 | m_FocalLength: 50
155 | m_NormalizedViewPortRect:
156 | serializedVersion: 2
157 | x: 0
158 | y: 0
159 | width: 1
160 | height: 1
161 | near clip plane: 0.3
162 | far clip plane: 1000
163 | field of view: 60
164 | orthographic: 1
165 | orthographic size: 5
166 | m_Depth: -1
167 | m_CullingMask:
168 | serializedVersion: 2
169 | m_Bits: 4294967295
170 | m_RenderingPath: -1
171 | m_TargetTexture: {fileID: 0}
172 | m_TargetDisplay: 0
173 | m_TargetEye: 3
174 | m_HDR: 1
175 | m_AllowMSAA: 1
176 | m_AllowDynamicResolution: 0
177 | m_ForceIntoRT: 0
178 | m_OcclusionCulling: 1
179 | m_StereoConvergence: 10
180 | m_StereoSeparation: 0.022
181 | --- !u!4 &438205300
182 | Transform:
183 | m_ObjectHideFlags: 0
184 | m_CorrespondingSourceObject: {fileID: 0}
185 | m_PrefabInternal: {fileID: 0}
186 | m_GameObject: {fileID: 438205297}
187 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
188 | m_LocalPosition: {x: 0, y: 0, z: -10}
189 | m_LocalScale: {x: 1, y: 1, z: 1}
190 | m_Children: []
191 | m_Father: {fileID: 0}
192 | m_RootOrder: 0
193 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
194 | --- !u!114 &438205301
195 | MonoBehaviour:
196 | m_ObjectHideFlags: 0
197 | m_CorrespondingSourceObject: {fileID: 0}
198 | m_PrefabInternal: {fileID: 0}
199 | m_GameObject: {fileID: 438205297}
200 | m_Enabled: 1
201 | m_EditorHideFlags: 0
202 | m_Script: {fileID: 11500000, guid: 24d4bc52fd5ea3d45bff42df50040987, type: 3}
203 | m_Name:
204 | m_EditorClassIdentifier:
205 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/BuilderDesignPatternDemo.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 011a71e827b3e284cb699b45e5108847
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9423a3350517edc4a8ca053595691a13
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BuilderPatternDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BuilderPatternDemo : MonoBehaviour {
6 |
7 | void Start () {
8 |
9 | Shop director = new Shop();
10 |
11 | var carBuilder = new CarBuilder();
12 | var truckBuilder = new TruckBuilder();
13 |
14 | director.Construct(carBuilder);
15 | director.Construct(truckBuilder);
16 |
17 | var car = carBuilder.GetVehicle();
18 | var bicycle = truckBuilder.GetVehicle();
19 |
20 | Debug.Log("Car Parts");
21 | car.PrintParts();
22 | Debug.Log("Truck Parts");
23 | bicycle.PrintParts();
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BuilderPatternDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24d4bc52fd5ea3d45bff42df50040987
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f81a38e3314720b408d6ba1f150d526d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BeefBurgerBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace BurgerShop
2 | {
3 | using BurgerShop.DesignPattern.Builder;
4 | using System;
5 |
6 | public class BeefBurgerBuilder : IBurgerBuilder
7 | {
8 | private Burger burger;
9 |
10 | public void AddBread()
11 | {
12 | burger.SetBread("Beef Burger Bread");
13 | }
14 |
15 | public void AddMainElement()
16 | {
17 | burger.SetMainElement("Beef");
18 | }
19 |
20 | public void AddSalad()
21 | {
22 | burger.SetSalad("Green Salad");
23 | }
24 |
25 | public void AddSauce()
26 | {
27 | burger.SetSauce("mustard");
28 | }
29 |
30 | public void Reset()
31 | {
32 | burger = new Burger();
33 | }
34 |
35 | public Burger GetBurger()
36 | {
37 | return burger;
38 | }
39 | }
40 | }
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BeefBurgerBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 123826871be337c4da28b64ea2216953
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/Burger.cs:
--------------------------------------------------------------------------------
1 | namespace BurgerShop
2 | {
3 | public class Burger
4 | {
5 | private string bread;
6 | private string sauce;
7 | private string salad;
8 | private string mainElement;
9 |
10 | public void SetBread(string bread)
11 | {
12 | this.bread = bread;
13 | }
14 |
15 | public void SetSauce(string sauce)
16 | {
17 | this.sauce = sauce;
18 | }
19 |
20 | public void SetSalad(string salad)
21 | {
22 | this.salad = salad;
23 | }
24 |
25 | public void SetMainElement(string mainElement)
26 | {
27 | this.mainElement = mainElement;
28 | }
29 | }
30 | }
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/Burger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3fa686817a71ed4785c8a4c70f8cdce
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BurgerDirector.cs:
--------------------------------------------------------------------------------
1 | namespace BurgerShop.DesignPattern.Builder
2 | {
3 | public class BurgerDirector
4 | {
5 | public void MakeBurger(IBurgerBuilder burgerBuilder)
6 | {
7 | burgerBuilder.Reset();
8 | burgerBuilder.AddBread();
9 | burgerBuilder.AddSauce();
10 | burgerBuilder.AddSalad();
11 | burgerBuilder.AddMainElement();
12 | }
13 | }
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BurgerDirector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 52ac8c65fdc57364fa8c681e103615ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BurgerShopDemo.cs:
--------------------------------------------------------------------------------
1 | namespace BurgerShop
2 | {
3 | using BurgerShop.DesignPattern.Builder;
4 | using UnityEngine;
5 |
6 | public class BurgerShopDemo : MonoBehaviour
7 | {
8 | private void Start()
9 | {
10 | var beefBurgerBuilder = new BeefBurgerBuilder();
11 | var burgerDirector = new BurgerDirector();
12 | burgerDirector.MakeBurger(beefBurgerBuilder);
13 |
14 | var beefBurger = beefBurgerBuilder.GetBurger();
15 |
16 | var veggieBurgerBuilder = new VeggieBurgerBuilder();
17 | burgerDirector.MakeBurger(veggieBurgerBuilder);
18 | var veggieBurger = veggieBurgerBuilder.GetBurger();
19 |
20 | Debug.Log("Making burger process completed!");
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/BurgerShopDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec14517e8382b9744b3c44b281e31d26
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/IBurgerBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace BurgerShop.DesignPattern.Builder
2 | {
3 | public interface IBurgerBuilder
4 | {
5 | void Reset();
6 | void AddBread();
7 | void AddSauce();
8 | void AddSalad();
9 | void AddMainElement();
10 | Burger GetBurger();
11 | }
12 | }
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/IBurgerBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c183a6058fce1b64cb4ab9553ad606ae
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/VeggieBurgerBuilder.cs:
--------------------------------------------------------------------------------
1 | using BurgerShop.DesignPattern.Builder;
2 |
3 | namespace BurgerShop
4 | {
5 | public class VeggieBurgerBuilder : IBurgerBuilder
6 | {
7 | private Burger burger;
8 |
9 | public void AddBread()
10 | {
11 | burger.SetBread("Veggie Bread");
12 | }
13 |
14 | public void AddMainElement()
15 | {
16 | burger.SetMainElement("Veggie Burger");
17 | }
18 |
19 | public void AddSalad()
20 | {
21 | burger.SetSalad("Veggie Salad");
22 | }
23 |
24 | public void AddSauce()
25 | {
26 | burger.SetSauce("Veggie Sauce");
27 | }
28 |
29 | public Burger GetBurger()
30 | {
31 | return burger;
32 | }
33 |
34 | public void Reset()
35 | {
36 | burger = new Burger();
37 | }
38 | }
39 | }
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/BurgerShop/VeggieBurgerBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51fc1296f59e9cf4a96109741260bbdd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/CarBuilder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class CarBuilder : VehicleBuilder
6 | {
7 | public CarBuilder()
8 | {
9 | vehicle = new Vehicle("Car");
10 | }
11 |
12 | public override void BuildEngine()
13 | {
14 | vehicle.MaxEngineRPM = 7500f;
15 | }
16 |
17 | public override void BuildGearbox()
18 | {
19 | vehicle.MaxSpeedsPerGear = new float[]
20 | {
21 | 35f,
22 | 70f,
23 | 85f,
24 | 100f,
25 | 120f,
26 | 150f
27 | };
28 | }
29 |
30 | public override void BuildShape()
31 | {
32 | vehicle.Shape = "Sedan";
33 | }
34 |
35 | public override void BuildWheels()
36 | {
37 | vehicle.WheelCount = 4;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/CarBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 397b6d22c8188f249ab74f0a22ee8a66
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/Director.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Shop : MonoBehaviour {
6 |
7 | public void Construct(VehicleBuilder vehicleBuilder)
8 | {
9 | vehicleBuilder.BuildShape();
10 | vehicleBuilder.BuildEngine();
11 | vehicleBuilder.BuildGearbox();
12 | vehicleBuilder.BuildWheels();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/Director.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6588b8d444d1a7345b58dcc4a2cb2189
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/TruckBuilder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class TruckBuilder : VehicleBuilder
6 | {
7 | public TruckBuilder()
8 | {
9 | vehicle = new Vehicle("Truck");
10 | }
11 |
12 | public override void BuildEngine()
13 | {
14 | vehicle.MaxEngineRPM = 16000f;
15 | }
16 |
17 | public override void BuildGearbox()
18 | {
19 | vehicle.MaxSpeedsPerGear = new float[]
20 | {
21 | 120f,
22 | 200f,
23 | 300f,
24 | 450f,
25 | 60f,
26 | 850f,
27 | 1600f,
28 | 8000f,
29 | 16000f
30 | };
31 | }
32 |
33 | public override void BuildShape()
34 | {
35 | vehicle.Shape = "Muscle Truck";
36 | }
37 |
38 | public override void BuildWheels()
39 | {
40 | vehicle.WheelCount = 12;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/TruckBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e802339610317ff4eab05f121d74a2de
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/Vehicle.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Vehicle {
6 |
7 | private string vehicleType;
8 |
9 | public Vehicle(string vehicleType)
10 | {
11 | this.vehicleType = vehicleType;
12 | }
13 |
14 | public string Shape;
15 | public float MaxEngineRPM;
16 | public float[] MaxSpeedsPerGear;
17 | public int WheelCount;
18 |
19 | public void PrintParts()
20 | {
21 | Debug.Log("Vehicle Type = " + this.vehicleType);
22 | Debug.Log("Shape = " + this.Shape);
23 | Debug.Log("Max Engine RPM = " + this.MaxEngineRPM);
24 | for (int i = 0; i < MaxSpeedsPerGear.Length; i++)
25 | {
26 | Debug.Log("Gear " + i + " speed is " + MaxSpeedsPerGear[i]);
27 | }
28 |
29 | Debug.Log("Wheel Count = " + WheelCount);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/Vehicle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 636ec0544d694b24abcfd11065e8d5fe
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/VehicleBuilder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public abstract class VehicleBuilder {
6 |
7 | protected Vehicle vehicle;
8 |
9 | public Vehicle GetVehicle()
10 | {
11 | return vehicle;
12 | }
13 |
14 | public abstract void BuildShape();
15 | public abstract void BuildEngine();
16 | public abstract void BuildGearbox();
17 | public abstract void BuildWheels();
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/BuilderDesignPattern/Scripts/VehicleBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8b825d3712296104cb3be171befa34d4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9442079a93fe3204581fae5f9d173e73
3 | folderAsset: yes
4 | timeCreated: 1530441105
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f06e0cc6bb87f3545980081db6f66d44
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Materials/Actor.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Actor
10 | m_Shader: {fileID: 47, guid: 0000000000000000f000000000000000, type: 0}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 0
13 | m_EnableInstancingVariants: 0
14 | m_DoubleSidedGI: 0
15 | m_CustomRenderQueue: -1
16 | stringTagMap: {}
17 | disabledShaderPasses: []
18 | m_SavedProperties:
19 | serializedVersion: 3
20 | m_TexEnvs:
21 | - _BumpMap:
22 | m_Texture: {fileID: 0}
23 | m_Scale: {x: 1, y: 1}
24 | m_Offset: {x: 0, y: 0}
25 | - _DetailAlbedoMap:
26 | m_Texture: {fileID: 0}
27 | m_Scale: {x: 1, y: 1}
28 | m_Offset: {x: 0, y: 0}
29 | - _DetailMask:
30 | m_Texture: {fileID: 0}
31 | m_Scale: {x: 1, y: 1}
32 | m_Offset: {x: 0, y: 0}
33 | - _DetailNormalMap:
34 | m_Texture: {fileID: 0}
35 | m_Scale: {x: 1, y: 1}
36 | m_Offset: {x: 0, y: 0}
37 | - _EmissionMap:
38 | m_Texture: {fileID: 0}
39 | m_Scale: {x: 1, y: 1}
40 | m_Offset: {x: 0, y: 0}
41 | - _MainTex:
42 | m_Texture: {fileID: 0}
43 | m_Scale: {x: 1, y: 1}
44 | m_Offset: {x: 0, y: 0}
45 | - _MetallicGlossMap:
46 | m_Texture: {fileID: 0}
47 | m_Scale: {x: 1, y: 1}
48 | m_Offset: {x: 0, y: 0}
49 | - _OcclusionMap:
50 | m_Texture: {fileID: 0}
51 | m_Scale: {x: 1, y: 1}
52 | m_Offset: {x: 0, y: 0}
53 | - _ParallaxMap:
54 | m_Texture: {fileID: 0}
55 | m_Scale: {x: 1, y: 1}
56 | m_Offset: {x: 0, y: 0}
57 | - _SpecGlossMap:
58 | m_Texture: {fileID: 0}
59 | m_Scale: {x: 1, y: 1}
60 | m_Offset: {x: 0, y: 0}
61 | m_Floats:
62 | - _BumpScale: 1
63 | - _Cutoff: 0.5
64 | - _DetailNormalMapScale: 1
65 | - _DstBlend: 0
66 | - _GlossMapScale: 1
67 | - _Glossiness: 0.5
68 | - _GlossyReflections: 1
69 | - _Metallic: 0
70 | - _Mode: 0
71 | - _OcclusionStrength: 1
72 | - _Parallax: 0.02
73 | - _SmoothnessTextureChannel: 0
74 | - _SpecularHighlights: 1
75 | - _SrcBlend: 1
76 | - _UVSec: 0
77 | - _ZWrite: 1
78 | m_Colors:
79 | - _Color: {r: 1, g: 0, b: 0, a: 1}
80 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
81 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Materials/Actor.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 975330b155fd12549a65b9033f74ee15
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Materials/Ground.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Ground
10 | m_Shader: {fileID: 47, guid: 0000000000000000f000000000000000, type: 0}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 0
13 | m_EnableInstancingVariants: 0
14 | m_DoubleSidedGI: 0
15 | m_CustomRenderQueue: -1
16 | stringTagMap: {}
17 | disabledShaderPasses: []
18 | m_SavedProperties:
19 | serializedVersion: 3
20 | m_TexEnvs:
21 | - _BumpMap:
22 | m_Texture: {fileID: 0}
23 | m_Scale: {x: 1, y: 1}
24 | m_Offset: {x: 0, y: 0}
25 | - _DetailAlbedoMap:
26 | m_Texture: {fileID: 0}
27 | m_Scale: {x: 1, y: 1}
28 | m_Offset: {x: 0, y: 0}
29 | - _DetailMask:
30 | m_Texture: {fileID: 0}
31 | m_Scale: {x: 1, y: 1}
32 | m_Offset: {x: 0, y: 0}
33 | - _DetailNormalMap:
34 | m_Texture: {fileID: 0}
35 | m_Scale: {x: 1, y: 1}
36 | m_Offset: {x: 0, y: 0}
37 | - _EmissionMap:
38 | m_Texture: {fileID: 0}
39 | m_Scale: {x: 1, y: 1}
40 | m_Offset: {x: 0, y: 0}
41 | - _MainTex:
42 | m_Texture: {fileID: 0}
43 | m_Scale: {x: 1, y: 1}
44 | m_Offset: {x: 0, y: 0}
45 | - _MetallicGlossMap:
46 | m_Texture: {fileID: 0}
47 | m_Scale: {x: 1, y: 1}
48 | m_Offset: {x: 0, y: 0}
49 | - _OcclusionMap:
50 | m_Texture: {fileID: 0}
51 | m_Scale: {x: 1, y: 1}
52 | m_Offset: {x: 0, y: 0}
53 | - _ParallaxMap:
54 | m_Texture: {fileID: 0}
55 | m_Scale: {x: 1, y: 1}
56 | m_Offset: {x: 0, y: 0}
57 | - _SpecGlossMap:
58 | m_Texture: {fileID: 0}
59 | m_Scale: {x: 1, y: 1}
60 | m_Offset: {x: 0, y: 0}
61 | m_Floats:
62 | - _BumpScale: 1
63 | - _Cutoff: 0.5
64 | - _DetailNormalMapScale: 1
65 | - _DstBlend: 0
66 | - _GlossMapScale: 1
67 | - _Glossiness: 0.5
68 | - _GlossyReflections: 1
69 | - _GridSpacing: 1
70 | - _GridThickness: 0.2
71 | - _Metallic: 0
72 | - _Mode: 0
73 | - _OcclusionStrength: 1
74 | - _Parallax: 0.02
75 | - _SmoothnessTextureChannel: 0
76 | - _SpecularHighlights: 1
77 | - _SrcBlend: 1
78 | - _UVSec: 0
79 | - _ZWrite: 1
80 | m_Colors:
81 | - _BaseColour: {r: 0, g: 0, b: 0, a: 0}
82 | - _Color: {r: 1, g: 1, b: 1, a: 1}
83 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
84 | - _GridColour: {r: 0.754717, g: 0.754717, b: 0.754717, a: 1}
85 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Materials/Ground.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4512c46d6a73dfb478ef4bfbff28677e
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 299e8ba09598e764799493c6db19d6c9
3 | folderAsset: yes
4 | timeCreated: 1530447237
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scenes/CommandDesignPattern.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 721aee1a6323afa46bcc69e2161e50d3
3 | timeCreated: 1530447249
4 | licenseType: Free
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b34eeea514a2074e9c888b546e6fb89
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/Actor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class Actor : BaseObject {
7 |
8 | private Transform _transform;
9 | private Rigidbody _rigidbody;
10 |
11 | private float _jumpForce;
12 | private Vector3 _horizontalMovementDistance;
13 | private Vector3 _verticleMovementDistance;
14 |
15 | public override void AwakeObject()
16 | {
17 | _transform = GetComponent();
18 | _rigidbody = GetComponent();
19 | }
20 |
21 | public override void StartObject()
22 | {
23 | _jumpForce = 100f;
24 | _horizontalMovementDistance = new Vector3(1f, 0, 0);
25 | _verticleMovementDistance = new Vector3(0, 0, 1f);
26 | }
27 |
28 | public void Jump()
29 | {
30 | Debug.Log("JUMP!");
31 | _rigidbody.AddForce(_transform.up * _jumpForce);
32 | }
33 |
34 | public void MoveRight()
35 | {
36 | Debug.Log("MOVE RIGHT!");
37 | var futurePosition = _transform.position + _horizontalMovementDistance;
38 | _rigidbody.MovePosition(futurePosition);
39 | }
40 |
41 | public void MoveLeft()
42 | {
43 | Debug.Log("MOVE LEFT!");
44 | var futurePosition = _transform.position - _horizontalMovementDistance;
45 | _rigidbody.MovePosition(futurePosition);
46 | }
47 |
48 | internal void MoveDown()
49 | {
50 | Debug.Log("MOVE Down!");
51 | var futurePosition = _transform.position - _verticleMovementDistance;
52 | _rigidbody.MovePosition(futurePosition);
53 | }
54 |
55 | internal void MoveUp()
56 | {
57 | Debug.Log("MOVE Up!");
58 | var futurePosition = _transform.position + _verticleMovementDistance;
59 | _rigidbody.MovePosition(futurePosition);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/Actor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a30bb78537d2614ba8a8fb01b910ce6
3 | timeCreated: 1530441421
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/AppEventManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class AppEventManager {
6 |
7 | public delegate void CommandCreatedDelegate(Command command);
8 | public event CommandCreatedDelegate OnCommandCreated;
9 |
10 | public delegate void UndoButtonClickedDelegate();
11 | public event UndoButtonClickedDelegate UndoButtonClicked;
12 |
13 | private static readonly AppEventManager instance = new AppEventManager();
14 |
15 | static AppEventManager()
16 | {
17 | }
18 |
19 | private AppEventManager()
20 | {
21 | }
22 |
23 | public static AppEventManager Instance
24 | {
25 | get
26 | {
27 | return instance;
28 | }
29 | }
30 |
31 | public void CommandCreated(Command command)
32 | {
33 | if (OnCommandCreated != null)
34 | {
35 | OnCommandCreated(command);
36 | }
37 | }
38 |
39 | public void SendUndoRequest()
40 | {
41 | if (UndoButtonClicked != null)
42 | {
43 | UndoButtonClicked();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/AppEventManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca1138d30aa56ee49922dd671ffbb7a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/AppManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class AppManager : MonoBehaviour {
6 |
7 | public GameManager gameManager;
8 | private InputHandler _inputHandler;
9 |
10 | private void Awake()
11 | {
12 | gameManager.AwakeObject();
13 | }
14 |
15 | private void Start()
16 | {
17 | gameManager.StartObject();
18 | _inputHandler = new InputHandler();
19 | }
20 |
21 | public void Update()
22 | {
23 | _inputHandler.HandleInput();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/AppManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4af7301766d29cc4bab710ed89f686e7
3 | timeCreated: 1530442878
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/BaseObject.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BaseObject : MonoBehaviour {
6 |
7 | public virtual void AwakeObject()
8 | {
9 |
10 | }
11 |
12 | public virtual void StartObject()
13 | {
14 |
15 | }
16 |
17 | public virtual void UpdateObject()
18 | {
19 |
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/BaseObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 126ab21afdc956741834f5d4232efd75
3 | timeCreated: 1530443108
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/Command.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public abstract class Command {
6 |
7 | public abstract void Execute(Actor actor);
8 |
9 | public virtual void Undo(Actor actor)
10 | {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/Command.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f43e84364fe069846b1fc909f5c4797a
3 | timeCreated: 1530441240
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/GameManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class GameManager : BaseObject {
6 |
7 | public Actor Player;
8 | private Stack commandStack = new Stack();
9 |
10 | public override void AwakeObject()
11 | {
12 | AppEventManager.Instance.OnCommandCreated += CommandGet;
13 | AppEventManager.Instance.UndoButtonClicked += Undo;
14 | Player.AwakeObject();
15 | }
16 |
17 | private void OnDestroy()
18 | {
19 | AppEventManager.Instance.OnCommandCreated -= CommandGet;
20 | AppEventManager.Instance.UndoButtonClicked -= Undo;
21 | }
22 |
23 | public override void StartObject()
24 | {
25 | Player.StartObject();
26 | }
27 |
28 | private void CommandGet(Command command)
29 | {
30 | AddCommand(command);
31 | InvokeLastCommand();
32 | }
33 | private void InvokeLastCommand()
34 | {
35 | var command = commandStack.Peek();
36 | command.Execute(Player);
37 | }
38 |
39 | private void AddCommand(Command command)
40 | {
41 | commandStack.Push(command);
42 | }
43 |
44 | public void Undo()
45 | {
46 | if (commandStack.Count > 0)
47 | {
48 | var command = commandStack.Pop();
49 | command.Undo(Player);
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/GameManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc6bc3fe17d994944b7ad3d57a498d33
3 | timeCreated: 1530441199
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/InputHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class InputHandler {
6 |
7 | private Command MoveUp;
8 | private Command MoveDown;
9 | private Command MoveRight;
10 | private Command MoveLeft;
11 | private Command Jump;
12 |
13 | public InputHandler()
14 | {
15 | MoveUp = new MoveUpCommand();
16 | MoveDown = new MoveDownCommand();
17 | MoveRight = new MoveRightCommand();
18 | MoveLeft = new MoveLeftCommand();
19 | Jump = new JumpCommand();
20 | }
21 |
22 | public void HandleInput()
23 | {
24 | if (Input.GetKeyDown(KeyCode.A))
25 | {
26 | AppEventManager.Instance.CommandCreated(MoveLeft);
27 | }
28 | else if (Input.GetKeyDown(KeyCode.D))
29 | {
30 | AppEventManager.Instance.CommandCreated(MoveRight);
31 | }
32 | else if (Input.GetKeyDown(KeyCode.Space))
33 | {
34 | AppEventManager.Instance.CommandCreated(Jump);
35 | }
36 | else if (Input.GetKeyDown(KeyCode.W))
37 | {
38 | AppEventManager.Instance.CommandCreated(MoveUp);
39 | }
40 | else if (Input.GetKeyDown(KeyCode.S))
41 | {
42 | AppEventManager.Instance.CommandCreated(MoveDown);
43 | }
44 | else if (Input.GetKeyDown(KeyCode.U))
45 | {
46 | AppEventManager.Instance.SendUndoRequest();
47 | }
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/InputHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: edb79a7c36aa78246bb8b3e9068c5a2a
3 | timeCreated: 1530441138
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/JumpCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class JumpCommand : Command
6 | {
7 | public override void Execute(Actor actor)
8 | {
9 | actor.Jump();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/JumpCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6db771229b6bbe24eba4e3563282684c
3 | timeCreated: 1530444235
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveDownCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class MoveDownCommand : Command
6 | {
7 | public override void Execute(Actor actor)
8 | {
9 | actor.MoveDown();
10 | }
11 |
12 | public override void Undo(Actor actor)
13 | {
14 | actor.MoveUp();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveDownCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d4dc1034c03f73243b624cecdc44f4a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveLeftCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class MoveLeftCommand : Command
6 | {
7 | public override void Execute(Actor actor)
8 | {
9 | actor.MoveLeft();
10 | }
11 |
12 | public override void Undo(Actor actor)
13 | {
14 | actor.MoveRight();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveLeftCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bf129366ad6650d4993e54aea28a3c07
3 | timeCreated: 1530444219
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveRightCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class MoveRightCommand : Command
6 | {
7 | public override void Execute(Actor actor)
8 | {
9 | actor.MoveRight();
10 | }
11 |
12 | public override void Undo(Actor actor)
13 | {
14 | actor.MoveLeft();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveRightCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9c7715e438f49947b6c71df7daa8d2d
3 | timeCreated: 1530443848
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveUpCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class MoveUpCommand : Command
6 | {
7 | public override void Execute(Actor actor)
8 | {
9 | actor.MoveUp();
10 | }
11 |
12 | public override void Undo(Actor actor)
13 | {
14 | actor.MoveDown();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/CommandDesignPattern/Scripts/MoveUpCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b86d03b80712a944cbb3d7bdd7780a04
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/CommonScripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85e3c43fd895d1344bc668956bbf7317
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CommonScripts/CameraManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class CameraManager : MonoBehaviour {
7 |
8 | private static CameraManager instance;
9 | public static CameraManager Instance
10 | {
11 | get
12 | {
13 | if (instance == null)
14 | {
15 | instance = (CameraManager)FindObjectOfType(typeof(CameraManager));
16 | instance.Init();
17 | }
18 |
19 | return instance;
20 | }
21 | }
22 |
23 | private Camera _mainCamera;
24 | private Vector2 _screenSize;
25 | private Transform _transform;
26 | [SerializeField]
27 | private CameraLimits _cameraLimits;
28 |
29 | private void Init()
30 | {
31 | _mainCamera = Camera.main;
32 | _transform = GetComponent();
33 | CalculateScreenSize();
34 | CalculateScreenLimits();
35 | }
36 |
37 | private void CalculateScreenLimits()
38 | {
39 | var cameraTransform = GetComponent();
40 | var xLength = _screenSize.x / 2f;
41 | var yLength = _screenSize.y / 2f;
42 |
43 | _cameraLimits = new CameraLimits
44 | {
45 | xMax = cameraTransform.position.x + xLength,
46 | xMin = cameraTransform.position.x - xLength,
47 | yMax = cameraTransform.position.y + yLength,
48 | yMin = cameraTransform.position.y - yLength
49 | };
50 | }
51 |
52 | private void CalculateScreenSize()
53 | {
54 | float height = 2f * _mainCamera.orthographicSize;
55 | float width = height * _mainCamera.aspect;
56 |
57 | _screenSize = new Vector2(width, height);
58 | }
59 |
60 | public Vector2 GetScreenSize()
61 | {
62 | return _screenSize;
63 | }
64 |
65 | public Vector2 GetPosition()
66 | {
67 | return _transform.position;
68 | }
69 |
70 | public CameraLimits GetCameraLimits()
71 | {
72 | return _cameraLimits;
73 | }
74 | }
75 |
76 | [Serializable]
77 | public struct CameraLimits
78 | {
79 | public float xMax;
80 | public float xMin;
81 | public float yMax;
82 | public float yMin;
83 | }
84 |
--------------------------------------------------------------------------------
/Assets/CommonScripts/CameraManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c02a362f02f53a447aabe33137d8ab80
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e849f4d0683e3a4ebf5aa8288cb8eb5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/ComponentDesignPatternDemo.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ce42238f7b570024caf991afad9d623b
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 197cb9e351085e04ab0053a33ced7bb6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Atletic.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Atletic : Player {
6 |
7 | public override void SetupComponents()
8 | {
9 | physicsComponents = new PhysicsComponent[]
10 | {
11 | new JumpAbility(this, 1.5f, 250f),
12 | new RunAbility(this, 12f, .5f)
13 | };
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Atletic.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7d41d4fb0104ef4e830347b1160586b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/ComponentDesignPatternDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ComponentDesignPatternDemo : MonoBehaviour {
6 |
7 | public Player[] Players;
8 |
9 | void Start ()
10 | {
11 | for (int i = 0; i < Players.Length; i++)
12 | {
13 | Players[i].PlayerStart();
14 | }
15 | }
16 |
17 | void Update ()
18 | {
19 | for (int i = 0; i < Players.Length; i++)
20 | {
21 | Players[i].PlayerUpdate();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/ComponentDesignPatternDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48179aacd53053040986fa98363ae836
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/JumpAbility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class JumpAbility : PhysicsComponent {
7 |
8 | private float jumpFrequency;
9 | private float currentTime;
10 | private float jumpForce;
11 |
12 | public JumpAbility(Player player, float jumpFrequency, float jumpForce)
13 | {
14 | this.player = player;
15 |
16 | currentTime = 0f;
17 | this.jumpFrequency = jumpFrequency;
18 | this.jumpForce = jumpForce;
19 | }
20 |
21 | public override void ComponentUpdate()
22 | {
23 | currentTime += Time.deltaTime;
24 | if (currentTime >= jumpFrequency)
25 | {
26 | Jump();
27 | currentTime = 0;
28 | }
29 | }
30 |
31 | private void Jump()
32 | {
33 | player.GetRigidbody().AddForce(Vector2.up * jumpForce);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/JumpAbility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f019ab8b2b9ea564396f99649ef6aaff
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Jumper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Jumper : Player {
6 |
7 | public override void SetupComponents()
8 | {
9 | physicsComponents = new PhysicsComponent[]
10 | {
11 | new JumpAbility(this, 1f, 600f)
12 | };
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Jumper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d5f5b02bf01193d4fa298744f1944813
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/PhysicsComponent.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class PhysicsComponent {
6 |
7 | protected Player player;
8 |
9 | public virtual void ComponentUpdate()
10 | {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/PhysicsComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b18ed1fd7144b1f41ac80898934909e6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Player.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | [RequireComponent(typeof(Rigidbody2D))]
7 | public abstract class Player : MonoBehaviour {
8 |
9 | protected Transform playerTransform;
10 | protected Rigidbody2D playerRigidbody;
11 | protected PhysicsComponent[] physicsComponents;
12 |
13 | private Vector2 targetPoint;
14 |
15 | public void PlayerStart ()
16 | {
17 | SetupComponents();
18 | playerTransform = GetComponent();
19 | playerRigidbody = GetComponent();
20 | targetPoint = new Vector2(50, 0);
21 | }
22 |
23 | public abstract void SetupComponents();
24 |
25 | public void PlayerUpdate ()
26 | {
27 | if (!CheckIsFinished())
28 | {
29 | for (int i = 0; i < physicsComponents.Length; i++)
30 | {
31 | physicsComponents[i].ComponentUpdate();
32 | }
33 | }
34 | }
35 |
36 | private bool CheckIsFinished()
37 | {
38 | return playerTransform.position.x >= targetPoint.x;
39 | }
40 |
41 | public Transform GetTransform()
42 | {
43 | return playerTransform;
44 | }
45 |
46 | public Rigidbody2D GetRigidbody()
47 | {
48 | return playerRigidbody;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Player.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b4686fc12b367004884ce1c6163c7bc1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/RunAbility.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class RunAbility : PhysicsComponent
6 | {
7 | private float maxSpeed;
8 | private float currentSpeed;
9 | private float acceleration;
10 |
11 | public RunAbility(Player player, float maxSpeed, float acceleration)
12 | {
13 | this.player = player;
14 | this.maxSpeed = maxSpeed;
15 | currentSpeed = 0f;
16 | this.acceleration = acceleration;
17 | }
18 |
19 | public override void ComponentUpdate()
20 | {
21 | var playerRigidbody = player.GetRigidbody();
22 | if (currentSpeed <= maxSpeed)
23 | {
24 | currentSpeed += acceleration;
25 |
26 | }
27 |
28 | playerRigidbody.velocity = new Vector2(currentSpeed, playerRigidbody.velocity.y);
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/RunAbility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ab4614b607614244a0683d0eab1da63
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Runner.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Runner : Player {
6 |
7 | public override void SetupComponents()
8 | {
9 | physicsComponents = new PhysicsComponent[]
10 | {
11 | new RunAbility(this, 25f, 1f)
12 | };
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/Assets/ComponentDesignPattern/Scripts/Runner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dad405fe20108084a8f84e26b880142b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 324857923f2334ff5bd998a3d4991157
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/Attack.cs:
--------------------------------------------------------------------------------
1 |
2 | public class Attack {
3 |
4 | public virtual void SetDamage()
5 | {
6 |
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/Attack.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3377c8b4be1124b46a517810ec053fa6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/AttackDecorator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class AttackDecorator : Attack
6 | {
7 | protected Attack decoratedAttack;
8 |
9 | public AttackDecorator(Attack decoreatedAttack)
10 | {
11 | this.decoratedAttack = decoreatedAttack;
12 | }
13 |
14 | public override void SetDamage()
15 | {
16 | this.decoratedAttack.SetDamage();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/AttackDecorator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20a3688bdbd79433d92d40140114b229
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/DecoraterDesignDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class DecoraterDesignDemo : MonoBehaviour {
6 |
7 | private void Start()
8 | {
9 | Attack punch = new Punch();
10 | Attack poisonPunch = new PoisonAttackDecorator(punch);
11 |
12 | Attack highKick = new HighKick();
13 | Attack poisonHighKick = new PoisonAttackDecorator(highKick);
14 |
15 | Attack poisonedFirePunch = new PoisonAttackDecorator(new FireAttackDecorator(punch));
16 |
17 | poisonPunch.SetDamage();
18 | Debug.Log("*********");
19 | poisonHighKick.SetDamage();
20 | Debug.Log("*********");
21 | poisonedFirePunch.SetDamage();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/DecoraterDesignDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0307cc4b0ff3d4276bb2fa9356b58a39
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/FireAttackDecorator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class FireAttackDecorator : AttackDecorator {
6 |
7 | public FireAttackDecorator(Attack decoreatedAttack) : base(decoreatedAttack)
8 | {
9 | }
10 |
11 | public override void SetDamage()
12 | {
13 | decoratedAttack.SetDamage();
14 | SetFire();
15 | }
16 |
17 | private void SetFire()
18 | {
19 | Debug.Log("Fire Setted");
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/FireAttackDecorator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5062968b82514f79a963c49ab196be4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/HighKick.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class HighKick : Attack
6 | {
7 | public override void SetDamage()
8 | {
9 | Debug.Log("High Kick!");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/HighKick.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed7c2767772bf411da9ef4e579bbb67a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/PoisonAttackDecorator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class PoisonAttackDecorator : AttackDecorator
6 | {
7 | public PoisonAttackDecorator(Attack decoreatedAttack) : base(decoreatedAttack)
8 | {
9 | }
10 |
11 | public override void SetDamage()
12 | {
13 | decoratedAttack.SetDamage();
14 | SetPoison();
15 | }
16 |
17 | private void SetPoison()
18 | {
19 | Debug.Log("Poison Setted!");
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/PoisonAttackDecorator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 110c5d7bb57a94f1ea63b7d9603fec4e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/Punch.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Punch : Attack
6 | {
7 | public override void SetDamage()
8 | {
9 | Debug.Log("Punch!");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Assets/DecoraterDesignPattern/Punch.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9b53165227ca2471fb1e99bb96c20be3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bfebf785b20764486b94aedbb3e2a5c9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Cube.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Cube : Shape
6 | {
7 | private Vector3 _size;
8 |
9 | public Cube(Vector3 center, Vector3 size)
10 | {
11 | _center = center;
12 | _size = size;
13 | }
14 |
15 | public override void Draw()
16 | {
17 | Gizmos.color = Color.red;
18 | Gizmos.DrawCube(_center, _size);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Cube.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54d3d12e22b30400db934ca222b55c49
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Shape.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class Shape {
4 |
5 | protected Vector3 _center;
6 |
7 | public virtual void Draw()
8 | {
9 |
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Shape.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9ab855617cb4647e6bb3ca658a6a823e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ShapeFactory {
6 |
7 | public Shape GetShape(ShapeType shapeType)
8 | {
9 | switch (shapeType)
10 | {
11 | case ShapeType.cube:
12 | return new Cube(new Vector3(10,10,10), new Vector3(50,70,90));
13 | case ShapeType.sphere:
14 | return new Sphere(new Vector3(80,10,10), 30f);
15 | default:
16 | return null;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 913dea61e75af43b5bf231803e2b86b7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class ShapeRenderer : MonoBehaviour {
7 |
8 | private List Shapes;
9 |
10 | void Start ()
11 | {
12 | CreateShapes();
13 | }
14 |
15 | private void CreateShapes()
16 | {
17 | ShapeFactory shapeFactory = new ShapeFactory();
18 | Shapes = new List
19 | {
20 | shapeFactory.GetShape(ShapeType.cube),
21 | shapeFactory.GetShape(ShapeType.sphere)
22 | };
23 | }
24 |
25 | private void OnDrawGizmos()
26 | {
27 | RenderShapes();
28 | }
29 |
30 | private void RenderShapes()
31 | {
32 | if (Shapes != null)
33 | {
34 | for (int i = 0; i < Shapes.Count; i++)
35 | {
36 | Shapes[i].Draw();
37 | }
38 | }
39 |
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeRenderer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aacc4369f26ef4707a61a99e07e5993e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeTypeContainer.cs:
--------------------------------------------------------------------------------
1 | public enum ShapeType
2 | {
3 | cube,
4 | sphere
5 | }
6 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/ShapeTypeContainer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 37e257a42777649f19d5e2d6fd4e3104
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Sphere.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Sphere : Shape
6 | {
7 | private float _radious;
8 |
9 | public Sphere(Vector3 center, float radius)
10 | {
11 | _center = center;
12 | _radious = radius;
13 | }
14 |
15 | public override void Draw()
16 | {
17 | Gizmos.color = Color.black;
18 | Gizmos.DrawSphere(_center, _radious);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/FactoryDesignPattern/Sphere.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ba5b036fdb9542208988249f066a92a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/MVC.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 23d0ad13bd9314b54b7b425476443d0f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class BuildingController
7 | {
8 | private BuildingModel model;
9 | private BuildingView view;
10 |
11 | private BuildingController()
12 | {
13 |
14 | }
15 |
16 | public BuildingController(BuildingModel model, BuildingView view)
17 | {
18 | this.model = model;
19 | this.view = view;
20 |
21 | model.OnNumberOfFloorsChanged += OnNumberOfFloorChanged;
22 | }
23 |
24 | private void OnNumberOfFloorChanged()
25 | {
26 | view.syncNumberOfFloors(model.GetNumberOfFloors());
27 | }
28 |
29 | public void fetchBuildingFloor(int buildingId)
30 | {
31 | model.SetNumberOfFloors(UnityEngine.Random.Range(1, 20));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eb981450cf1b047ec8d83532f731ed57
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BuildingModel
6 | {
7 | public delegate void NumberOfFloorsChangedAction();
8 | public event NumberOfFloorsChangedAction OnNumberOfFloorsChanged;
9 |
10 | private int numberOfFloors;
11 |
12 | public void SetNumberOfFloors(int numberOfFloors)
13 | {
14 | this.numberOfFloors = numberOfFloors;
15 |
16 | OnNumberOfFloorsChanged?.Invoke();//notify listeners
17 | }
18 |
19 | public int GetNumberOfFloors()
20 | {
21 | return numberOfFloors;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingModel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4b6c4a333f9f4f95a7f72630e9b3568
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class BuildingView : MonoBehaviour
7 | {
8 | public void syncNumberOfFloors(int numberOfFloors)
9 | {
10 | Debug.LogFormat("{0} floor(s) constructed!", numberOfFloors);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/MVC/BuildingView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3293977f6a6e54f60896135aa9b86875
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/MVC/MVCDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class MVCDemo : MonoBehaviour
6 | {
7 | // Start is called before the first frame update
8 | void Start()
9 | {
10 | var buildingModel = new BuildingModel();//model is created
11 | var buildingView = new GameObject("buildingView").AddComponent(); //view is created
12 |
13 | var buildingController = new BuildingController(buildingModel, buildingView); // controller is created
14 |
15 | var buildingId = 377;
16 | buildingController.fetchBuildingFloor(buildingId);
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Assets/MVC/MVCDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0da65ec5d02a4bd1b050f1c83cf5648
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd5911687459e4edaa9a7e9c969be689
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a77ef3c73e024cf4690b77faa28c3d84
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Prefabs/Bullet.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1001 &100100000
4 | Prefab:
5 | m_ObjectHideFlags: 1
6 | serializedVersion: 2
7 | m_Modification:
8 | m_TransformParent: {fileID: 0}
9 | m_Modifications: []
10 | m_RemovedComponents: []
11 | m_SourcePrefab: {fileID: 0}
12 | m_RootGameObject: {fileID: 1496817636342450}
13 | m_IsPrefabAsset: 1
14 | --- !u!1 &1496817636342450
15 | GameObject:
16 | m_ObjectHideFlags: 0
17 | m_CorrespondingSourceObject: {fileID: 0}
18 | m_PrefabInternal: {fileID: 100100000}
19 | serializedVersion: 6
20 | m_Component:
21 | - component: {fileID: 4519354310576360}
22 | - component: {fileID: 33019675418810690}
23 | - component: {fileID: 23180690013694564}
24 | - component: {fileID: 114709123056959004}
25 | m_Layer: 0
26 | m_Name: Bullet
27 | m_TagString: Untagged
28 | m_Icon: {fileID: 0}
29 | m_NavMeshLayer: 0
30 | m_StaticEditorFlags: 0
31 | m_IsActive: 1
32 | --- !u!4 &4519354310576360
33 | Transform:
34 | m_ObjectHideFlags: 1
35 | m_CorrespondingSourceObject: {fileID: 0}
36 | m_PrefabInternal: {fileID: 100100000}
37 | m_GameObject: {fileID: 1496817636342450}
38 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
39 | m_LocalPosition: {x: 0, y: 0, z: 0}
40 | m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
41 | m_Children: []
42 | m_Father: {fileID: 0}
43 | m_RootOrder: 0
44 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
45 | --- !u!23 &23180690013694564
46 | MeshRenderer:
47 | m_ObjectHideFlags: 1
48 | m_CorrespondingSourceObject: {fileID: 0}
49 | m_PrefabInternal: {fileID: 100100000}
50 | m_GameObject: {fileID: 1496817636342450}
51 | m_Enabled: 1
52 | m_CastShadows: 1
53 | m_ReceiveShadows: 1
54 | m_DynamicOccludee: 1
55 | m_MotionVectors: 1
56 | m_LightProbeUsage: 1
57 | m_ReflectionProbeUsage: 1
58 | m_RenderingLayerMask: 4294967295
59 | m_Materials:
60 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
61 | m_StaticBatchInfo:
62 | firstSubMesh: 0
63 | subMeshCount: 0
64 | m_StaticBatchRoot: {fileID: 0}
65 | m_ProbeAnchor: {fileID: 0}
66 | m_LightProbeVolumeOverride: {fileID: 0}
67 | m_ScaleInLightmap: 1
68 | m_PreserveUVs: 0
69 | m_IgnoreNormalsForChartDetection: 0
70 | m_ImportantGI: 0
71 | m_StitchLightmapSeams: 0
72 | m_SelectedEditorRenderState: 3
73 | m_MinimumChartSize: 4
74 | m_AutoUVMaxDistance: 0.5
75 | m_AutoUVMaxAngle: 89
76 | m_LightmapParameters: {fileID: 0}
77 | m_SortingLayerID: 0
78 | m_SortingLayer: 0
79 | m_SortingOrder: 0
80 | --- !u!33 &33019675418810690
81 | MeshFilter:
82 | m_ObjectHideFlags: 1
83 | m_CorrespondingSourceObject: {fileID: 0}
84 | m_PrefabInternal: {fileID: 100100000}
85 | m_GameObject: {fileID: 1496817636342450}
86 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
87 | --- !u!114 &114709123056959004
88 | MonoBehaviour:
89 | m_ObjectHideFlags: 1
90 | m_CorrespondingSourceObject: {fileID: 0}
91 | m_PrefabInternal: {fileID: 100100000}
92 | m_GameObject: {fileID: 1496817636342450}
93 | m_Enabled: 1
94 | m_EditorHideFlags: 0
95 | m_Script: {fileID: 11500000, guid: 65f5d313bbc884d949a861b3aa312550, type: 3}
96 | m_Name:
97 | m_EditorClassIdentifier:
98 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Prefabs/Bullet.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ab7042edd1a5f7468cb24003e3269f9
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 100100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0024f7f529b7471fb638fc80dab6d14
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scenes/ObjectPoolDemo.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a098267fbf3484db0979079c41848e80
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3b76062972196344a91cfef518e7d0f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/Bullet.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class Bullet : MonoBehaviour {
7 |
8 | private Transform _transform;
9 | private float _speed;
10 | private Vector2 _movementDirection;
11 | private CameraLimits _movementLimit;
12 |
13 | public void Init()
14 | {
15 | _speed = 10f;
16 | _transform = GetComponent();
17 | _movementLimit = CameraManager.Instance.GetCameraLimits();
18 | }
19 |
20 | public void SetMovementDirection(Vector2 movementDirection)
21 | {
22 | _movementDirection = movementDirection;
23 | }
24 |
25 | public void SetPosition(Vector2 position)
26 | {
27 | _transform.position = position;
28 | }
29 |
30 | public void Move()
31 | {
32 | if (CanMove())
33 | {
34 | _transform.Translate(_movementDirection * _speed * Time.deltaTime);
35 | }
36 | else
37 | {
38 | BulletEventManager.Instance.BulletDeleted(this);
39 | }
40 | }
41 |
42 | private bool CanMove()
43 | {
44 | bool canMove = false;
45 | if (_transform.position.x < _movementLimit.xMax &&
46 | _transform.position.x > _movementLimit.xMin &&
47 | _transform.position.y < _movementLimit.yMax &&
48 | _transform.position.y > _movementLimit.yMin)
49 | {
50 | canMove = true;
51 | }
52 |
53 | return canMove;
54 | }
55 |
56 |
57 | public void ActivateBullet(bool isActive)
58 | {
59 | gameObject.SetActive(isActive);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/Bullet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65f5d313bbc884d949a861b3aa312550
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletEventManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BulletEventManager
6 | {
7 |
8 | public delegate void BulletFiredDelegate(Bullet bullet);
9 | public event BulletFiredDelegate OnBulletFired;
10 |
11 | public delegate void BulletDeletedDelegate(Bullet bullet);
12 | public event BulletDeletedDelegate OnBulletDeleted;
13 |
14 | private static readonly BulletEventManager instance = new BulletEventManager();
15 |
16 | static BulletEventManager()
17 | {
18 | }
19 |
20 | private BulletEventManager()
21 | {
22 | }
23 |
24 | public static BulletEventManager Instance
25 | {
26 | get
27 | {
28 | return instance;
29 | }
30 | }
31 |
32 | public void BulletFired(Bullet bullet)
33 | {
34 | if (OnBulletFired != null)
35 | {
36 | OnBulletFired(bullet);
37 | }
38 | }
39 |
40 | public void BulletDeleted(Bullet bullet)
41 | {
42 | if (OnBulletDeleted != null)
43 | {
44 | OnBulletDeleted(bullet);
45 | }
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletEventManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 30a0c891cd9c8a34bbcf6dc798f808a3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BulletManager : MonoBehaviour {
6 |
7 | [SerializeField]
8 | private List _bulletsOnScene;
9 |
10 | void Start () {
11 |
12 | _bulletsOnScene = new List();
13 | BulletEventManager.Instance.OnBulletFired += BulletFired;
14 | BulletEventManager.Instance.OnBulletDeleted += DeleteBullet;
15 | }
16 |
17 | private void OnDestroy()
18 | {
19 | BulletEventManager.Instance.OnBulletFired -= BulletFired;
20 | BulletEventManager.Instance.OnBulletDeleted -= DeleteBullet;
21 | }
22 |
23 | void Update ()
24 | {
25 | for (int i = 0; i < _bulletsOnScene.Count; i++)
26 | {
27 | _bulletsOnScene[i].Move();
28 | }
29 | }
30 |
31 | private void BulletFired(Bullet bullet)
32 | {
33 | _bulletsOnScene.Add(bullet);
34 | }
35 |
36 | private void DeleteBullet(Bullet bullet)
37 | {
38 | _bulletsOnScene.Remove(bullet);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: df8f4e9a4b8acc94b93a3bcb923ed03b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletPool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class BulletPool : MonoBehaviour {
7 |
8 | private static BulletPool instance;
9 | public static BulletPool Instance
10 | {
11 | get
12 | {
13 | if (instance == null)
14 | {
15 | instance = FindObjectOfType(typeof(BulletPool)) as BulletPool;
16 | }
17 |
18 | return instance;
19 | }
20 | set
21 | {
22 | instance = value;
23 | }
24 | }
25 |
26 | public GameObject BulletPrefab;
27 | [SerializeField]
28 | private Stack _bulletStack;//pool! "kullanıma hazır bütün bullet objeleri burada tutulur"
29 |
30 | private void Awake()
31 | {
32 | if (instance == null)
33 | {
34 | Instance = this;
35 | }
36 |
37 | SetupPool(10);
38 | BulletEventManager.Instance.OnBulletDeleted += PoolBullet;
39 |
40 | }
41 |
42 | private void SetupPool(int count)
43 | {
44 | _bulletStack = new Stack();
45 |
46 | for (int i = 0; i < count; i++)
47 | {
48 | GenerateBullet();
49 | }
50 | }
51 |
52 | private void GenerateBullet()
53 | {
54 | var bullet = Instantiate(BulletPrefab).GetComponent();
55 | bullet.Init();
56 | bullet.ActivateBullet(false);
57 | _bulletStack.Push(bullet);
58 | }
59 |
60 | public Bullet GetBullet()
61 | {
62 | if (_bulletStack.Count == 0)
63 | {
64 | GenerateBullet();
65 | }
66 |
67 | var bullet = _bulletStack.Pop();//en son üretilen ve buraya yerleştirilen bullet alınır!
68 | bullet.ActivateBullet(true);
69 | return bullet;
70 | }
71 |
72 | public void PoolBullet(Bullet bullet)
73 | {
74 | bullet.ActivateBullet(false);
75 | _bulletStack.Push(bullet);
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/BulletPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0671696e8c38d42e1a1d2776fe5eb633
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/Gun.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Gun : MonoBehaviour {
6 |
7 | private Transform _transform;
8 | // Use this for initialization
9 | void Start ()
10 | {
11 | _transform = GetComponent();
12 | StartCoroutine("ShootTheGun");
13 | }
14 |
15 | private IEnumerator ShootTheGun()
16 | {
17 | var wait = new WaitForSeconds(.01f);
18 |
19 | while (true)
20 | {
21 | var bullet = BulletPool.Instance.GetBullet();
22 | bullet.SetPosition(_transform.position);
23 | bullet.SetMovementDirection(new Vector2(UnityEngine.Random.Range(-180,180f), UnityEngine.Random.Range(-180,180f)).normalized);
24 | BulletEventManager.Instance.BulletFired(bullet);
25 | yield return wait;
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/Assets/ObjectPoolDesignPattern/Scripts/Gun.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ad86aa4002274a03997a3cf287d9631
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d507b9536094f44fba10166cb13195f0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/Achievement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Achievement : ScoreDataObserver
6 | {
7 | protected float target;
8 |
9 | public Achievement(ScoreDataSubject subject) : base(subject)
10 | {
11 | }
12 |
13 | public override void OnNotify()
14 | {
15 | if (subject.GetScore() > target)
16 | {
17 | Achieve();
18 | subject.Detach(this);
19 | }
20 | }
21 |
22 | protected virtual void Achieve()
23 | {
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/Achievement.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ca0ea0eac7da408d851775c9107ed4e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/BabySteps.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class BabySteps : Achievement {
6 |
7 | public BabySteps(ScoreDataSubject subject) : base(subject)
8 | {
9 | target = 1;
10 | }
11 |
12 | protected override void Achieve()
13 | {
14 | Debug.Log("Baby Steps Achieved!!!");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/BabySteps.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 999508700225a4beeb2a1523ab2ca58b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ImmortalPlayer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ImmortalPlayer : Achievement
6 | {
7 | public ImmortalPlayer(ScoreDataSubject subject) : base(subject)
8 | {
9 | target = 60;
10 | }
11 |
12 | protected override void Achieve()
13 | {
14 | Debug.Log("Immortal Player Achieved!!!");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ImmortalPlayer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbd7b9364d995429d81e2af9f2d55c2c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ObserverDesignPatternDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ObserverDesignPatternDemo : MonoBehaviour {
6 |
7 | private ScoreDataSubject subject = new ScoreDataSubject();
8 |
9 | void Start ()
10 | {
11 | var superScorer = new SuperScorer(subject);
12 | var babySteps = new BabySteps(subject);
13 | var immortalPlayer = new ImmortalPlayer(subject);
14 |
15 | StartCoroutine("IncreaseScore");
16 |
17 | }
18 |
19 | private IEnumerator IncreaseScore()
20 | {
21 | var wait = new WaitForSeconds(.5f);
22 | var score = 0;
23 | while (true)
24 | {
25 | yield return wait;
26 | subject.SetScore(score++);
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ObserverDesignPatternDemo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ffc6d947fa7054000b7a8144679292ee
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ScoreDataObserver.cs:
--------------------------------------------------------------------------------
1 |
2 | public class ScoreDataObserver
3 | {
4 | protected ScoreDataSubject subject;
5 |
6 | public ScoreDataObserver(ScoreDataSubject subject)
7 | {
8 | this.subject = subject;
9 | subject.Attach(this);
10 | }
11 |
12 | public virtual void OnNotify()
13 | {
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ScoreDataObserver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f184ab1097c604b92af048d50aecec2c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ScoreDataSubject.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | //http://gameprogrammingpatterns.com/
6 | //https://sourcemaking.com/design_patterns/observer/cpp/3
7 |
8 | //subject - we are observing changes on this object
9 | public class ScoreDataSubject {
10 |
11 | private int score;
12 | private List _observers = new List();
13 |
14 | public void Attach(ScoreDataObserver observer)
15 | {
16 | _observers.Add(observer);
17 | }
18 |
19 | public void Detach(ScoreDataObserver observer)
20 | {
21 | _observers.Remove(observer);
22 | }
23 |
24 | public void Notify()
25 | {
26 | for (int i = 0; i < _observers.Count; i++)
27 | {
28 | _observers[i].OnNotify();
29 | }
30 | }
31 |
32 | public int GetScore()
33 | {
34 | return score;
35 | }
36 |
37 | public void SetScore(int score)
38 | {
39 | this.score = score;
40 | Notify();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/ScoreDataSubject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bcf4b6cb51b7646b0b6522737434a887
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/SuperScorer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class SuperScorer : Achievement
6 | {
7 | public SuperScorer(ScoreDataSubject subject) : base(subject)
8 | {
9 | target = 19;
10 | }
11 |
12 | protected override void Achieve()
13 | {
14 | Debug.Log("Super Scorer Achieved!!!");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/ObserverDesignPattern/SuperScorer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4834dacf372344158b00074caa9bff6c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 458addbe9f2ba4d43a2d6a9331dfa69c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/FiniteStateMachine.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public abstract class FiniteStateMachine {
6 |
7 | public abstract void Setup();
8 | public delegate void GraphicChanged(int graphicIndex);
9 | public GraphicChanged OnGraphicChanged;
10 |
11 | protected Dictionary states;
12 | protected State currentState;
13 |
14 | protected Dictionary boolVariables;
15 | protected Dictionary stringVariables;
16 | protected Dictionary floatVariables;
17 |
18 |
19 | public void SetState(string state)
20 | {
21 | CallStateExit();
22 | currentState = states[state];
23 | CallStateEnter();
24 | }
25 |
26 | protected void CallStateEnter()
27 | {
28 | currentState.Enter();
29 | }
30 |
31 | private void CallStateExit()
32 | {
33 | currentState.Exit();
34 | }
35 |
36 | public void CallStateExecute()
37 | {
38 | currentState.Execute();
39 | }
40 |
41 | public void SetBool(string key, bool val)
42 | {
43 | if (boolVariables.ContainsKey(key))
44 | {
45 | boolVariables[key] = val;
46 | }
47 | }
48 |
49 | public bool GetBool(string key)
50 | {
51 | if (boolVariables.ContainsKey(key))
52 | {
53 | return boolVariables[key];
54 | }
55 | else
56 | {
57 | Debug.Log("undefined key error! Please define the key " + key + " first!");
58 | return false;
59 | }
60 | }
61 |
62 | public void SetFloat(string key, float val)
63 | {
64 | if (floatVariables.ContainsKey(key))
65 | {
66 | floatVariables[key] = val;
67 | }
68 | }
69 |
70 | public float GetFloat(string key)
71 | {
72 | if (floatVariables.ContainsKey(key))
73 | {
74 | return floatVariables[key];
75 | }
76 | else
77 | {
78 | Debug.Log("undefined key error! Please define the key " + key + " first!");
79 | return 0;
80 | }
81 | }
82 |
83 | public void SetString(string key, string val)
84 | {
85 | if (stringVariables.ContainsKey(key))
86 | {
87 | stringVariables[key] = val;
88 | }
89 | }
90 |
91 | public string GetString(string key)
92 | {
93 | if (floatVariables.ContainsKey(key))
94 | {
95 | return stringVariables[key];
96 | }
97 | else
98 | {
99 | Debug.Log("undefined key error! Please define the key " + key + " first!");
100 | return string.Empty;
101 | }
102 | }
103 |
104 | public void ChangePlayingGraphicIndex(int index)
105 | {
106 | if (OnGraphicChanged != null)
107 | {
108 | OnGraphicChanged(index);
109 | }
110 | }
111 |
112 | }
113 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/FiniteStateMachine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f3cf8f5a5b678584385f816db5314911
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97e8fc0002105fc4eb853e4709e4d632
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/DiveState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class DiveState : State {
6 | public DiveState(FiniteStateMachine fsm) : base(fsm)
7 | {
8 | this.stateMachine = fsm;
9 | }
10 |
11 | public override void Enter()
12 | {
13 | Debug.Log("Enter Dive State");
14 | stateMachine.ChangePlayingGraphicIndex(4);
15 | }
16 |
17 | public override void Execute()
18 | {
19 | if (stateMachine.GetBool("onGround"))
20 | {
21 | var velocityX = stateMachine.GetFloat("velocityX");
22 | if (velocityX == 0)
23 | {
24 | stateMachine.SetState("idle");
25 | }
26 | else if (velocityX > 0)
27 | {
28 | stateMachine.SetState("run");
29 | }
30 | }
31 | }
32 |
33 | public override void Exit()
34 | {
35 | Debug.Log("Exit from Dive State");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/DiveState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bf9ec81f722a4aa4495f1ee2f32a345d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/IdleState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class IdleState : State {
6 |
7 | public IdleState(FiniteStateMachine fsm) : base(fsm)
8 | {
9 | stateMachine = fsm;
10 | }
11 |
12 | public override void Enter()
13 | {
14 | Debug.Log("Enter Idle State");
15 | stateMachine.ChangePlayingGraphicIndex(0);
16 | }
17 |
18 | public override void Execute()
19 | {
20 | Debug.Log("Idle Animation is playing");
21 | var velocityX = stateMachine.GetFloat("velocityX");
22 | if (stateMachine.GetBool("onGround"))
23 | {
24 | if (velocityX == 0)
25 | {
26 | if (stateMachine.GetBool("isJump"))
27 | {
28 | stateMachine.SetState("jump");
29 | }
30 | }
31 | else if (velocityX > 0)
32 | {
33 | stateMachine.SetState("run");
34 | }
35 | }
36 | else
37 | {
38 | stateMachine.SetState("jump");
39 | }
40 |
41 | }
42 |
43 | public override void Exit()
44 | {
45 | Debug.Log("Exit from Idle State");
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/IdleState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c6be4c43a01ed134ebb7e704bfa38eca
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/JumpState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class JumpState : State {
6 | public JumpState(FiniteStateMachine fsm) : base(fsm)
7 | {
8 | stateMachine = fsm;
9 | }
10 |
11 | public override void Enter()
12 | {
13 | Debug.Log("Enter Jumping State");
14 | stateMachine.ChangePlayingGraphicIndex(1);
15 | }
16 |
17 | public override void Execute()
18 | {
19 | Debug.Log("Jumping Animation is playing");
20 | if (stateMachine.GetBool("onGround"))
21 | {
22 | var playerVelocityX = stateMachine.GetFloat("velocityX");
23 | if (playerVelocityX == 0)
24 | {
25 | stateMachine.SetState("idle");
26 | }
27 | else if (playerVelocityX > 0)
28 | {
29 | stateMachine.SetState("run");
30 | }
31 | }
32 | else if (stateMachine.GetBool("isDiveStarted"))
33 | {
34 | stateMachine.SetState("dive");
35 | }
36 | }
37 |
38 | public override void Exit()
39 | {
40 | Debug.Log("Exit from Jumping State");
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/JumpState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 677d5ceb162f3d044ba76332349cbd02
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/RunState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class RunState : State {
6 |
7 | private float frameChangeRate;
8 | private float time;
9 |
10 | private int[] graphicIndexArray;
11 | private int currentGraphicIndex;
12 |
13 | public RunState(FiniteStateMachine fsm) : base(fsm)
14 | {
15 | stateMachine = fsm;
16 | frameChangeRate = .1f;
17 | graphicIndexArray = new int[] { 2, 3 };
18 | }
19 |
20 | public override void Enter()
21 | {
22 | Debug.Log("Enter Running State");
23 | currentGraphicIndex = 0;
24 | stateMachine.ChangePlayingGraphicIndex(graphicIndexArray[0]);
25 | time = 0f;
26 | }
27 |
28 | public override void Execute()
29 | {
30 | Debug.Log("Running Animation is playing");
31 | if (stateMachine.GetBool("onGround"))
32 | {
33 | if (stateMachine.GetBool("isSuperKickStarted"))
34 | {
35 | stateMachine.SetState("superKick");
36 | }
37 | else if (stateMachine.GetBool("isJump"))
38 | {
39 | stateMachine.SetState("jump");
40 | }
41 | else if (stateMachine.GetFloat("velocityX") == 0)
42 | {
43 | stateMachine.SetState("idle");
44 | }
45 | }
46 | else
47 | {
48 | stateMachine.SetState("jump");
49 | }
50 |
51 | time += Time.deltaTime;
52 |
53 | if (time > frameChangeRate)
54 | {
55 | stateMachine.ChangePlayingGraphicIndex(graphicIndexArray[GetNextGrahicIndex()]);
56 | time = 0f;
57 | }
58 |
59 | }
60 |
61 | private int GetNextGrahicIndex()
62 | {
63 | currentGraphicIndex++;
64 | if (currentGraphicIndex > graphicIndexArray.Length - 1)
65 | {
66 | currentGraphicIndex = 0;
67 | }
68 |
69 | return currentGraphicIndex;
70 | }
71 |
72 | public override void Exit()
73 | {
74 | Debug.Log("Exiting From Running State");
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/RunState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 80ef46b4d34d9234992d72dd9820a2f6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/Simulator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class Simulator : MonoBehaviour {
7 |
8 | public Soldier soldier;
9 |
10 | private Action[] actions;
11 | private int currentActionIndex = 0;
12 |
13 | // Use this for initialization
14 | void Start () {
15 |
16 | soldier.Init();
17 |
18 | actions = new Action[]
19 | {
20 | ()=>soldier.SetPhysics(true, 0),//idle
21 | ()=>{
22 | soldier.SetJump(true);//jump start
23 | soldier.SetPhysics(false, 0);
24 | },
25 | ()=>{
26 | soldier.SetJump(false);//jump end
27 | soldier.SetPhysics(true, 0);
28 | },
29 | ()=>soldier.SetPhysics(true, 1),//run start
30 | ()=>{
31 | soldier.SetJump(true);//jump start
32 | soldier.SetPhysics(false, 1);
33 | },
34 | ()=>{
35 | soldier.SetIsDive(true);//dive start
36 | soldier.SetPhysics(false, 1);
37 | },
38 | ()=>{
39 | soldier.SetIsDive(false);//dive end
40 | soldier.SetPhysics(true, 1);
41 | soldier.SetJump(false);//jump end
42 | },
43 | ()=>soldier.SetPhysics(true, 0),
44 | ()=>soldier.SetPhysics(true,1),//run state
45 | ()=>{
46 | soldier.SetSuperKick(true);//super kick start
47 | soldier.SetPhysics(true, 1);
48 | },
49 | ()=>{
50 | soldier.SetSuperKick(false);//super kick end
51 | soldier.SetPhysics(true, 0);
52 | },
53 | };
54 | }
55 |
56 | void Update ()
57 | {
58 | soldier.SoldierUpdate();
59 |
60 | if (Input.GetKeyDown(KeyCode.RightArrow))
61 | {
62 | NextAction();
63 | }
64 | }
65 |
66 | public void NextAction()
67 | {
68 | currentActionIndex++;
69 | if (currentActionIndex > actions.Length - 1)
70 | {
71 | currentActionIndex = actions.Length - 1;
72 | }
73 |
74 | ExecuteCurrentAction();
75 | }
76 |
77 | public void ExecuteCurrentAction()
78 | {
79 | actions[currentActionIndex]();
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/Simulator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8db1aa355f2e8a34690a08518d718bbd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/Soldier.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class Soldier : MonoBehaviour {
7 |
8 | public Sprite[] Graphics;
9 |
10 | [SerializeField]
11 | private float velocityX;
12 | [SerializeField]
13 | private bool isOnGround;
14 |
15 | private SoldierFSM fsm;
16 | private SpriteRenderer Renderer;
17 |
18 | public void Init()
19 | {
20 | Renderer = GetComponent();
21 | fsm = new SoldierFSM();
22 | fsm.OnGraphicChanged += SetGraphic;
23 |
24 | SetPhysics(true,0);
25 | }
26 |
27 | public void SoldierUpdate()
28 | {
29 | fsm.CallStateExecute();
30 | }
31 |
32 | public void SetPhysics(bool isGround, float velX)
33 | {
34 | isOnGround = isGround;
35 | velocityX = velX;
36 |
37 | fsm.SetBool("onGround", isGround);
38 | fsm.SetFloat("velocityX", velX);
39 | }
40 |
41 | public void SetIsDive(bool isDive)
42 | {
43 | fsm.SetBool("isDiveStarted", isDive);
44 | }
45 |
46 | public void SetJump(bool isJump)
47 | {
48 | fsm.SetBool("isJump", isJump);
49 | }
50 |
51 | public void SetSuperKick(bool isSuperKick)
52 | {
53 | fsm.SetBool("isSuperKickStarted", isSuperKick);
54 | }
55 |
56 | public void SetGraphic(int graphicIndex)
57 | {
58 | Renderer.sprite = Graphics[graphicIndex];
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/Soldier.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6367f526d6c05f4ea3869010abf3d76
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/SoldierFSM.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class SoldierFSM : FiniteStateMachine {
6 |
7 | public SoldierFSM()
8 | {
9 | Setup();
10 | }
11 |
12 | public override void Setup()
13 | {
14 | states = new Dictionary()
15 | {
16 | { "idle", new IdleState(this)},
17 | { "run", new RunState (this)},
18 | { "jump", new JumpState(this)},
19 | { "dive", new DiveState(this)},
20 | { "superKick", new SuperKickState(this)}
21 | };
22 |
23 | boolVariables = new Dictionary
24 | {
25 | { "onGround", false },
26 | { "isDiveStarted", false },
27 | { "isJump", false},
28 | { "isSuperKickStarted", false},
29 | };
30 |
31 | floatVariables = new Dictionary
32 | {
33 | {"velocityX", 0 }
34 | };
35 |
36 | currentState = states["idle"];
37 | CallStateEnter();
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/SoldierFSM.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10127f8c5ff4029478abaadef502bc09
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/SuperKickState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class SuperKickState : State {
6 | private float playTime;
7 | private float currentTime;
8 | public SuperKickState(FiniteStateMachine fsm) : base(fsm)
9 | {
10 | stateMachine = fsm;
11 | playTime = 2f;
12 | }
13 |
14 | public override void Enter()
15 | {
16 | Debug.Log("Enter Super Kick State");
17 | stateMachine.ChangePlayingGraphicIndex(5);
18 | currentTime = 0;
19 | }
20 |
21 | public override void Execute()
22 | {
23 | currentTime += Time.deltaTime;
24 | if (currentTime > playTime)
25 | {
26 | if (stateMachine.GetBool("onGround"))
27 | {
28 | var velocityX = stateMachine.GetFloat("velocityX");
29 | if (velocityX == 0)
30 | {
31 | stateMachine.SetState("idle");
32 | }
33 | else if (velocityX > 0)
34 | {
35 | stateMachine.SetState("run");
36 | }
37 | }
38 | else
39 | {
40 | stateMachine.SetState("jump");//may be add a falling state
41 | }
42 | }
43 | Debug.Log("Super Kick Animation is playing");
44 |
45 | }
46 |
47 | public override void Exit()
48 | {
49 | Debug.Log("Exiting From Super Kick State");
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/PlatformerSample/SuperKickState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64cbb3d701b4f6a498c2992ee1a4b1bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f33c6c67363dbb84aa729011725114ae
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_duck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_duck.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_duck.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f12f7395654578643a70f2b03ebba4e5
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: 49fda397a9730a14cb6e656c36582f37
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_idle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_idle.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_idle.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f82a7c19bc366f14d84946ea178233c0
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: 64a23798d0e45834bb784b0698df2758
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_jump.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_jump.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_jump.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 587324e67ed699b4fbec55bd6ea3bf60
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: ac7d8db84c8aad642a88abefe7f12f9e
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_kick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_kick.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_kick.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e6bcb47e06537ab479298ce99f9e3f69
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: c253094b7490e7f4ebb2f40a21c918f9
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_walk1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_walk1.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_walk1.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dda45f7bffdc7104d912f15e9c33a85d
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: aa719f6c1b14fcd4180aa3393ec0ee91
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_walk2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosgunhalil/DesignPatterns/861ba10a277341fd9e325a7bc152a2f17a8a50d8/Assets/StateDesignPattern/Sprites/soldier_walk2.png
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/Sprites/soldier_walk2.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b23c065fae35a7c498f393e4264d44a6
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 7
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 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 8
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | platformSettings:
61 | - serializedVersion: 2
62 | buildTarget: DefaultTexturePlatform
63 | maxTextureSize: 2048
64 | resizeAlgorithm: 0
65 | textureFormat: -1
66 | textureCompression: 1
67 | compressionQuality: 50
68 | crunchedCompression: 0
69 | allowsAlphaSplitting: 0
70 | overridden: 0
71 | androidETC2FallbackOverride: 0
72 | spriteSheet:
73 | serializedVersion: 2
74 | sprites: []
75 | outline: []
76 | physicsShape: []
77 | bones: []
78 | spriteID: afa7c87b42e641e469bbc7f9db6f5fc7
79 | vertices: []
80 | indices:
81 | edges: []
82 | weights: []
83 | spritePackingTag:
84 | pSDRemoveMatte: 0
85 | pSDShowRemoveMatteOption: 0
86 | userData:
87 | assetBundleName:
88 | assetBundleVariant:
89 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/State.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public abstract class State {
6 |
7 | public abstract void Enter();
8 | public abstract void Execute();
9 | public abstract void Exit();
10 |
11 | protected FiniteStateMachine stateMachine;
12 |
13 | public State(FiniteStateMachine fsm)
14 | {
15 | this.stateMachine = fsm;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/State.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 710842ecbd555a74a9fafc8ed6bfbaba
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/StateDesignPatternScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 3
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_TemporalCoherenceThreshold: 1
54 | m_EnvironmentLightingMode: 0
55 | m_EnableBakedLightmaps: 0
56 | m_EnableRealtimeLightmaps: 0
57 | m_LightmapEditorSettings:
58 | serializedVersion: 10
59 | m_Resolution: 2
60 | m_BakeResolution: 40
61 | m_AtlasSize: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFilterTypeDirect: 0
81 | m_PVRFilterTypeIndirect: 0
82 | m_PVRFilterTypeAO: 0
83 | m_PVRFilteringMode: 1
84 | m_PVRCulling: 1
85 | m_PVRFilteringGaussRadiusDirect: 1
86 | m_PVRFilteringGaussRadiusIndirect: 5
87 | m_PVRFilteringGaussRadiusAO: 2
88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
90 | m_PVRFilteringAtrousPositionSigmaAO: 1
91 | m_ShowResolutionOverlay: 1
92 | m_LightingDataAsset: {fileID: 0}
93 | m_UseShadowmask: 1
94 | --- !u!196 &4
95 | NavMeshSettings:
96 | serializedVersion: 2
97 | m_ObjectHideFlags: 0
98 | m_BuildSettings:
99 | serializedVersion: 2
100 | agentTypeID: 0
101 | agentRadius: 0.5
102 | agentHeight: 2
103 | agentSlope: 45
104 | agentClimb: 0.4
105 | ledgeDropHeight: 0
106 | maxJumpAcrossDistance: 0
107 | minRegionArea: 2
108 | manualCellSize: 0
109 | cellSize: 0.16666667
110 | manualTileSize: 0
111 | tileSize: 256
112 | accuratePlacement: 0
113 | debug:
114 | m_Flags: 0
115 | m_NavMeshData: {fileID: 0}
116 | --- !u!1 &808400311
117 | GameObject:
118 | m_ObjectHideFlags: 0
119 | m_CorrespondingSourceObject: {fileID: 0}
120 | m_PrefabInternal: {fileID: 0}
121 | serializedVersion: 6
122 | m_Component:
123 | - component: {fileID: 808400314}
124 | - component: {fileID: 808400313}
125 | - component: {fileID: 808400312}
126 | m_Layer: 0
127 | m_Name: Main Camera
128 | m_TagString: MainCamera
129 | m_Icon: {fileID: 0}
130 | m_NavMeshLayer: 0
131 | m_StaticEditorFlags: 0
132 | m_IsActive: 1
133 | --- !u!81 &808400312
134 | AudioListener:
135 | m_ObjectHideFlags: 0
136 | m_CorrespondingSourceObject: {fileID: 0}
137 | m_PrefabInternal: {fileID: 0}
138 | m_GameObject: {fileID: 808400311}
139 | m_Enabled: 1
140 | --- !u!20 &808400313
141 | Camera:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInternal: {fileID: 0}
145 | m_GameObject: {fileID: 808400311}
146 | m_Enabled: 1
147 | serializedVersion: 2
148 | m_ClearFlags: 1
149 | m_BackGroundColor: {r: 0.8490566, g: 0.8490566, b: 0.8490566, a: 0}
150 | m_projectionMatrixMode: 1
151 | m_SensorSize: {x: 36, y: 24}
152 | m_LensShift: {x: 0, y: 0}
153 | m_FocalLength: 50
154 | m_NormalizedViewPortRect:
155 | serializedVersion: 2
156 | x: 0
157 | y: 0
158 | width: 1
159 | height: 1
160 | near clip plane: 0.3
161 | far clip plane: 1000
162 | field of view: 60
163 | orthographic: 1
164 | orthographic size: 1.5870535
165 | m_Depth: -1
166 | m_CullingMask:
167 | serializedVersion: 2
168 | m_Bits: 4294967295
169 | m_RenderingPath: -1
170 | m_TargetTexture: {fileID: 0}
171 | m_TargetDisplay: 0
172 | m_TargetEye: 3
173 | m_HDR: 1
174 | m_AllowMSAA: 1
175 | m_AllowDynamicResolution: 0
176 | m_ForceIntoRT: 0
177 | m_OcclusionCulling: 1
178 | m_StereoConvergence: 10
179 | m_StereoSeparation: 0.022
180 | --- !u!4 &808400314
181 | Transform:
182 | m_ObjectHideFlags: 0
183 | m_CorrespondingSourceObject: {fileID: 0}
184 | m_PrefabInternal: {fileID: 0}
185 | m_GameObject: {fileID: 808400311}
186 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
187 | m_LocalPosition: {x: 0, y: 0, z: -3.54}
188 | m_LocalScale: {x: 1, y: 1, z: 1}
189 | m_Children: []
190 | m_Father: {fileID: 0}
191 | m_RootOrder: 0
192 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
193 | --- !u!1 &970309065
194 | GameObject:
195 | m_ObjectHideFlags: 0
196 | m_CorrespondingSourceObject: {fileID: 0}
197 | m_PrefabInternal: {fileID: 0}
198 | serializedVersion: 6
199 | m_Component:
200 | - component: {fileID: 970309068}
201 | - component: {fileID: 970309067}
202 | - component: {fileID: 970309066}
203 | m_Layer: 0
204 | m_Name: Soldier
205 | m_TagString: Untagged
206 | m_Icon: {fileID: 0}
207 | m_NavMeshLayer: 0
208 | m_StaticEditorFlags: 0
209 | m_IsActive: 1
210 | --- !u!114 &970309066
211 | MonoBehaviour:
212 | m_ObjectHideFlags: 0
213 | m_CorrespondingSourceObject: {fileID: 0}
214 | m_PrefabInternal: {fileID: 0}
215 | m_GameObject: {fileID: 970309065}
216 | m_Enabled: 1
217 | m_EditorHideFlags: 0
218 | m_Script: {fileID: 11500000, guid: d6367f526d6c05f4ea3869010abf3d76, type: 3}
219 | m_Name:
220 | m_EditorClassIdentifier:
221 | Graphics:
222 | - {fileID: 21300000, guid: f82a7c19bc366f14d84946ea178233c0, type: 3}
223 | - {fileID: 21300000, guid: 587324e67ed699b4fbec55bd6ea3bf60, type: 3}
224 | - {fileID: 21300000, guid: dda45f7bffdc7104d912f15e9c33a85d, type: 3}
225 | - {fileID: 21300000, guid: b23c065fae35a7c498f393e4264d44a6, type: 3}
226 | - {fileID: 21300000, guid: f12f7395654578643a70f2b03ebba4e5, type: 3}
227 | - {fileID: 21300000, guid: e6bcb47e06537ab479298ce99f9e3f69, type: 3}
228 | velocityX: 0
229 | isOnGround: 1
230 | --- !u!212 &970309067
231 | SpriteRenderer:
232 | m_ObjectHideFlags: 0
233 | m_CorrespondingSourceObject: {fileID: 0}
234 | m_PrefabInternal: {fileID: 0}
235 | m_GameObject: {fileID: 970309065}
236 | m_Enabled: 1
237 | m_CastShadows: 0
238 | m_ReceiveShadows: 0
239 | m_DynamicOccludee: 1
240 | m_MotionVectors: 1
241 | m_LightProbeUsage: 1
242 | m_ReflectionProbeUsage: 1
243 | m_RenderingLayerMask: 4294967295
244 | m_Materials:
245 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
246 | m_StaticBatchInfo:
247 | firstSubMesh: 0
248 | subMeshCount: 0
249 | m_StaticBatchRoot: {fileID: 0}
250 | m_ProbeAnchor: {fileID: 0}
251 | m_LightProbeVolumeOverride: {fileID: 0}
252 | m_ScaleInLightmap: 1
253 | m_PreserveUVs: 0
254 | m_IgnoreNormalsForChartDetection: 0
255 | m_ImportantGI: 0
256 | m_StitchLightmapSeams: 0
257 | m_SelectedEditorRenderState: 0
258 | m_MinimumChartSize: 4
259 | m_AutoUVMaxDistance: 0.5
260 | m_AutoUVMaxAngle: 89
261 | m_LightmapParameters: {fileID: 0}
262 | m_SortingLayerID: 0
263 | m_SortingLayer: 0
264 | m_SortingOrder: 0
265 | m_Sprite: {fileID: 21300000, guid: f82a7c19bc366f14d84946ea178233c0, type: 3}
266 | m_Color: {r: 1, g: 1, b: 1, a: 1}
267 | m_FlipX: 0
268 | m_FlipY: 0
269 | m_DrawMode: 0
270 | m_Size: {x: 0.8, y: 1.1}
271 | m_AdaptiveModeThreshold: 0.5
272 | m_SpriteTileMode: 0
273 | m_WasSpriteAssigned: 1
274 | m_MaskInteraction: 0
275 | m_SpriteSortPoint: 0
276 | --- !u!4 &970309068
277 | Transform:
278 | m_ObjectHideFlags: 0
279 | m_CorrespondingSourceObject: {fileID: 0}
280 | m_PrefabInternal: {fileID: 0}
281 | m_GameObject: {fileID: 970309065}
282 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
283 | m_LocalPosition: {x: 0, y: 0, z: 0}
284 | m_LocalScale: {x: 1, y: 1, z: 1}
285 | m_Children: []
286 | m_Father: {fileID: 0}
287 | m_RootOrder: 3
288 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
289 | --- !u!1 &1048518790
290 | GameObject:
291 | m_ObjectHideFlags: 0
292 | m_CorrespondingSourceObject: {fileID: 0}
293 | m_PrefabInternal: {fileID: 0}
294 | serializedVersion: 6
295 | m_Component:
296 | - component: {fileID: 1048518792}
297 | - component: {fileID: 1048518791}
298 | m_Layer: 0
299 | m_Name: Simulator
300 | m_TagString: Untagged
301 | m_Icon: {fileID: 0}
302 | m_NavMeshLayer: 0
303 | m_StaticEditorFlags: 0
304 | m_IsActive: 1
305 | --- !u!114 &1048518791
306 | MonoBehaviour:
307 | m_ObjectHideFlags: 0
308 | m_CorrespondingSourceObject: {fileID: 0}
309 | m_PrefabInternal: {fileID: 0}
310 | m_GameObject: {fileID: 1048518790}
311 | m_Enabled: 1
312 | m_EditorHideFlags: 0
313 | m_Script: {fileID: 11500000, guid: 8db1aa355f2e8a34690a08518d718bbd, type: 3}
314 | m_Name:
315 | m_EditorClassIdentifier:
316 | animationContainer: {fileID: 970309066}
317 | --- !u!4 &1048518792
318 | Transform:
319 | m_ObjectHideFlags: 0
320 | m_CorrespondingSourceObject: {fileID: 0}
321 | m_PrefabInternal: {fileID: 0}
322 | m_GameObject: {fileID: 1048518790}
323 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
324 | m_LocalPosition: {x: 0, y: 0, z: 0}
325 | m_LocalScale: {x: 1, y: 1, z: 1}
326 | m_Children: []
327 | m_Father: {fileID: 0}
328 | m_RootOrder: 2
329 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
330 | --- !u!1 &1935948450
331 | GameObject:
332 | m_ObjectHideFlags: 0
333 | m_CorrespondingSourceObject: {fileID: 0}
334 | m_PrefabInternal: {fileID: 0}
335 | serializedVersion: 6
336 | m_Component:
337 | - component: {fileID: 1935948452}
338 | - component: {fileID: 1935948451}
339 | m_Layer: 0
340 | m_Name: Directional Light
341 | m_TagString: Untagged
342 | m_Icon: {fileID: 0}
343 | m_NavMeshLayer: 0
344 | m_StaticEditorFlags: 0
345 | m_IsActive: 1
346 | --- !u!108 &1935948451
347 | Light:
348 | m_ObjectHideFlags: 0
349 | m_CorrespondingSourceObject: {fileID: 0}
350 | m_PrefabInternal: {fileID: 0}
351 | m_GameObject: {fileID: 1935948450}
352 | m_Enabled: 1
353 | serializedVersion: 8
354 | m_Type: 1
355 | m_Color: {r: 1, g: 1, b: 1, a: 1}
356 | m_Intensity: 1
357 | m_Range: 10
358 | m_SpotAngle: 30
359 | m_CookieSize: 10
360 | m_Shadows:
361 | m_Type: 0
362 | m_Resolution: -1
363 | m_CustomResolution: -1
364 | m_Strength: 1
365 | m_Bias: 0.05
366 | m_NormalBias: 0.4
367 | m_NearPlane: 0.2
368 | m_Cookie: {fileID: 0}
369 | m_DrawHalo: 0
370 | m_Flare: {fileID: 0}
371 | m_RenderMode: 0
372 | m_CullingMask:
373 | serializedVersion: 2
374 | m_Bits: 4294967295
375 | m_Lightmapping: 4
376 | m_LightShadowCasterMode: 0
377 | m_AreaSize: {x: 1, y: 1}
378 | m_BounceIntensity: 1
379 | m_ColorTemperature: 6570
380 | m_UseColorTemperature: 0
381 | m_ShadowRadius: 0
382 | m_ShadowAngle: 0
383 | --- !u!4 &1935948452
384 | Transform:
385 | m_ObjectHideFlags: 0
386 | m_CorrespondingSourceObject: {fileID: 0}
387 | m_PrefabInternal: {fileID: 0}
388 | m_GameObject: {fileID: 1935948450}
389 | m_LocalRotation: {x: 0.35064003, y: -0.2681797, z: 0.10553065, w: 0.89106375}
390 | m_LocalPosition: {x: 0, y: 2.26, z: 0}
391 | m_LocalScale: {x: 1, y: 1, z: 1}
392 | m_Children: []
393 | m_Father: {fileID: 0}
394 | m_RootOrder: 1
395 | m_LocalEulerAnglesHint: {x: 42.96, y: -33.5, z: 0}
396 |
--------------------------------------------------------------------------------
/Assets/StateDesignPattern/StateDesignPatternScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64a48bb483f5a6c4da03fe1a895c1714
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Logs/ApiUpdaterCheck.txt:
--------------------------------------------------------------------------------
1 | [api-updater (non-obsolete-error-filter)] 10/6/2021 10:32:07 PM : Starting C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
2 | [api-updater (non-obsolete-error-filter)]
3 | ----------------------------------
4 | jit/startup time : 628.7094ms
5 | moved types parse time: 68ms
6 | candidates parse time : 1ms
7 | C# parse time : 272ms
8 | candidates check time : 29ms
9 | console write time : 0ms
10 |
11 | [api-updater (non-obsolete-error-filter)] 10/6/2021 10:32:36 PM : Starting C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
12 | [api-updater (non-obsolete-error-filter)]
13 | ----------------------------------
14 | jit/startup time : 74.1892ms
15 | moved types parse time: 65ms
16 | candidates parse time : 1ms
17 | C# parse time : 193ms
18 | candidates check time : 33ms
19 | console write time : 0ms
20 |
21 |
--------------------------------------------------------------------------------
/Logs/Packages-Update.log:
--------------------------------------------------------------------------------
1 |
2 | === Fri Aug 21 23:07:24 2020
3 |
4 | Packages were changed.
5 | Update Mode: updateDependencies
6 |
7 | The following packages were added:
8 | com.unity.2d.sprite@1.0.0
9 | com.unity.2d.tilemap@1.0.0
10 | com.unity.collab-proxy@1.2.16
11 | com.unity.ide.rider@1.1.4
12 | com.unity.ide.vscode@1.2.1
13 | com.unity.modules.androidjni@1.0.0
14 | com.unity.multiplayer-hlapi@1.0.6
15 | com.unity.test-framework@1.1.16
16 | com.unity.timeline@1.2.6
17 | com.unity.ugui@1.0.0
18 | com.unity.xr.legacyinputhelpers@2.1.4
19 | The following packages were updated:
20 | com.unity.ads from version 2.0.8 to 3.4.7
21 | com.unity.analytics from version 2.0.16 to 3.3.5
22 | com.unity.purchasing from version 2.0.3 to 2.0.6
23 | com.unity.textmeshpro from version 1.2.4 to 2.0.1
24 | The following packages were removed:
25 | com.unity.package-manager-ui@1.9.11
26 |
27 | === Wed Oct 6 21:41:19 2021
28 |
29 | Packages were changed.
30 | Update Mode: updateDependencies
31 |
32 | The following packages were added:
33 | com.unity.ide.visualstudio@2.0.7
34 | The following packages were updated:
35 | com.unity.ads from version 3.4.7 to 3.6.1
36 | com.unity.analytics from version 3.3.5 to 3.5.3
37 | com.unity.collab-proxy from version 1.2.16 to 1.3.9
38 | com.unity.ide.rider from version 1.1.4 to 2.0.7
39 | com.unity.ide.vscode from version 1.2.1 to 1.2.3
40 | com.unity.purchasing from version 2.0.6 to 2.2.2
41 | com.unity.test-framework from version 1.1.16 to 1.1.24
42 | com.unity.textmeshpro from version 2.0.1 to 3.0.1
43 | com.unity.timeline from version 1.2.6 to 1.4.6
44 | com.unity.xr.legacyinputhelpers from version 2.1.4 to 2.1.7
45 |
--------------------------------------------------------------------------------
/Logs/shadercompiler-AssetImportWorker0.log:
--------------------------------------------------------------------------------
1 | Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data/PlaybackEngines'
2 | Cmd: initializeCompiler
3 |
4 | Unhandled exception: Protocol error - failed to read magic number (error -2147483644, transferred 0/4)
5 |
6 | Quitting shader compiler process
7 |
--------------------------------------------------------------------------------
/Logs/shadercompiler-UnityShaderCompiler.exe1.log:
--------------------------------------------------------------------------------
1 | Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data/PlaybackEngines'
2 | Cmd: initializeCompiler
3 |
4 | Cmd: compileSnippet
5 | insize=659 path=Packages/com.unity.textmeshpro/Editor Resources/Shaders cachingPP=1 ppOnly=0 stripLineD=0 buildPlatform=19 rsLen=0 pKW=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR uKW= dKW=OUTLINE_ON UNDERLAY_ON UNDERLAY_INNER UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 flags=0 lang=0 type=Fragment platform=d3d11 reqs=33 mask=6 start=58 ok=1 outsize=906
6 |
7 | Cmd: shutdown
8 |
--------------------------------------------------------------------------------
/Logs/shadercompiler-UnityShaderCompiler.exe2.log:
--------------------------------------------------------------------------------
1 | Base path: 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2020.3.3f1/Editor/Data/PlaybackEngines'
2 | Cmd: initializeCompiler
3 |
4 | Cmd: compileSnippet
5 | insize=659 path=Packages/com.unity.textmeshpro/Editor Resources/Shaders cachingPP=1 ppOnly=0 stripLineD=0 buildPlatform=19 rsLen=0 pKW=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR uKW= dKW=OUTLINE_ON UNDERLAY_ON UNDERLAY_INNER UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 flags=0 lang=0 type=Vertex platform=d3d11 reqs=33 mask=6 start=58 ok=1 outsize=1974
6 |
7 | Cmd: shutdown
8 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.2d.sprite": "1.0.0",
4 | "com.unity.2d.tilemap": "1.0.0",
5 | "com.unity.ads": "3.6.1",
6 | "com.unity.analytics": "3.5.3",
7 | "com.unity.collab-proxy": "1.3.9",
8 | "com.unity.ide.rider": "2.0.7",
9 | "com.unity.ide.visualstudio": "2.0.7",
10 | "com.unity.ide.vscode": "1.2.3",
11 | "com.unity.multiplayer-hlapi": "1.0.6",
12 | "com.unity.purchasing": "2.2.2",
13 | "com.unity.test-framework": "1.1.24",
14 | "com.unity.textmeshpro": "3.0.1",
15 | "com.unity.timeline": "1.4.6",
16 | "com.unity.ugui": "1.0.0",
17 | "com.unity.xr.legacyinputhelpers": "2.1.7",
18 | "com.unity.modules.ai": "1.0.0",
19 | "com.unity.modules.androidjni": "1.0.0",
20 | "com.unity.modules.animation": "1.0.0",
21 | "com.unity.modules.assetbundle": "1.0.0",
22 | "com.unity.modules.audio": "1.0.0",
23 | "com.unity.modules.cloth": "1.0.0",
24 | "com.unity.modules.director": "1.0.0",
25 | "com.unity.modules.imageconversion": "1.0.0",
26 | "com.unity.modules.imgui": "1.0.0",
27 | "com.unity.modules.jsonserialize": "1.0.0",
28 | "com.unity.modules.particlesystem": "1.0.0",
29 | "com.unity.modules.physics": "1.0.0",
30 | "com.unity.modules.physics2d": "1.0.0",
31 | "com.unity.modules.screencapture": "1.0.0",
32 | "com.unity.modules.terrain": "1.0.0",
33 | "com.unity.modules.terrainphysics": "1.0.0",
34 | "com.unity.modules.tilemap": "1.0.0",
35 | "com.unity.modules.ui": "1.0.0",
36 | "com.unity.modules.uielements": "1.0.0",
37 | "com.unity.modules.umbra": "1.0.0",
38 | "com.unity.modules.unityanalytics": "1.0.0",
39 | "com.unity.modules.unitywebrequest": "1.0.0",
40 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
41 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
42 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
43 | "com.unity.modules.unitywebrequestwww": "1.0.0",
44 | "com.unity.modules.vehicles": "1.0.0",
45 | "com.unity.modules.video": "1.0.0",
46 | "com.unity.modules.vr": "1.0.0",
47 | "com.unity.modules.wind": "1.0.0",
48 | "com.unity.modules.xr": "1.0.0"
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.2d.sprite": {
4 | "version": "1.0.0",
5 | "depth": 0,
6 | "source": "builtin",
7 | "dependencies": {}
8 | },
9 | "com.unity.2d.tilemap": {
10 | "version": "1.0.0",
11 | "depth": 0,
12 | "source": "builtin",
13 | "dependencies": {}
14 | },
15 | "com.unity.ads": {
16 | "version": "3.6.1",
17 | "depth": 0,
18 | "source": "registry",
19 | "dependencies": {
20 | "com.unity.ugui": "1.0.0"
21 | },
22 | "url": "https://packages.unity.com"
23 | },
24 | "com.unity.analytics": {
25 | "version": "3.5.3",
26 | "depth": 0,
27 | "source": "registry",
28 | "dependencies": {
29 | "com.unity.ugui": "1.0.0"
30 | },
31 | "url": "https://packages.unity.com"
32 | },
33 | "com.unity.collab-proxy": {
34 | "version": "1.3.9",
35 | "depth": 0,
36 | "source": "registry",
37 | "dependencies": {},
38 | "url": "https://packages.unity.com"
39 | },
40 | "com.unity.ext.nunit": {
41 | "version": "1.0.6",
42 | "depth": 1,
43 | "source": "registry",
44 | "dependencies": {},
45 | "url": "https://packages.unity.com"
46 | },
47 | "com.unity.ide.rider": {
48 | "version": "2.0.7",
49 | "depth": 0,
50 | "source": "registry",
51 | "dependencies": {
52 | "com.unity.test-framework": "1.1.1"
53 | },
54 | "url": "https://packages.unity.com"
55 | },
56 | "com.unity.ide.visualstudio": {
57 | "version": "2.0.7",
58 | "depth": 0,
59 | "source": "registry",
60 | "dependencies": {
61 | "com.unity.test-framework": "1.1.9"
62 | },
63 | "url": "https://packages.unity.com"
64 | },
65 | "com.unity.ide.vscode": {
66 | "version": "1.2.3",
67 | "depth": 0,
68 | "source": "registry",
69 | "dependencies": {},
70 | "url": "https://packages.unity.com"
71 | },
72 | "com.unity.multiplayer-hlapi": {
73 | "version": "1.0.6",
74 | "depth": 0,
75 | "source": "registry",
76 | "dependencies": {
77 | "nuget.mono-cecil": "0.1.6-preview"
78 | },
79 | "url": "https://packages.unity.com"
80 | },
81 | "com.unity.purchasing": {
82 | "version": "2.2.2",
83 | "depth": 0,
84 | "source": "registry",
85 | "dependencies": {
86 | "com.unity.ugui": "1.0.0"
87 | },
88 | "url": "https://packages.unity.com"
89 | },
90 | "com.unity.test-framework": {
91 | "version": "1.1.24",
92 | "depth": 0,
93 | "source": "registry",
94 | "dependencies": {
95 | "com.unity.ext.nunit": "1.0.6",
96 | "com.unity.modules.imgui": "1.0.0",
97 | "com.unity.modules.jsonserialize": "1.0.0"
98 | },
99 | "url": "https://packages.unity.com"
100 | },
101 | "com.unity.textmeshpro": {
102 | "version": "3.0.1",
103 | "depth": 0,
104 | "source": "registry",
105 | "dependencies": {
106 | "com.unity.ugui": "1.0.0"
107 | },
108 | "url": "https://packages.unity.com"
109 | },
110 | "com.unity.timeline": {
111 | "version": "1.4.6",
112 | "depth": 0,
113 | "source": "registry",
114 | "dependencies": {
115 | "com.unity.modules.director": "1.0.0",
116 | "com.unity.modules.animation": "1.0.0",
117 | "com.unity.modules.audio": "1.0.0",
118 | "com.unity.modules.particlesystem": "1.0.0"
119 | },
120 | "url": "https://packages.unity.com"
121 | },
122 | "com.unity.ugui": {
123 | "version": "1.0.0",
124 | "depth": 0,
125 | "source": "builtin",
126 | "dependencies": {
127 | "com.unity.modules.ui": "1.0.0",
128 | "com.unity.modules.imgui": "1.0.0"
129 | }
130 | },
131 | "com.unity.xr.legacyinputhelpers": {
132 | "version": "2.1.7",
133 | "depth": 0,
134 | "source": "registry",
135 | "dependencies": {
136 | "com.unity.modules.vr": "1.0.0",
137 | "com.unity.modules.xr": "1.0.0"
138 | },
139 | "url": "https://packages.unity.com"
140 | },
141 | "nuget.mono-cecil": {
142 | "version": "0.1.6-preview",
143 | "depth": 1,
144 | "source": "registry",
145 | "dependencies": {},
146 | "url": "https://packages.unity.com"
147 | },
148 | "com.unity.modules.ai": {
149 | "version": "1.0.0",
150 | "depth": 0,
151 | "source": "builtin",
152 | "dependencies": {}
153 | },
154 | "com.unity.modules.androidjni": {
155 | "version": "1.0.0",
156 | "depth": 0,
157 | "source": "builtin",
158 | "dependencies": {}
159 | },
160 | "com.unity.modules.animation": {
161 | "version": "1.0.0",
162 | "depth": 0,
163 | "source": "builtin",
164 | "dependencies": {}
165 | },
166 | "com.unity.modules.assetbundle": {
167 | "version": "1.0.0",
168 | "depth": 0,
169 | "source": "builtin",
170 | "dependencies": {}
171 | },
172 | "com.unity.modules.audio": {
173 | "version": "1.0.0",
174 | "depth": 0,
175 | "source": "builtin",
176 | "dependencies": {}
177 | },
178 | "com.unity.modules.cloth": {
179 | "version": "1.0.0",
180 | "depth": 0,
181 | "source": "builtin",
182 | "dependencies": {
183 | "com.unity.modules.physics": "1.0.0"
184 | }
185 | },
186 | "com.unity.modules.director": {
187 | "version": "1.0.0",
188 | "depth": 0,
189 | "source": "builtin",
190 | "dependencies": {
191 | "com.unity.modules.audio": "1.0.0",
192 | "com.unity.modules.animation": "1.0.0"
193 | }
194 | },
195 | "com.unity.modules.imageconversion": {
196 | "version": "1.0.0",
197 | "depth": 0,
198 | "source": "builtin",
199 | "dependencies": {}
200 | },
201 | "com.unity.modules.imgui": {
202 | "version": "1.0.0",
203 | "depth": 0,
204 | "source": "builtin",
205 | "dependencies": {}
206 | },
207 | "com.unity.modules.jsonserialize": {
208 | "version": "1.0.0",
209 | "depth": 0,
210 | "source": "builtin",
211 | "dependencies": {}
212 | },
213 | "com.unity.modules.particlesystem": {
214 | "version": "1.0.0",
215 | "depth": 0,
216 | "source": "builtin",
217 | "dependencies": {}
218 | },
219 | "com.unity.modules.physics": {
220 | "version": "1.0.0",
221 | "depth": 0,
222 | "source": "builtin",
223 | "dependencies": {}
224 | },
225 | "com.unity.modules.physics2d": {
226 | "version": "1.0.0",
227 | "depth": 0,
228 | "source": "builtin",
229 | "dependencies": {}
230 | },
231 | "com.unity.modules.screencapture": {
232 | "version": "1.0.0",
233 | "depth": 0,
234 | "source": "builtin",
235 | "dependencies": {
236 | "com.unity.modules.imageconversion": "1.0.0"
237 | }
238 | },
239 | "com.unity.modules.subsystems": {
240 | "version": "1.0.0",
241 | "depth": 1,
242 | "source": "builtin",
243 | "dependencies": {
244 | "com.unity.modules.jsonserialize": "1.0.0"
245 | }
246 | },
247 | "com.unity.modules.terrain": {
248 | "version": "1.0.0",
249 | "depth": 0,
250 | "source": "builtin",
251 | "dependencies": {}
252 | },
253 | "com.unity.modules.terrainphysics": {
254 | "version": "1.0.0",
255 | "depth": 0,
256 | "source": "builtin",
257 | "dependencies": {
258 | "com.unity.modules.physics": "1.0.0",
259 | "com.unity.modules.terrain": "1.0.0"
260 | }
261 | },
262 | "com.unity.modules.tilemap": {
263 | "version": "1.0.0",
264 | "depth": 0,
265 | "source": "builtin",
266 | "dependencies": {
267 | "com.unity.modules.physics2d": "1.0.0"
268 | }
269 | },
270 | "com.unity.modules.ui": {
271 | "version": "1.0.0",
272 | "depth": 0,
273 | "source": "builtin",
274 | "dependencies": {}
275 | },
276 | "com.unity.modules.uielements": {
277 | "version": "1.0.0",
278 | "depth": 0,
279 | "source": "builtin",
280 | "dependencies": {
281 | "com.unity.modules.ui": "1.0.0",
282 | "com.unity.modules.imgui": "1.0.0",
283 | "com.unity.modules.jsonserialize": "1.0.0",
284 | "com.unity.modules.uielementsnative": "1.0.0"
285 | }
286 | },
287 | "com.unity.modules.uielementsnative": {
288 | "version": "1.0.0",
289 | "depth": 1,
290 | "source": "builtin",
291 | "dependencies": {
292 | "com.unity.modules.ui": "1.0.0",
293 | "com.unity.modules.imgui": "1.0.0",
294 | "com.unity.modules.jsonserialize": "1.0.0"
295 | }
296 | },
297 | "com.unity.modules.umbra": {
298 | "version": "1.0.0",
299 | "depth": 0,
300 | "source": "builtin",
301 | "dependencies": {}
302 | },
303 | "com.unity.modules.unityanalytics": {
304 | "version": "1.0.0",
305 | "depth": 0,
306 | "source": "builtin",
307 | "dependencies": {
308 | "com.unity.modules.unitywebrequest": "1.0.0",
309 | "com.unity.modules.jsonserialize": "1.0.0"
310 | }
311 | },
312 | "com.unity.modules.unitywebrequest": {
313 | "version": "1.0.0",
314 | "depth": 0,
315 | "source": "builtin",
316 | "dependencies": {}
317 | },
318 | "com.unity.modules.unitywebrequestassetbundle": {
319 | "version": "1.0.0",
320 | "depth": 0,
321 | "source": "builtin",
322 | "dependencies": {
323 | "com.unity.modules.assetbundle": "1.0.0",
324 | "com.unity.modules.unitywebrequest": "1.0.0"
325 | }
326 | },
327 | "com.unity.modules.unitywebrequestaudio": {
328 | "version": "1.0.0",
329 | "depth": 0,
330 | "source": "builtin",
331 | "dependencies": {
332 | "com.unity.modules.unitywebrequest": "1.0.0",
333 | "com.unity.modules.audio": "1.0.0"
334 | }
335 | },
336 | "com.unity.modules.unitywebrequesttexture": {
337 | "version": "1.0.0",
338 | "depth": 0,
339 | "source": "builtin",
340 | "dependencies": {
341 | "com.unity.modules.unitywebrequest": "1.0.0",
342 | "com.unity.modules.imageconversion": "1.0.0"
343 | }
344 | },
345 | "com.unity.modules.unitywebrequestwww": {
346 | "version": "1.0.0",
347 | "depth": 0,
348 | "source": "builtin",
349 | "dependencies": {
350 | "com.unity.modules.unitywebrequest": "1.0.0",
351 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
352 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
353 | "com.unity.modules.audio": "1.0.0",
354 | "com.unity.modules.assetbundle": "1.0.0",
355 | "com.unity.modules.imageconversion": "1.0.0"
356 | }
357 | },
358 | "com.unity.modules.vehicles": {
359 | "version": "1.0.0",
360 | "depth": 0,
361 | "source": "builtin",
362 | "dependencies": {
363 | "com.unity.modules.physics": "1.0.0"
364 | }
365 | },
366 | "com.unity.modules.video": {
367 | "version": "1.0.0",
368 | "depth": 0,
369 | "source": "builtin",
370 | "dependencies": {
371 | "com.unity.modules.audio": "1.0.0",
372 | "com.unity.modules.ui": "1.0.0",
373 | "com.unity.modules.unitywebrequest": "1.0.0"
374 | }
375 | },
376 | "com.unity.modules.vr": {
377 | "version": "1.0.0",
378 | "depth": 0,
379 | "source": "builtin",
380 | "dependencies": {
381 | "com.unity.modules.jsonserialize": "1.0.0",
382 | "com.unity.modules.physics": "1.0.0",
383 | "com.unity.modules.xr": "1.0.0"
384 | }
385 | },
386 | "com.unity.modules.wind": {
387 | "version": "1.0.0",
388 | "depth": 0,
389 | "source": "builtin",
390 | "dependencies": {}
391 | },
392 | "com.unity.modules.xr": {
393 | "version": "1.0.0",
394 | "depth": 0,
395 | "source": "builtin",
396 | "dependencies": {
397 | "com.unity.modules.physics": "1.0.0",
398 | "com.unity.modules.jsonserialize": "1.0.0",
399 | "com.unity.modules.subsystems": "1.0.0"
400 | }
401 | }
402 | }
403 | }
404 |
--------------------------------------------------------------------------------
/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 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/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: 7
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
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 1
23 | m_ClothInterCollisionSettingsToggle: 0
24 | m_ContactPairsMode: 0
25 | m_BroadphaseType: 0
26 | m_WorldBounds:
27 | m_Center: {x: 0, y: 0, z: 0}
28 | m_Extent: {x: 250, y: 250, z: 250}
29 | m_WorldSubdivisions: 8
30 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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: 9
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
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;rsp;asmref
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: 1
30 | m_AssetPipelineMode: 1
31 | m_CacheServerMode: 0
32 | m_CacheServerEndpoint:
33 | m_CacheServerNamespacePrefix: default
34 | m_CacheServerEnableDownload: 1
35 | m_CacheServerEnableUpload: 1
36 |
--------------------------------------------------------------------------------
/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: 12
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_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | m_PreloadedShaders: []
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 0}
42 | m_TransparencySortMode: 0
43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
44 | m_DefaultRenderingPath: 1
45 | m_DefaultMobileRenderingPath: 1
46 | m_TierSettings: []
47 | m_LightmapStripping: 0
48 | m_FogStripping: 0
49 | m_InstancingStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 0
62 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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: 3
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_AutoSimulation: 1
23 | m_QueriesHitTriggers: 1
24 | m_QueriesStartInColliders: 1
25 | m_ChangeStopsCallbacks: 0
26 | m_CallbacksOnDisable: 1
27 | m_AutoSyncTransforms: 1
28 | m_AlwaysShowColliders: 0
29 | m_ShowColliderSleep: 1
30 | m_ShowColliderContacts: 0
31 | m_ShowColliderAABB: 0
32 | m_ContactArrowScale: 0.2
33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
38 |
--------------------------------------------------------------------------------
/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 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2020.3.3f1
2 | m_EditorVersionWithRevision: 2020.3.3f1 (76626098c1c4)
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 | blendWeights: 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 | particleRaycastBudget: 4
33 | asyncUploadTimeSlice: 2
34 | asyncUploadBufferSize: 4
35 | resolutionScalingFixedDPIFactor: 1
36 | excludedTargetPlatforms: []
37 | - serializedVersion: 2
38 | name: Low
39 | pixelLightCount: 0
40 | shadows: 0
41 | shadowResolution: 0
42 | shadowProjection: 1
43 | shadowCascades: 1
44 | shadowDistance: 20
45 | shadowNearPlaneOffset: 3
46 | shadowCascade2Split: 0.33333334
47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
48 | shadowmaskMode: 0
49 | blendWeights: 2
50 | textureQuality: 0
51 | anisotropicTextures: 0
52 | antiAliasing: 0
53 | softParticles: 0
54 | softVegetation: 0
55 | realtimeReflectionProbes: 0
56 | billboardsFaceCameraPosition: 0
57 | vSyncCount: 0
58 | lodBias: 0.4
59 | maximumLODLevel: 0
60 | particleRaycastBudget: 16
61 | asyncUploadTimeSlice: 2
62 | asyncUploadBufferSize: 4
63 | resolutionScalingFixedDPIFactor: 1
64 | excludedTargetPlatforms: []
65 | - serializedVersion: 2
66 | name: Medium
67 | pixelLightCount: 1
68 | shadows: 1
69 | shadowResolution: 0
70 | shadowProjection: 1
71 | shadowCascades: 1
72 | shadowDistance: 20
73 | shadowNearPlaneOffset: 3
74 | shadowCascade2Split: 0.33333334
75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
76 | shadowmaskMode: 0
77 | blendWeights: 2
78 | textureQuality: 0
79 | anisotropicTextures: 1
80 | antiAliasing: 0
81 | softParticles: 0
82 | softVegetation: 0
83 | realtimeReflectionProbes: 0
84 | billboardsFaceCameraPosition: 0
85 | vSyncCount: 1
86 | lodBias: 0.7
87 | maximumLODLevel: 0
88 | particleRaycastBudget: 64
89 | asyncUploadTimeSlice: 2
90 | asyncUploadBufferSize: 4
91 | resolutionScalingFixedDPIFactor: 1
92 | excludedTargetPlatforms: []
93 | - serializedVersion: 2
94 | name: High
95 | pixelLightCount: 2
96 | shadows: 2
97 | shadowResolution: 1
98 | shadowProjection: 1
99 | shadowCascades: 2
100 | shadowDistance: 40
101 | shadowNearPlaneOffset: 3
102 | shadowCascade2Split: 0.33333334
103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
104 | shadowmaskMode: 1
105 | blendWeights: 2
106 | textureQuality: 0
107 | anisotropicTextures: 1
108 | antiAliasing: 0
109 | softParticles: 0
110 | softVegetation: 1
111 | realtimeReflectionProbes: 1
112 | billboardsFaceCameraPosition: 1
113 | vSyncCount: 1
114 | lodBias: 1
115 | maximumLODLevel: 0
116 | particleRaycastBudget: 256
117 | asyncUploadTimeSlice: 2
118 | asyncUploadBufferSize: 4
119 | resolutionScalingFixedDPIFactor: 1
120 | excludedTargetPlatforms: []
121 | - serializedVersion: 2
122 | name: Very High
123 | pixelLightCount: 3
124 | shadows: 2
125 | shadowResolution: 2
126 | shadowProjection: 1
127 | shadowCascades: 2
128 | shadowDistance: 70
129 | shadowNearPlaneOffset: 3
130 | shadowCascade2Split: 0.33333334
131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
132 | shadowmaskMode: 1
133 | blendWeights: 4
134 | textureQuality: 0
135 | anisotropicTextures: 2
136 | antiAliasing: 2
137 | softParticles: 1
138 | softVegetation: 1
139 | realtimeReflectionProbes: 1
140 | billboardsFaceCameraPosition: 1
141 | vSyncCount: 1
142 | lodBias: 1.5
143 | maximumLODLevel: 0
144 | particleRaycastBudget: 1024
145 | asyncUploadTimeSlice: 2
146 | asyncUploadBufferSize: 4
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Ultra
151 | pixelLightCount: 4
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 4
156 | shadowDistance: 150
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 2
171 | maximumLODLevel: 0
172 | particleRaycastBudget: 4096
173 | asyncUploadTimeSlice: 2
174 | asyncUploadBufferSize: 4
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSM: 5
183 | PSP2: 2
184 | Standalone: 5
185 | Tizen: 2
186 | WebGL: 3
187 | WiiU: 5
188 | Windows Store Apps: 5
189 | XboxOne: 5
190 | iPhone: 2
191 | tvOS: 2
192 |
--------------------------------------------------------------------------------
/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 | m_Enabled: 0
7 | m_TestMode: 0
8 | m_TestEventUrl:
9 | m_TestConfigUrl:
10 | m_TestInitMode: 0
11 | CrashReportingSettings:
12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate
14 | m_Enabled: 0
15 | m_CaptureEditorExceptions: 1
16 | UnityPurchasingSettings:
17 | m_Enabled: 0
18 | m_TestMode: 0
19 | UnityAnalyticsSettings:
20 | m_Enabled: 0
21 | m_InitializeOnStartup: 1
22 | m_TestMode: 0
23 | m_TestEventUrl:
24 | m_TestConfigUrl:
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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 | vcSharedLogLevel:
9 | value: 0d5e400f0650
10 | flags: 0
11 | m_VCAutomaticAdd: 1
12 | m_VCDebugCom: 0
13 | m_VCDebugCmd: 0
14 | m_VCDebugOut: 0
15 | m_SemanticMergeMode: 2
16 | m_VCShowFailedCheckout: 1
17 | m_VCOverwriteFailedCheckoutAssets: 1
18 | m_VCProjectOverlayIcons: 1
19 | m_VCHierarchyOverlayIcons: 1
20 | m_VCOtherOverlayIcons: 1
21 | m_VCAllowAsyncUpdate: 1
22 |
--------------------------------------------------------------------------------