├── .github
└── FUNDING.yml
├── .gitignore
├── GameClient
├── .gitignore
├── Assets
│ ├── Materials.meta
│ ├── Materials
│ │ ├── Enemy.mat
│ │ ├── Enemy.mat.meta
│ │ ├── ExplosionParticles.mat
│ │ ├── ExplosionParticles.mat.meta
│ │ ├── Ground.mat
│ │ ├── Ground.mat.meta
│ │ ├── Item.mat
│ │ ├── Item.mat.meta
│ │ ├── LocalPlayer.mat
│ │ ├── LocalPlayer.mat.meta
│ │ ├── Obstacle.mat
│ │ ├── Obstacle.mat.meta
│ │ ├── Player.mat
│ │ ├── Player.mat.meta
│ │ ├── Projectile.mat
│ │ └── Projectile.mat.meta
│ ├── Prefabs.meta
│ ├── Prefabs
│ │ ├── Enemy.prefab
│ │ ├── Enemy.prefab.meta
│ │ ├── Explosion.prefab
│ │ ├── Explosion.prefab.meta
│ │ ├── ItemSpawner.prefab
│ │ ├── ItemSpawner.prefab.meta
│ │ ├── LocalPlayer.prefab
│ │ ├── LocalPlayer.prefab.meta
│ │ ├── Player.prefab
│ │ ├── Player.prefab.meta
│ │ ├── Projectile.prefab
│ │ └── Projectile.prefab.meta
│ ├── Scenes.meta
│ ├── Scenes
│ │ ├── Main.unity
│ │ └── Main.unity.meta
│ ├── Scripts.meta
│ └── Scripts
│ │ ├── CameraController.cs
│ │ ├── CameraController.cs.meta
│ │ ├── Client.cs
│ │ ├── Client.cs.meta
│ │ ├── ClientHandle.cs
│ │ ├── ClientHandle.cs.meta
│ │ ├── ClientSend.cs
│ │ ├── ClientSend.cs.meta
│ │ ├── EnemyManager.cs
│ │ ├── EnemyManager.cs.meta
│ │ ├── GameManager.cs
│ │ ├── GameManager.cs.meta
│ │ ├── ItemSpawner.cs
│ │ ├── ItemSpawner.cs.meta
│ │ ├── Packet.cs
│ │ ├── Packet.cs.meta
│ │ ├── PlayerController.cs
│ │ ├── PlayerController.cs.meta
│ │ ├── PlayerManager.cs
│ │ ├── PlayerManager.cs.meta
│ │ ├── ProjectileManager.cs
│ │ ├── ProjectileManager.cs.meta
│ │ ├── ThreadManager.cs
│ │ ├── ThreadManager.cs.meta
│ │ ├── UIManager.cs
│ │ └── UIManager.cs.meta
├── Packages
│ └── manifest.json
└── ProjectSettings
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── NavMeshAreas.asset
│ ├── NetworkManager.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ └── VFXManager.asset
├── GameServer
├── .gitignore
├── GameServer.sln
└── GameServer
│ ├── Client.cs
│ ├── Constants.cs
│ ├── GameLogic.cs
│ ├── GameServer.csproj
│ ├── Packet.cs
│ ├── Player.cs
│ ├── Program.cs
│ ├── Server.cs
│ ├── ServerHandle.cs
│ ├── ServerSend.cs
│ └── ThreadManager.cs
├── Licence.txt
├── README.md
└── UnityGameServer
├── .gitignore
├── Assets
├── Prefabs.meta
├── Prefabs
│ ├── Enemy.prefab
│ ├── Enemy.prefab.meta
│ ├── Player.prefab
│ ├── Player.prefab.meta
│ ├── Projectile.prefab
│ └── Projectile.prefab.meta
├── Scenes.meta
├── Scenes
│ ├── Game.unity
│ └── Game.unity.meta
├── Scripts.meta
└── Scripts
│ ├── Client.cs
│ ├── Client.cs.meta
│ ├── Constants.cs
│ ├── Constants.cs.meta
│ ├── Enemy.cs
│ ├── Enemy.cs.meta
│ ├── EnemySpawner.cs
│ ├── EnemySpawner.cs.meta
│ ├── ItemSpawner.cs
│ ├── ItemSpawner.cs.meta
│ ├── NetworkManager.cs
│ ├── NetworkManager.cs.meta
│ ├── Packet.cs
│ ├── Packet.cs.meta
│ ├── Player.cs
│ ├── Player.cs.meta
│ ├── Projectile.cs
│ ├── Projectile.cs.meta
│ ├── Server.cs
│ ├── Server.cs.meta
│ ├── ServerHandle.cs
│ ├── ServerHandle.cs.meta
│ ├── ServerSend.cs
│ ├── ServerSend.cs.meta
│ ├── ThreadManager.cs
│ └── ThreadManager.cs.meta
├── Packages
└── manifest.json
└── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NetworkManager.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
└── VFXManager.asset
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: tom-weiland # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: tomweiland # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store
32 | .DS_Store?
33 | ._*
34 | .Spotlight-V100
35 | .Trashes
36 | ehthumbs.db
37 | Thumbs.db
--------------------------------------------------------------------------------
/GameClient/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
4 | #
5 | /[Ll]ibrary/
6 | /[Tt]emp/
7 | /[Oo]bj/
8 | /[Bb]uild/
9 | /[Bb]uilds/
10 | /[Ll]ogs/
11 | /[Mm]emoryCaptures/
12 |
13 | # Never ignore Asset meta data
14 | !/[Aa]ssets/**/*.meta
15 |
16 | # Uncomment this line if you wish to ignore the asset store tools plugin
17 | # /[Aa]ssets/AssetStoreTools*
18 |
19 | # Autogenerated Jetbrains Rider plugin
20 | [Aa]ssets/Plugins/Editor/JetBrains*
21 |
22 | # Visual Studio cache directory
23 | .vs/
24 |
25 | # Gradle cache directory
26 | .gradle/
27 |
28 | # Autogenerated VS/MD/Consulo solution and project files
29 | ExportedObj/
30 | .consulo/
31 | *.csproj
32 | *.unityproj
33 | *.sln
34 | *.suo
35 | *.tmp
36 | *.user
37 | *.userprefs
38 | *.pidb
39 | *.booproj
40 | *.svd
41 | *.pdb
42 | *.mdb
43 | *.opendb
44 | *.VC.db
45 |
46 | # Unity3D generated meta files
47 | *.pidb.meta
48 | *.pdb.meta
49 | *.mdb.meta
50 |
51 | # Unity3D generated file on crash reports
52 | sysinfo.txt
53 |
54 | # Builds
55 | *.apk
56 | *.unitypackage
57 |
58 | # Crashlytics generated file
59 | crashlytics-build.properties
--------------------------------------------------------------------------------
/GameClient/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 066a843e741737542bd7c64bec1da3ba
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Enemy.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Enemy
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.9056604, g: 0.4536507, b: 0, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Enemy.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 448c5c82d930f7041837109153c1dd7b
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/ExplosionParticles.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: ExplosionParticles
11 | m_Shader: {fileID: 210, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords: _ALPHABLEND_ON
13 | m_LightmapFlags: 0
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: 3000
17 | stringTagMap:
18 | RenderType: Transparent
19 | disabledShaderPasses:
20 | - ALWAYS
21 | m_SavedProperties:
22 | serializedVersion: 3
23 | m_TexEnvs:
24 | - _BumpMap:
25 | m_Texture: {fileID: 0}
26 | m_Scale: {x: 1, y: 1}
27 | m_Offset: {x: 0, y: 0}
28 | - _DetailAlbedoMap:
29 | m_Texture: {fileID: 0}
30 | m_Scale: {x: 1, y: 1}
31 | m_Offset: {x: 0, y: 0}
32 | - _DetailMask:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - _DetailNormalMap:
37 | m_Texture: {fileID: 0}
38 | m_Scale: {x: 1, y: 1}
39 | m_Offset: {x: 0, y: 0}
40 | - _EmissionMap:
41 | m_Texture: {fileID: 0}
42 | m_Scale: {x: 1, y: 1}
43 | m_Offset: {x: 0, y: 0}
44 | - _MainTex:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - _MetallicGlossMap:
49 | m_Texture: {fileID: 0}
50 | m_Scale: {x: 1, y: 1}
51 | m_Offset: {x: 0, y: 0}
52 | - _OcclusionMap:
53 | m_Texture: {fileID: 0}
54 | m_Scale: {x: 1, y: 1}
55 | m_Offset: {x: 0, y: 0}
56 | - _ParallaxMap:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | m_Floats:
61 | - _BlendOp: 0
62 | - _BumpScale: 1
63 | - _CameraFadingEnabled: 0
64 | - _CameraFarFadeDistance: 2
65 | - _CameraNearFadeDistance: 1
66 | - _Cull: 2
67 | - _Cutoff: 0.5
68 | - _DetailNormalMapScale: 1
69 | - _DistortionBlend: 0.5
70 | - _DistortionEnabled: 0
71 | - _DistortionStrength: 1
72 | - _DistortionStrengthScaled: 0
73 | - _DstBlend: 10
74 | - _EmissionEnabled: 0
75 | - _FlipbookMode: 0
76 | - _GlossMapScale: 1
77 | - _Glossiness: 0.5
78 | - _GlossyReflections: 1
79 | - _LightingEnabled: 1
80 | - _Metallic: 0
81 | - _Mode: 2
82 | - _OcclusionStrength: 1
83 | - _Parallax: 0.02
84 | - _SmoothnessTextureChannel: 0
85 | - _SoftParticlesEnabled: 0
86 | - _SoftParticlesFarFadeDistance: 1
87 | - _SoftParticlesNearFadeDistance: 0
88 | - _SpecularHighlights: 1
89 | - _SrcBlend: 5
90 | - _UVSec: 0
91 | - _ZWrite: 0
92 | m_Colors:
93 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
94 | - _Color: {r: 1, g: 1, b: 1, a: 1}
95 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
96 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
97 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/ExplosionParticles.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5cd7994f04b4ff4da58b4afc34d79a8
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Ground
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.4339623, g: 0.4339623, b: 0.4339623, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Ground.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e933fe17eb4bbe45bc7336baab7b0f9
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Item.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Item
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.07058822, g: 0.3636855, b: 0.69803923, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Item.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16e05f24d3af3324fb141763e76ac0eb
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/LocalPlayer.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LocalPlayer
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.06980394, g: 0.69803923, b: 0.20494756, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/LocalPlayer.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e0cad30f368253446b20171acd643881
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Obstacle.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Obstacle
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.69803923, g: 0.5054119, b: 0.07058822, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Obstacle.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 67178d2332c4e3149bfe5bd628d2a3fc
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Player.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Player
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.69803923, g: 0.07058822, b: 0.16673057, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Player.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8dbea2dc1ab9a07478a9f856e847ae6a
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Projectile.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_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Projectile
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 0.19339621, b: 0.5665655, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/GameClient/Assets/Materials/Projectile.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1fb5b2de17241874facbceca0fbede4b
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0d8dff110e30ea341b2df44753b9e7ce
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Enemy.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &1172086184467933461
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 8720703571214989855}
12 | - component: {fileID: 3024847138724150361}
13 | - component: {fileID: 829117775900897876}
14 | - component: {fileID: 1719157270277483131}
15 | m_Layer: 0
16 | m_Name: Model
17 | m_TagString: Untagged
18 | m_Icon: {fileID: 0}
19 | m_NavMeshLayer: 0
20 | m_StaticEditorFlags: 0
21 | m_IsActive: 1
22 | --- !u!4 &8720703571214989855
23 | Transform:
24 | m_ObjectHideFlags: 0
25 | m_CorrespondingSourceObject: {fileID: 0}
26 | m_PrefabInstance: {fileID: 0}
27 | m_PrefabAsset: {fileID: 0}
28 | m_GameObject: {fileID: 1172086184467933461}
29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30 | m_LocalPosition: {x: 0, y: -0.1, z: 0}
31 | m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
32 | m_Children: []
33 | m_Father: {fileID: 8819256922348106597}
34 | m_RootOrder: 0
35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
36 | --- !u!33 &3024847138724150361
37 | MeshFilter:
38 | m_ObjectHideFlags: 0
39 | m_CorrespondingSourceObject: {fileID: 0}
40 | m_PrefabInstance: {fileID: 0}
41 | m_PrefabAsset: {fileID: 0}
42 | m_GameObject: {fileID: 1172086184467933461}
43 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
44 | --- !u!23 &829117775900897876
45 | MeshRenderer:
46 | m_ObjectHideFlags: 0
47 | m_CorrespondingSourceObject: {fileID: 0}
48 | m_PrefabInstance: {fileID: 0}
49 | m_PrefabAsset: {fileID: 0}
50 | m_GameObject: {fileID: 1172086184467933461}
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: 1
59 | m_RendererPriority: 0
60 | m_Materials:
61 | - {fileID: 2100000, guid: 448c5c82d930f7041837109153c1dd7b, type: 2}
62 | m_StaticBatchInfo:
63 | firstSubMesh: 0
64 | subMeshCount: 0
65 | m_StaticBatchRoot: {fileID: 0}
66 | m_ProbeAnchor: {fileID: 0}
67 | m_LightProbeVolumeOverride: {fileID: 0}
68 | m_ScaleInLightmap: 1
69 | m_PreserveUVs: 0
70 | m_IgnoreNormalsForChartDetection: 0
71 | m_ImportantGI: 0
72 | m_StitchLightmapSeams: 0
73 | m_SelectedEditorRenderState: 3
74 | m_MinimumChartSize: 4
75 | m_AutoUVMaxDistance: 0.5
76 | m_AutoUVMaxAngle: 89
77 | m_LightmapParameters: {fileID: 0}
78 | m_SortingLayerID: 0
79 | m_SortingLayer: 0
80 | m_SortingOrder: 0
81 | --- !u!136 &1719157270277483131
82 | CapsuleCollider:
83 | m_ObjectHideFlags: 0
84 | m_CorrespondingSourceObject: {fileID: 0}
85 | m_PrefabInstance: {fileID: 0}
86 | m_PrefabAsset: {fileID: 0}
87 | m_GameObject: {fileID: 1172086184467933461}
88 | m_Material: {fileID: 0}
89 | m_IsTrigger: 0
90 | m_Enabled: 1
91 | m_Radius: 0.5
92 | m_Height: 2
93 | m_Direction: 1
94 | m_Center: {x: 0, y: 0, z: 0}
95 | --- !u!1 &7677484484946083636
96 | GameObject:
97 | m_ObjectHideFlags: 0
98 | m_CorrespondingSourceObject: {fileID: 0}
99 | m_PrefabInstance: {fileID: 0}
100 | m_PrefabAsset: {fileID: 0}
101 | serializedVersion: 6
102 | m_Component:
103 | - component: {fileID: 8819256922348106597}
104 | - component: {fileID: 6758843088225339679}
105 | m_Layer: 0
106 | m_Name: Enemy
107 | m_TagString: Untagged
108 | m_Icon: {fileID: 0}
109 | m_NavMeshLayer: 0
110 | m_StaticEditorFlags: 0
111 | m_IsActive: 1
112 | --- !u!4 &8819256922348106597
113 | Transform:
114 | m_ObjectHideFlags: 0
115 | m_CorrespondingSourceObject: {fileID: 0}
116 | m_PrefabInstance: {fileID: 0}
117 | m_PrefabAsset: {fileID: 0}
118 | m_GameObject: {fileID: 7677484484946083636}
119 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
120 | m_LocalPosition: {x: 0, y: 0, z: 0}
121 | m_LocalScale: {x: 1, y: 1, z: 1}
122 | m_Children:
123 | - {fileID: 8720703571214989855}
124 | m_Father: {fileID: 0}
125 | m_RootOrder: 0
126 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
127 | --- !u!114 &6758843088225339679
128 | MonoBehaviour:
129 | m_ObjectHideFlags: 0
130 | m_CorrespondingSourceObject: {fileID: 0}
131 | m_PrefabInstance: {fileID: 0}
132 | m_PrefabAsset: {fileID: 0}
133 | m_GameObject: {fileID: 7677484484946083636}
134 | m_Enabled: 1
135 | m_EditorHideFlags: 0
136 | m_Script: {fileID: 11500000, guid: 284bb9f00a988ff47a3b1cfa6a3bb4ad, type: 3}
137 | m_Name:
138 | m_EditorClassIdentifier:
139 | id: 0
140 | health: 0
141 | maxHealth: 100
142 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Enemy.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2dccfc4a4c82dcb40af4a55d886f0045
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Explosion.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ef5963e92ff2d14b9e152592cbf699e
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/ItemSpawner.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &4985496808532411025
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 5413716978816317055}
12 | - component: {fileID: 8789615182813861460}
13 | - component: {fileID: 4356684113225609185}
14 | - component: {fileID: 7588849050776964041}
15 | m_Layer: 0
16 | m_Name: ItemSpawner
17 | m_TagString: Untagged
18 | m_Icon: {fileID: 0}
19 | m_NavMeshLayer: 0
20 | m_StaticEditorFlags: 0
21 | m_IsActive: 1
22 | --- !u!4 &5413716978816317055
23 | Transform:
24 | m_ObjectHideFlags: 0
25 | m_CorrespondingSourceObject: {fileID: 0}
26 | m_PrefabInstance: {fileID: 0}
27 | m_PrefabAsset: {fileID: 0}
28 | m_GameObject: {fileID: 4985496808532411025}
29 | m_LocalRotation: {x: 0.35355338, y: -0.1464466, z: 0.35355338, w: 0.8535535}
30 | m_LocalPosition: {x: 0, y: 1, z: 0}
31 | m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
32 | m_Children: []
33 | m_Father: {fileID: 0}
34 | m_RootOrder: 0
35 | m_LocalEulerAnglesHint: {x: 45, y: 0, z: 45}
36 | --- !u!33 &8789615182813861460
37 | MeshFilter:
38 | m_ObjectHideFlags: 0
39 | m_CorrespondingSourceObject: {fileID: 0}
40 | m_PrefabInstance: {fileID: 0}
41 | m_PrefabAsset: {fileID: 0}
42 | m_GameObject: {fileID: 4985496808532411025}
43 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
44 | --- !u!23 &4356684113225609185
45 | MeshRenderer:
46 | m_ObjectHideFlags: 0
47 | m_CorrespondingSourceObject: {fileID: 0}
48 | m_PrefabInstance: {fileID: 0}
49 | m_PrefabAsset: {fileID: 0}
50 | m_GameObject: {fileID: 4985496808532411025}
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: 1
59 | m_RendererPriority: 0
60 | m_Materials:
61 | - {fileID: 2100000, guid: 16e05f24d3af3324fb141763e76ac0eb, type: 2}
62 | m_StaticBatchInfo:
63 | firstSubMesh: 0
64 | subMeshCount: 0
65 | m_StaticBatchRoot: {fileID: 0}
66 | m_ProbeAnchor: {fileID: 0}
67 | m_LightProbeVolumeOverride: {fileID: 0}
68 | m_ScaleInLightmap: 1
69 | m_PreserveUVs: 0
70 | m_IgnoreNormalsForChartDetection: 0
71 | m_ImportantGI: 0
72 | m_StitchLightmapSeams: 0
73 | m_SelectedEditorRenderState: 3
74 | m_MinimumChartSize: 4
75 | m_AutoUVMaxDistance: 0.5
76 | m_AutoUVMaxAngle: 89
77 | m_LightmapParameters: {fileID: 0}
78 | m_SortingLayerID: 0
79 | m_SortingLayer: 0
80 | m_SortingOrder: 0
81 | --- !u!114 &7588849050776964041
82 | MonoBehaviour:
83 | m_ObjectHideFlags: 0
84 | m_CorrespondingSourceObject: {fileID: 0}
85 | m_PrefabInstance: {fileID: 0}
86 | m_PrefabAsset: {fileID: 0}
87 | m_GameObject: {fileID: 4985496808532411025}
88 | m_Enabled: 1
89 | m_EditorHideFlags: 0
90 | m_Script: {fileID: 11500000, guid: 434b70cd78792de419ec2eb9406607f3, type: 3}
91 | m_Name:
92 | m_EditorClassIdentifier:
93 | spawnerId: 0
94 | hasItem: 0
95 | itemModel: {fileID: 4356684113225609185}
96 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/ItemSpawner.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9740eeedaef6deb44b406cc414184688
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/LocalPlayer.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &1172086184467933461
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 8720703571214989855}
12 | - component: {fileID: 3024847138724150361}
13 | - component: {fileID: 829117775900897876}
14 | - component: {fileID: 1719157270277483131}
15 | m_Layer: 0
16 | m_Name: Model
17 | m_TagString: Untagged
18 | m_Icon: {fileID: 0}
19 | m_NavMeshLayer: 0
20 | m_StaticEditorFlags: 0
21 | m_IsActive: 1
22 | --- !u!4 &8720703571214989855
23 | Transform:
24 | m_ObjectHideFlags: 0
25 | m_CorrespondingSourceObject: {fileID: 0}
26 | m_PrefabInstance: {fileID: 0}
27 | m_PrefabAsset: {fileID: 0}
28 | m_GameObject: {fileID: 1172086184467933461}
29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30 | m_LocalPosition: {x: 0, y: -0.1, z: 0}
31 | m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
32 | m_Children: []
33 | m_Father: {fileID: 8819256922348106597}
34 | m_RootOrder: 0
35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
36 | --- !u!33 &3024847138724150361
37 | MeshFilter:
38 | m_ObjectHideFlags: 0
39 | m_CorrespondingSourceObject: {fileID: 0}
40 | m_PrefabInstance: {fileID: 0}
41 | m_PrefabAsset: {fileID: 0}
42 | m_GameObject: {fileID: 1172086184467933461}
43 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
44 | --- !u!23 &829117775900897876
45 | MeshRenderer:
46 | m_ObjectHideFlags: 0
47 | m_CorrespondingSourceObject: {fileID: 0}
48 | m_PrefabInstance: {fileID: 0}
49 | m_PrefabAsset: {fileID: 0}
50 | m_GameObject: {fileID: 1172086184467933461}
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: 1
59 | m_RendererPriority: 0
60 | m_Materials:
61 | - {fileID: 2100000, guid: e0cad30f368253446b20171acd643881, type: 2}
62 | m_StaticBatchInfo:
63 | firstSubMesh: 0
64 | subMeshCount: 0
65 | m_StaticBatchRoot: {fileID: 0}
66 | m_ProbeAnchor: {fileID: 0}
67 | m_LightProbeVolumeOverride: {fileID: 0}
68 | m_ScaleInLightmap: 1
69 | m_PreserveUVs: 0
70 | m_IgnoreNormalsForChartDetection: 0
71 | m_ImportantGI: 0
72 | m_StitchLightmapSeams: 0
73 | m_SelectedEditorRenderState: 3
74 | m_MinimumChartSize: 4
75 | m_AutoUVMaxDistance: 0.5
76 | m_AutoUVMaxAngle: 89
77 | m_LightmapParameters: {fileID: 0}
78 | m_SortingLayerID: 0
79 | m_SortingLayer: 0
80 | m_SortingOrder: 0
81 | --- !u!136 &1719157270277483131
82 | CapsuleCollider:
83 | m_ObjectHideFlags: 0
84 | m_CorrespondingSourceObject: {fileID: 0}
85 | m_PrefabInstance: {fileID: 0}
86 | m_PrefabAsset: {fileID: 0}
87 | m_GameObject: {fileID: 1172086184467933461}
88 | m_Material: {fileID: 0}
89 | m_IsTrigger: 0
90 | m_Enabled: 1
91 | m_Radius: 0.5
92 | m_Height: 2
93 | m_Direction: 1
94 | m_Center: {x: 0, y: 0, z: 0}
95 | --- !u!1 &5170326647844649119
96 | GameObject:
97 | m_ObjectHideFlags: 0
98 | m_CorrespondingSourceObject: {fileID: 0}
99 | m_PrefabInstance: {fileID: 0}
100 | m_PrefabAsset: {fileID: 0}
101 | serializedVersion: 6
102 | m_Component:
103 | - component: {fileID: 1243984683900922996}
104 | - component: {fileID: 7455574231334980082}
105 | - component: {fileID: 1919155995562736217}
106 | - component: {fileID: 2888799594428538753}
107 | m_Layer: 0
108 | m_Name: Camera
109 | m_TagString: Untagged
110 | m_Icon: {fileID: 0}
111 | m_NavMeshLayer: 0
112 | m_StaticEditorFlags: 0
113 | m_IsActive: 1
114 | --- !u!4 &1243984683900922996
115 | Transform:
116 | m_ObjectHideFlags: 0
117 | m_CorrespondingSourceObject: {fileID: 0}
118 | m_PrefabInstance: {fileID: 0}
119 | m_PrefabAsset: {fileID: 0}
120 | m_GameObject: {fileID: 5170326647844649119}
121 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
122 | m_LocalPosition: {x: 0, y: 0.5, z: 0}
123 | m_LocalScale: {x: 1, y: 1, z: 1}
124 | m_Children: []
125 | m_Father: {fileID: 8819256922348106597}
126 | m_RootOrder: 1
127 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
128 | --- !u!20 &7455574231334980082
129 | Camera:
130 | m_ObjectHideFlags: 0
131 | m_CorrespondingSourceObject: {fileID: 0}
132 | m_PrefabInstance: {fileID: 0}
133 | m_PrefabAsset: {fileID: 0}
134 | m_GameObject: {fileID: 5170326647844649119}
135 | m_Enabled: 1
136 | serializedVersion: 2
137 | m_ClearFlags: 1
138 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
139 | m_projectionMatrixMode: 1
140 | m_SensorSize: {x: 36, y: 24}
141 | m_LensShift: {x: 0, y: 0}
142 | m_GateFitMode: 2
143 | m_FocalLength: 50
144 | m_NormalizedViewPortRect:
145 | serializedVersion: 2
146 | x: 0
147 | y: 0
148 | width: 1
149 | height: 1
150 | near clip plane: 0.3
151 | far clip plane: 1000
152 | field of view: 60
153 | orthographic: 0
154 | orthographic size: 5
155 | m_Depth: 0
156 | m_CullingMask:
157 | serializedVersion: 2
158 | m_Bits: 4294967295
159 | m_RenderingPath: -1
160 | m_TargetTexture: {fileID: 0}
161 | m_TargetDisplay: 0
162 | m_TargetEye: 3
163 | m_HDR: 1
164 | m_AllowMSAA: 1
165 | m_AllowDynamicResolution: 0
166 | m_ForceIntoRT: 0
167 | m_OcclusionCulling: 1
168 | m_StereoConvergence: 10
169 | m_StereoSeparation: 0.022
170 | --- !u!81 &1919155995562736217
171 | AudioListener:
172 | m_ObjectHideFlags: 0
173 | m_CorrespondingSourceObject: {fileID: 0}
174 | m_PrefabInstance: {fileID: 0}
175 | m_PrefabAsset: {fileID: 0}
176 | m_GameObject: {fileID: 5170326647844649119}
177 | m_Enabled: 1
178 | --- !u!114 &2888799594428538753
179 | MonoBehaviour:
180 | m_ObjectHideFlags: 0
181 | m_CorrespondingSourceObject: {fileID: 0}
182 | m_PrefabInstance: {fileID: 0}
183 | m_PrefabAsset: {fileID: 0}
184 | m_GameObject: {fileID: 5170326647844649119}
185 | m_Enabled: 1
186 | m_EditorHideFlags: 0
187 | m_Script: {fileID: 11500000, guid: f1c022f9b5d858f40b262a5a98011911, type: 3}
188 | m_Name:
189 | m_EditorClassIdentifier:
190 | player: {fileID: 8283048436765457631}
191 | sensitivity: 100
192 | clampAngle: 85
193 | --- !u!1 &7677484484946083636
194 | GameObject:
195 | m_ObjectHideFlags: 0
196 | m_CorrespondingSourceObject: {fileID: 0}
197 | m_PrefabInstance: {fileID: 0}
198 | m_PrefabAsset: {fileID: 0}
199 | serializedVersion: 6
200 | m_Component:
201 | - component: {fileID: 8819256922348106597}
202 | - component: {fileID: 8283048436765457631}
203 | - component: {fileID: 6761221046541469059}
204 | m_Layer: 0
205 | m_Name: LocalPlayer
206 | m_TagString: Untagged
207 | m_Icon: {fileID: 0}
208 | m_NavMeshLayer: 0
209 | m_StaticEditorFlags: 0
210 | m_IsActive: 1
211 | --- !u!4 &8819256922348106597
212 | Transform:
213 | m_ObjectHideFlags: 0
214 | m_CorrespondingSourceObject: {fileID: 0}
215 | m_PrefabInstance: {fileID: 0}
216 | m_PrefabAsset: {fileID: 0}
217 | m_GameObject: {fileID: 7677484484946083636}
218 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
219 | m_LocalPosition: {x: 0, y: 0, z: 0}
220 | m_LocalScale: {x: 1, y: 1, z: 1}
221 | m_Children:
222 | - {fileID: 8720703571214989855}
223 | - {fileID: 1243984683900922996}
224 | m_Father: {fileID: 0}
225 | m_RootOrder: 0
226 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
227 | --- !u!114 &8283048436765457631
228 | MonoBehaviour:
229 | m_ObjectHideFlags: 0
230 | m_CorrespondingSourceObject: {fileID: 0}
231 | m_PrefabInstance: {fileID: 0}
232 | m_PrefabAsset: {fileID: 0}
233 | m_GameObject: {fileID: 7677484484946083636}
234 | m_Enabled: 1
235 | m_EditorHideFlags: 0
236 | m_Script: {fileID: 11500000, guid: 3b93d13cb73807341b5d81681ed1db8e, type: 3}
237 | m_Name:
238 | m_EditorClassIdentifier:
239 | id: 0
240 | username:
241 | health: 0
242 | maxHealth: 100
243 | itemCount: 0
244 | model: {fileID: 829117775900897876}
245 | --- !u!114 &6761221046541469059
246 | MonoBehaviour:
247 | m_ObjectHideFlags: 0
248 | m_CorrespondingSourceObject: {fileID: 0}
249 | m_PrefabInstance: {fileID: 0}
250 | m_PrefabAsset: {fileID: 0}
251 | m_GameObject: {fileID: 7677484484946083636}
252 | m_Enabled: 1
253 | m_EditorHideFlags: 0
254 | m_Script: {fileID: 11500000, guid: 8bdcd1c6445aa2c44941c68487443478, type: 3}
255 | m_Name:
256 | m_EditorClassIdentifier:
257 | camTransform: {fileID: 1243984683900922996}
258 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/LocalPlayer.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb61d6c6e5fb656458b94c79159ad652
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Player.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &1172086184467933461
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 8720703571214989855}
12 | - component: {fileID: 3024847138724150361}
13 | - component: {fileID: 829117775900897876}
14 | - component: {fileID: 1719157270277483131}
15 | m_Layer: 0
16 | m_Name: Model
17 | m_TagString: Untagged
18 | m_Icon: {fileID: 0}
19 | m_NavMeshLayer: 0
20 | m_StaticEditorFlags: 0
21 | m_IsActive: 1
22 | --- !u!4 &8720703571214989855
23 | Transform:
24 | m_ObjectHideFlags: 0
25 | m_CorrespondingSourceObject: {fileID: 0}
26 | m_PrefabInstance: {fileID: 0}
27 | m_PrefabAsset: {fileID: 0}
28 | m_GameObject: {fileID: 1172086184467933461}
29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30 | m_LocalPosition: {x: 0, y: -0.1, z: 0}
31 | m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
32 | m_Children: []
33 | m_Father: {fileID: 8819256922348106597}
34 | m_RootOrder: 0
35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
36 | --- !u!33 &3024847138724150361
37 | MeshFilter:
38 | m_ObjectHideFlags: 0
39 | m_CorrespondingSourceObject: {fileID: 0}
40 | m_PrefabInstance: {fileID: 0}
41 | m_PrefabAsset: {fileID: 0}
42 | m_GameObject: {fileID: 1172086184467933461}
43 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
44 | --- !u!23 &829117775900897876
45 | MeshRenderer:
46 | m_ObjectHideFlags: 0
47 | m_CorrespondingSourceObject: {fileID: 0}
48 | m_PrefabInstance: {fileID: 0}
49 | m_PrefabAsset: {fileID: 0}
50 | m_GameObject: {fileID: 1172086184467933461}
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: 1
59 | m_RendererPriority: 0
60 | m_Materials:
61 | - {fileID: 2100000, guid: 8dbea2dc1ab9a07478a9f856e847ae6a, type: 2}
62 | m_StaticBatchInfo:
63 | firstSubMesh: 0
64 | subMeshCount: 0
65 | m_StaticBatchRoot: {fileID: 0}
66 | m_ProbeAnchor: {fileID: 0}
67 | m_LightProbeVolumeOverride: {fileID: 0}
68 | m_ScaleInLightmap: 1
69 | m_PreserveUVs: 0
70 | m_IgnoreNormalsForChartDetection: 0
71 | m_ImportantGI: 0
72 | m_StitchLightmapSeams: 0
73 | m_SelectedEditorRenderState: 3
74 | m_MinimumChartSize: 4
75 | m_AutoUVMaxDistance: 0.5
76 | m_AutoUVMaxAngle: 89
77 | m_LightmapParameters: {fileID: 0}
78 | m_SortingLayerID: 0
79 | m_SortingLayer: 0
80 | m_SortingOrder: 0
81 | --- !u!136 &1719157270277483131
82 | CapsuleCollider:
83 | m_ObjectHideFlags: 0
84 | m_CorrespondingSourceObject: {fileID: 0}
85 | m_PrefabInstance: {fileID: 0}
86 | m_PrefabAsset: {fileID: 0}
87 | m_GameObject: {fileID: 1172086184467933461}
88 | m_Material: {fileID: 0}
89 | m_IsTrigger: 0
90 | m_Enabled: 1
91 | m_Radius: 0.5
92 | m_Height: 2
93 | m_Direction: 1
94 | m_Center: {x: 0, y: 0, z: 0}
95 | --- !u!1 &7677484484946083636
96 | GameObject:
97 | m_ObjectHideFlags: 0
98 | m_CorrespondingSourceObject: {fileID: 0}
99 | m_PrefabInstance: {fileID: 0}
100 | m_PrefabAsset: {fileID: 0}
101 | serializedVersion: 6
102 | m_Component:
103 | - component: {fileID: 8819256922348106597}
104 | - component: {fileID: 8283048436765457631}
105 | m_Layer: 0
106 | m_Name: Player
107 | m_TagString: Untagged
108 | m_Icon: {fileID: 0}
109 | m_NavMeshLayer: 0
110 | m_StaticEditorFlags: 0
111 | m_IsActive: 1
112 | --- !u!4 &8819256922348106597
113 | Transform:
114 | m_ObjectHideFlags: 0
115 | m_CorrespondingSourceObject: {fileID: 0}
116 | m_PrefabInstance: {fileID: 0}
117 | m_PrefabAsset: {fileID: 0}
118 | m_GameObject: {fileID: 7677484484946083636}
119 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
120 | m_LocalPosition: {x: 321.8996, y: 107.521034, z: -300.09445}
121 | m_LocalScale: {x: 1, y: 1, z: 1}
122 | m_Children:
123 | - {fileID: 8720703571214989855}
124 | m_Father: {fileID: 0}
125 | m_RootOrder: 0
126 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
127 | --- !u!114 &8283048436765457631
128 | MonoBehaviour:
129 | m_ObjectHideFlags: 0
130 | m_CorrespondingSourceObject: {fileID: 0}
131 | m_PrefabInstance: {fileID: 0}
132 | m_PrefabAsset: {fileID: 0}
133 | m_GameObject: {fileID: 7677484484946083636}
134 | m_Enabled: 1
135 | m_EditorHideFlags: 0
136 | m_Script: {fileID: 11500000, guid: 3b93d13cb73807341b5d81681ed1db8e, type: 3}
137 | m_Name:
138 | m_EditorClassIdentifier:
139 | id: 0
140 | username:
141 | health: 0
142 | maxHealth: 100
143 | itemCount: 0
144 | model: {fileID: 829117775900897876}
145 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Player.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 557e9a3a3d9ee014087f779a676d456f
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Projectile.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &7131206815609313178
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 4700221099396009589}
12 | - component: {fileID: 4067262209791578621}
13 | - component: {fileID: 2558553660552828124}
14 | - component: {fileID: 3047420256918589598}
15 | - component: {fileID: 5417140448464929028}
16 | m_Layer: 0
17 | m_Name: Projectile
18 | m_TagString: Untagged
19 | m_Icon: {fileID: 0}
20 | m_NavMeshLayer: 0
21 | m_StaticEditorFlags: 0
22 | m_IsActive: 1
23 | --- !u!4 &4700221099396009589
24 | Transform:
25 | m_ObjectHideFlags: 0
26 | m_CorrespondingSourceObject: {fileID: 0}
27 | m_PrefabInstance: {fileID: 0}
28 | m_PrefabAsset: {fileID: 0}
29 | m_GameObject: {fileID: 7131206815609313178}
30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
31 | m_LocalPosition: {x: 0, y: 0, z: 0}
32 | m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
33 | m_Children: []
34 | m_Father: {fileID: 0}
35 | m_RootOrder: 0
36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
37 | --- !u!33 &4067262209791578621
38 | MeshFilter:
39 | m_ObjectHideFlags: 0
40 | m_CorrespondingSourceObject: {fileID: 0}
41 | m_PrefabInstance: {fileID: 0}
42 | m_PrefabAsset: {fileID: 0}
43 | m_GameObject: {fileID: 7131206815609313178}
44 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
45 | --- !u!23 &2558553660552828124
46 | MeshRenderer:
47 | m_ObjectHideFlags: 0
48 | m_CorrespondingSourceObject: {fileID: 0}
49 | m_PrefabInstance: {fileID: 0}
50 | m_PrefabAsset: {fileID: 0}
51 | m_GameObject: {fileID: 7131206815609313178}
52 | m_Enabled: 1
53 | m_CastShadows: 1
54 | m_ReceiveShadows: 1
55 | m_DynamicOccludee: 1
56 | m_MotionVectors: 1
57 | m_LightProbeUsage: 1
58 | m_ReflectionProbeUsage: 1
59 | m_RenderingLayerMask: 1
60 | m_RendererPriority: 0
61 | m_Materials:
62 | - {fileID: 2100000, guid: 1fb5b2de17241874facbceca0fbede4b, type: 2}
63 | m_StaticBatchInfo:
64 | firstSubMesh: 0
65 | subMeshCount: 0
66 | m_StaticBatchRoot: {fileID: 0}
67 | m_ProbeAnchor: {fileID: 0}
68 | m_LightProbeVolumeOverride: {fileID: 0}
69 | m_ScaleInLightmap: 1
70 | m_PreserveUVs: 0
71 | m_IgnoreNormalsForChartDetection: 0
72 | m_ImportantGI: 0
73 | m_StitchLightmapSeams: 0
74 | m_SelectedEditorRenderState: 3
75 | m_MinimumChartSize: 4
76 | m_AutoUVMaxDistance: 0.5
77 | m_AutoUVMaxAngle: 89
78 | m_LightmapParameters: {fileID: 0}
79 | m_SortingLayerID: 0
80 | m_SortingLayer: 0
81 | m_SortingOrder: 0
82 | --- !u!135 &3047420256918589598
83 | SphereCollider:
84 | m_ObjectHideFlags: 0
85 | m_CorrespondingSourceObject: {fileID: 0}
86 | m_PrefabInstance: {fileID: 0}
87 | m_PrefabAsset: {fileID: 0}
88 | m_GameObject: {fileID: 7131206815609313178}
89 | m_Material: {fileID: 0}
90 | m_IsTrigger: 0
91 | m_Enabled: 1
92 | serializedVersion: 2
93 | m_Radius: 0.5
94 | m_Center: {x: 0, y: 0, z: 0}
95 | --- !u!114 &5417140448464929028
96 | MonoBehaviour:
97 | m_ObjectHideFlags: 0
98 | m_CorrespondingSourceObject: {fileID: 0}
99 | m_PrefabInstance: {fileID: 0}
100 | m_PrefabAsset: {fileID: 0}
101 | m_GameObject: {fileID: 7131206815609313178}
102 | m_Enabled: 1
103 | m_EditorHideFlags: 0
104 | m_Script: {fileID: 11500000, guid: 0bc02faa9ff568f40ae9358da5f8def7, type: 3}
105 | m_Name:
106 | m_EditorClassIdentifier:
107 | id: 0
108 | explosionPrefab: {fileID: 4963627214139517258, guid: 2ef5963e92ff2d14b9e152592cbf699e,
109 | type: 3}
110 |
--------------------------------------------------------------------------------
/GameClient/Assets/Prefabs/Projectile.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e39005320ad7dc54680afbc46dda2bd6
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5d110667564a2247bebea66cec91b3b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scenes/Main.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: df1b584a1801bb74a863186234b910bd
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5991841b2cc1134e883785a0dc415c9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/CameraController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class CameraController : MonoBehaviour
6 | {
7 | public PlayerManager player;
8 | public float sensitivity = 100f;
9 | public float clampAngle = 85f;
10 |
11 | private float verticalRotation;
12 | private float horizontalRotation;
13 |
14 | private void Start()
15 | {
16 | verticalRotation = transform.localEulerAngles.x;
17 | horizontalRotation = player.transform.eulerAngles.y;
18 | }
19 |
20 | private void Update()
21 | {
22 | if (Input.GetKeyDown(KeyCode.Escape))
23 | {
24 | ToggleCursorMode();
25 | }
26 |
27 | if (Cursor.lockState == CursorLockMode.Locked)
28 | {
29 | Look();
30 | }
31 | Debug.DrawRay(transform.position, transform.forward * 2, Color.red);
32 | }
33 |
34 | private void Look()
35 | {
36 | float _mouseVertical = -Input.GetAxis("Mouse Y");
37 | float _mouseHorizontal = Input.GetAxis("Mouse X");
38 |
39 | verticalRotation += _mouseVertical * sensitivity * Time.deltaTime;
40 | horizontalRotation += _mouseHorizontal * sensitivity * Time.deltaTime;
41 |
42 | verticalRotation = Mathf.Clamp(verticalRotation, -clampAngle, clampAngle);
43 |
44 | transform.localRotation = Quaternion.Euler(verticalRotation, 0f, 0f);
45 | player.transform.rotation = Quaternion.Euler(0f, horizontalRotation, 0f);
46 | }
47 |
48 | private void ToggleCursorMode()
49 | {
50 | Cursor.visible = !Cursor.visible;
51 |
52 | if (Cursor.lockState == CursorLockMode.None)
53 | {
54 | Cursor.lockState = CursorLockMode.Locked;
55 | }
56 | else
57 | {
58 | Cursor.lockState = CursorLockMode.None;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/CameraController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f1c022f9b5d858f40b262a5a98011911
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/Client.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bff09310e74970a449b0e8cfcdd1cb3d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ClientHandle.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Net;
4 | using UnityEngine;
5 |
6 | public class ClientHandle : MonoBehaviour
7 | {
8 | public static void Welcome(Packet _packet)
9 | {
10 | string _msg = _packet.ReadString();
11 | int _myId = _packet.ReadInt();
12 |
13 | Debug.Log($"Message from server: {_msg}");
14 | Client.instance.myId = _myId;
15 | ClientSend.WelcomeReceived();
16 |
17 | // Now that we have the client's id, connect UDP
18 | Client.instance.udp.Connect(((IPEndPoint)Client.instance.tcp.socket.Client.LocalEndPoint).Port);
19 | }
20 |
21 | public static void SpawnPlayer(Packet _packet)
22 | {
23 | int _id = _packet.ReadInt();
24 | string _username = _packet.ReadString();
25 | Vector3 _position = _packet.ReadVector3();
26 | Quaternion _rotation = _packet.ReadQuaternion();
27 |
28 | GameManager.instance.SpawnPlayer(_id, _username, _position, _rotation);
29 | }
30 |
31 | public static void PlayerPosition(Packet _packet)
32 | {
33 | int _id = _packet.ReadInt();
34 | Vector3 _position = _packet.ReadVector3();
35 |
36 | if (GameManager.players.TryGetValue(_id, out PlayerManager _player))
37 | {
38 | _player.transform.position = _position;
39 | }
40 | }
41 |
42 | public static void PlayerRotation(Packet _packet)
43 | {
44 | int _id = _packet.ReadInt();
45 | Quaternion _rotation = _packet.ReadQuaternion();
46 |
47 | if (GameManager.players.TryGetValue(_id, out PlayerManager _player))
48 | {
49 | _player.transform.rotation = _rotation;
50 | }
51 | }
52 |
53 | public static void PlayerDisconnected(Packet _packet)
54 | {
55 | int _id = _packet.ReadInt();
56 |
57 | Destroy(GameManager.players[_id].gameObject);
58 | GameManager.players.Remove(_id);
59 | }
60 |
61 | public static void PlayerHealth(Packet _packet)
62 | {
63 | int _id = _packet.ReadInt();
64 | float _health = _packet.ReadFloat();
65 |
66 | GameManager.players[_id].SetHealth(_health);
67 | }
68 |
69 | public static void PlayerRespawned(Packet _packet)
70 | {
71 | int _id = _packet.ReadInt();
72 |
73 | GameManager.players[_id].Respawn();
74 | }
75 |
76 | public static void CreateItemSpawner(Packet _packet)
77 | {
78 | int _spawnerId = _packet.ReadInt();
79 | Vector3 _spawnerPosition = _packet.ReadVector3();
80 | bool _hasItem = _packet.ReadBool();
81 |
82 | GameManager.instance.CreateItemSpawner(_spawnerId, _spawnerPosition, _hasItem);
83 | }
84 |
85 | public static void ItemSpawned(Packet _packet)
86 | {
87 | int _spawnerId = _packet.ReadInt();
88 |
89 | GameManager.itemSpawners[_spawnerId].ItemSpawned();
90 | }
91 |
92 | public static void ItemPickedUp(Packet _packet)
93 | {
94 | int _spawnerId = _packet.ReadInt();
95 | int _byPlayer = _packet.ReadInt();
96 |
97 | GameManager.itemSpawners[_spawnerId].ItemPickedUp();
98 | GameManager.players[_byPlayer].itemCount++;
99 | }
100 |
101 | public static void SpawnProjectile(Packet _packet)
102 | {
103 | int _projectileId = _packet.ReadInt();
104 | Vector3 _position = _packet.ReadVector3();
105 | int _thrownByPlayer = _packet.ReadInt();
106 |
107 | GameManager.instance.SpawnProjectile(_projectileId, _position);
108 | GameManager.players[_thrownByPlayer].itemCount--;
109 | }
110 |
111 | public static void ProjectilePosition(Packet _packet)
112 | {
113 | int _projectileId = _packet.ReadInt();
114 | Vector3 _position = _packet.ReadVector3();
115 |
116 | if (GameManager.projectiles.TryGetValue(_projectileId, out ProjectileManager _projectile))
117 | {
118 | _projectile.transform.position = _position;
119 | }
120 | }
121 |
122 | public static void ProjectileExploded(Packet _packet)
123 | {
124 | int _projectileId = _packet.ReadInt();
125 | Vector3 _position = _packet.ReadVector3();
126 |
127 | GameManager.projectiles[_projectileId].Explode(_position);
128 | }
129 |
130 | public static void SpawnEnemy(Packet _packet)
131 | {
132 | int _enemyId = _packet.ReadInt();
133 | Vector3 _position = _packet.ReadVector3();
134 |
135 | GameManager.instance.SpawnEnemy(_enemyId, _position);
136 | }
137 |
138 | public static void EnemyPosition(Packet _packet)
139 | {
140 | int _enemyId = _packet.ReadInt();
141 | Vector3 _position = _packet.ReadVector3();
142 |
143 | if (GameManager.enemies.TryGetValue(_enemyId, out EnemyManager _enemy))
144 | {
145 | _enemy.transform.position = _position;
146 | }
147 | }
148 |
149 | public static void EnemyHealth(Packet _packet)
150 | {
151 | int _enemyId = _packet.ReadInt();
152 | float _health = _packet.ReadFloat();
153 |
154 | GameManager.enemies[_enemyId].SetHealth(_health);
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ClientHandle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 229cd0539f7d2394895801eda00e7f14
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ClientSend.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ClientSend : MonoBehaviour
6 | {
7 | /// Sends a packet to the server via TCP.
8 | /// The packet to send to the sever.
9 | private static void SendTCPData(Packet _packet)
10 | {
11 | _packet.WriteLength();
12 | Client.instance.tcp.SendData(_packet);
13 | }
14 |
15 | /// Sends a packet to the server via UDP.
16 | /// The packet to send to the sever.
17 | private static void SendUDPData(Packet _packet)
18 | {
19 | _packet.WriteLength();
20 | Client.instance.udp.SendData(_packet);
21 | }
22 |
23 | #region Packets
24 | /// Lets the server know that the welcome message was received.
25 | public static void WelcomeReceived()
26 | {
27 | using (Packet _packet = new Packet((int)ClientPackets.welcomeReceived))
28 | {
29 | _packet.Write(Client.instance.myId);
30 | _packet.Write(UIManager.instance.usernameField.text);
31 |
32 | SendTCPData(_packet);
33 | }
34 | }
35 |
36 | /// Sends player input to the server.
37 | ///
38 | public static void PlayerMovement(bool[] _inputs)
39 | {
40 | using (Packet _packet = new Packet((int)ClientPackets.playerMovement))
41 | {
42 | _packet.Write(_inputs.Length);
43 | foreach (bool _input in _inputs)
44 | {
45 | _packet.Write(_input);
46 | }
47 | _packet.Write(GameManager.players[Client.instance.myId].transform.rotation);
48 |
49 | SendUDPData(_packet);
50 | }
51 | }
52 |
53 | public static void PlayerShoot(Vector3 _facing)
54 | {
55 | using (Packet _packet = new Packet((int)ClientPackets.playerShoot))
56 | {
57 | _packet.Write(_facing);
58 |
59 | SendTCPData(_packet);
60 | }
61 | }
62 |
63 | public static void PlayerThrowItem(Vector3 _facing)
64 | {
65 | using (Packet _packet = new Packet((int)ClientPackets.playerThrowItem))
66 | {
67 | _packet.Write(_facing);
68 |
69 | SendTCPData(_packet);
70 | }
71 | }
72 | #endregion
73 | }
74 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ClientSend.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c6e1f99e9948c34c9023dd633217657
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/EnemyManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class EnemyManager : MonoBehaviour
6 | {
7 | public int id;
8 | public float health;
9 | public float maxHealth = 100f;
10 |
11 | public void Initialize(int _id)
12 | {
13 | id = _id;
14 | health = maxHealth;
15 | }
16 |
17 | public void SetHealth(float _health)
18 | {
19 | health = _health;
20 |
21 | if (health <= 0f)
22 | {
23 | GameManager.enemies.Remove(id);
24 | Destroy(gameObject);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/EnemyManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 284bb9f00a988ff47a3b1cfa6a3bb4ad
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/GameManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class GameManager : MonoBehaviour
6 | {
7 | public static GameManager instance;
8 |
9 | public static Dictionary players = new Dictionary();
10 | public static Dictionary itemSpawners = new Dictionary();
11 | public static Dictionary projectiles = new Dictionary();
12 | public static Dictionary enemies = new Dictionary();
13 |
14 | public GameObject localPlayerPrefab;
15 | public GameObject playerPrefab;
16 | public GameObject itemSpawnerPrefab;
17 | public GameObject projectilePrefab;
18 | public GameObject enemyPrefab;
19 |
20 | private void Awake()
21 | {
22 | if (instance == null)
23 | {
24 | instance = this;
25 | }
26 | else if (instance != this)
27 | {
28 | Debug.Log("Instance already exists, destroying object!");
29 | Destroy(this);
30 | }
31 | }
32 |
33 | /// Spawns a player.
34 | /// The player's ID.
35 | /// The player's name.
36 | /// The player's starting position.
37 | /// The player's starting rotation.
38 | public void SpawnPlayer(int _id, string _username, Vector3 _position, Quaternion _rotation)
39 | {
40 | GameObject _player;
41 | if (_id == Client.instance.myId)
42 | {
43 | _player = Instantiate(localPlayerPrefab, _position, _rotation);
44 | }
45 | else
46 | {
47 | _player = Instantiate(playerPrefab, _position, _rotation);
48 | }
49 |
50 | _player.GetComponent().Initialize(_id, _username);
51 | players.Add(_id, _player.GetComponent());
52 | }
53 |
54 | public void CreateItemSpawner(int _spawnerId, Vector3 _position, bool _hasItem)
55 | {
56 | GameObject _spawner = Instantiate(itemSpawnerPrefab, _position, itemSpawnerPrefab.transform.rotation);
57 | _spawner.GetComponent().Initialize(_spawnerId, _hasItem);
58 | itemSpawners.Add(_spawnerId, _spawner.GetComponent());
59 | }
60 |
61 | public void SpawnProjectile(int _id, Vector3 _position)
62 | {
63 | GameObject _projectile = Instantiate(projectilePrefab, _position, Quaternion.identity);
64 | _projectile.GetComponent().Initialize(_id);
65 | projectiles.Add(_id, _projectile.GetComponent());
66 | }
67 |
68 | public void SpawnEnemy(int _id, Vector3 _position)
69 | {
70 | GameObject _enemy = Instantiate(enemyPrefab, _position, Quaternion.identity);
71 | _enemy.GetComponent().Initialize(_id);
72 | enemies.Add(_id, _enemy.GetComponent());
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/GameManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e0c880809460fc849b7d4aa9246cbfd4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ItemSpawner.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ItemSpawner : MonoBehaviour
6 | {
7 | public int spawnerId;
8 | public bool hasItem;
9 | public MeshRenderer itemModel;
10 |
11 | public float itemRotationSpeed = 50f;
12 | public float itemBobSpeed = 2f;
13 | private Vector3 basePosition;
14 |
15 | private void Update()
16 | {
17 | if (hasItem)
18 | {
19 | transform.Rotate(Vector3.up, itemRotationSpeed * Time.deltaTime, Space.World);
20 | transform.position = basePosition + new Vector3(0f, 0.25f * Mathf.Sin(Time.time * itemBobSpeed), 0f);
21 | }
22 | }
23 |
24 | public void Initialize(int _spawnerId, bool _hasItem)
25 | {
26 | spawnerId = _spawnerId;
27 | hasItem = _hasItem;
28 | itemModel.enabled = _hasItem;
29 |
30 | basePosition = transform.position;
31 | }
32 |
33 | public void ItemSpawned()
34 | {
35 | hasItem = true;
36 | itemModel.enabled = true;
37 | }
38 |
39 | public void ItemPickedUp()
40 | {
41 | hasItem = false;
42 | itemModel.enabled = false;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ItemSpawner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 434b70cd78792de419ec2eb9406607f3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/Packet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bf1c40df46c28304e979fd3732458c70
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/PlayerController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class PlayerController : MonoBehaviour
6 | {
7 | public Transform camTransform;
8 |
9 | private void Update()
10 | {
11 | if (Input.GetKeyDown(KeyCode.Mouse0))
12 | {
13 | ClientSend.PlayerShoot(camTransform.forward);
14 | }
15 |
16 | if (Input.GetKeyDown(KeyCode.Mouse1))
17 | {
18 | ClientSend.PlayerThrowItem(camTransform.forward);
19 | }
20 | }
21 |
22 | private void FixedUpdate()
23 | {
24 | SendInputToServer();
25 | }
26 |
27 | /// Sends player input to the server.
28 | private void SendInputToServer()
29 | {
30 | bool[] _inputs = new bool[]
31 | {
32 | Input.GetKey(KeyCode.W),
33 | Input.GetKey(KeyCode.S),
34 | Input.GetKey(KeyCode.A),
35 | Input.GetKey(KeyCode.D),
36 | Input.GetKey(KeyCode.Space)
37 | };
38 |
39 | ClientSend.PlayerMovement(_inputs);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/PlayerController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8bdcd1c6445aa2c44941c68487443478
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/PlayerManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class PlayerManager : MonoBehaviour
6 | {
7 | public int id;
8 | public string username;
9 | public float health;
10 | public float maxHealth = 100f;
11 | public int itemCount = 0;
12 | public MeshRenderer model;
13 |
14 | public void Initialize(int _id, string _username)
15 | {
16 | id = _id;
17 | username = _username;
18 | health = maxHealth;
19 | }
20 |
21 | public void SetHealth(float _health)
22 | {
23 | health = _health;
24 |
25 | if (health <= 0f)
26 | {
27 | Die();
28 | }
29 | }
30 |
31 | public void Die()
32 | {
33 | model.enabled = false;
34 | }
35 |
36 | public void Respawn()
37 | {
38 | model.enabled = true;
39 | SetHealth(maxHealth);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/PlayerManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3b93d13cb73807341b5d81681ed1db8e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ProjectileManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ProjectileManager : MonoBehaviour
6 | {
7 | public int id;
8 | public GameObject explosionPrefab;
9 |
10 | public void Initialize(int _id)
11 | {
12 | id = _id;
13 | }
14 |
15 | public void Explode(Vector3 _position)
16 | {
17 | transform.position = _position;
18 | Instantiate(explosionPrefab, transform.position, Quaternion.identity);
19 | GameManager.projectiles.Remove(id);
20 | Destroy(gameObject);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ProjectileManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0bc02faa9ff568f40ae9358da5f8def7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ThreadManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ThreadManager : MonoBehaviour
6 | {
7 | private static readonly List executeOnMainThread = new List();
8 | private static readonly List executeCopiedOnMainThread = new List();
9 | private static bool actionToExecuteOnMainThread = false;
10 |
11 | private void Update()
12 | {
13 | UpdateMain();
14 | }
15 |
16 | /// Sets an action to be executed on the main thread.
17 | /// The action to be executed on the main thread.
18 | public static void ExecuteOnMainThread(Action _action)
19 | {
20 | if (_action == null)
21 | {
22 | Debug.Log("No action to execute on main thread!");
23 | return;
24 | }
25 |
26 | lock (executeOnMainThread)
27 | {
28 | executeOnMainThread.Add(_action);
29 | actionToExecuteOnMainThread = true;
30 | }
31 | }
32 |
33 | /// Executes all code meant to run on the main thread. NOTE: Call this ONLY from the main thread.
34 | public static void UpdateMain()
35 | {
36 | if (actionToExecuteOnMainThread)
37 | {
38 | executeCopiedOnMainThread.Clear();
39 | lock (executeOnMainThread)
40 | {
41 | executeCopiedOnMainThread.AddRange(executeOnMainThread);
42 | executeOnMainThread.Clear();
43 | actionToExecuteOnMainThread = false;
44 | }
45 |
46 | for (int i = 0; i < executeCopiedOnMainThread.Count; i++)
47 | {
48 | executeCopiedOnMainThread[i]();
49 | }
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/ThreadManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ecf5333aac5d2064e8c270f6aa032cca
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/UIManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEngine.UI;
5 |
6 | public class UIManager : MonoBehaviour
7 | {
8 | public static UIManager instance;
9 |
10 | public GameObject startMenu;
11 | public InputField usernameField;
12 |
13 | private void Awake()
14 | {
15 | if (instance == null)
16 | {
17 | instance = this;
18 | }
19 | else if (instance != this)
20 | {
21 | Debug.Log("Instance already exists, destroying object!");
22 | Destroy(this);
23 | }
24 | }
25 |
26 | /// Attempts to connect to the server.
27 | public void ConnectToServer()
28 | {
29 | startMenu.SetActive(false);
30 | usernameField.interactable = false;
31 | Client.instance.ConnectToServer();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/GameClient/Assets/Scripts/UIManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6bc0d538b776270429f28dd4b5815915
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/GameClient/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ads": "2.0.8",
4 | "com.unity.analytics": "3.2.2",
5 | "com.unity.collab-proxy": "1.2.15",
6 | "com.unity.package-manager-ui": "2.0.3",
7 | "com.unity.purchasing": "2.0.3",
8 | "com.unity.textmeshpro": "1.3.0",
9 | "com.unity.modules.ai": "1.0.0",
10 | "com.unity.modules.animation": "1.0.0",
11 | "com.unity.modules.assetbundle": "1.0.0",
12 | "com.unity.modules.audio": "1.0.0",
13 | "com.unity.modules.cloth": "1.0.0",
14 | "com.unity.modules.director": "1.0.0",
15 | "com.unity.modules.imageconversion": "1.0.0",
16 | "com.unity.modules.imgui": "1.0.0",
17 | "com.unity.modules.jsonserialize": "1.0.0",
18 | "com.unity.modules.particlesystem": "1.0.0",
19 | "com.unity.modules.physics": "1.0.0",
20 | "com.unity.modules.physics2d": "1.0.0",
21 | "com.unity.modules.screencapture": "1.0.0",
22 | "com.unity.modules.terrain": "1.0.0",
23 | "com.unity.modules.terrainphysics": "1.0.0",
24 | "com.unity.modules.tilemap": "1.0.0",
25 | "com.unity.modules.ui": "1.0.0",
26 | "com.unity.modules.uielements": "1.0.0",
27 | "com.unity.modules.umbra": "1.0.0",
28 | "com.unity.modules.unityanalytics": "1.0.0",
29 | "com.unity.modules.unitywebrequest": "1.0.0",
30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
31 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
32 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
33 | "com.unity.modules.unitywebrequestwww": "1.0.0",
34 | "com.unity.modules.vehicles": "1.0.0",
35 | "com.unity.modules.video": "1.0.0",
36 | "com.unity.modules.vr": "1.0.0",
37 | "com.unity.modules.wind": "1.0.0",
38 | "com.unity.modules.xr": "1.0.0"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/GameClient/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: 1024
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/GameClient/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 |
--------------------------------------------------------------------------------
/GameClient/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: 8
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: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 |
--------------------------------------------------------------------------------
/GameClient/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/Main.unity
10 | guid: df1b584a1801bb74a863186234b910bd
11 | m_configObjects: {}
12 |
--------------------------------------------------------------------------------
/GameClient/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: 7
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_SpritePackerMode: 0
12 | m_SpritePackerPaddingPower: 1
13 | m_EtcTextureCompressorBehavior: 1
14 | m_EtcTextureFastCompressor: 1
15 | m_EtcTextureNormalCompressor: 2
16 | m_EtcTextureBestCompressor: 4
17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
18 | m_ProjectGenerationRootNamespace:
19 | m_UserGeneratedProjectSuffix:
20 | m_CollabEditorSettings:
21 | inProgressEnabled: 1
22 |
--------------------------------------------------------------------------------
/GameClient/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 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
41 | m_PreloadedShaders: []
42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
43 | type: 0}
44 | m_CustomRenderPipeline: {fileID: 0}
45 | m_TransparencySortMode: 0
46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
47 | m_DefaultRenderingPath: 1
48 | m_DefaultMobileRenderingPath: 1
49 | m_TierSettings: []
50 | m_LightmapStripping: 0
51 | m_FogStripping: 0
52 | m_InstancingStripping: 0
53 | m_LightmapKeepPlain: 1
54 | m_LightmapKeepDirCombined: 1
55 | m_LightmapKeepDynamicPlain: 1
56 | m_LightmapKeepDynamicDirCombined: 1
57 | m_LightmapKeepShadowMask: 1
58 | m_LightmapKeepSubtractive: 1
59 | m_FogKeepLinear: 1
60 | m_FogKeepExp: 1
61 | m_FogKeepExp2: 1
62 | m_AlbedoSwatchInfos: []
63 | m_LightsUseLinearIntensity: 0
64 | m_LightsUseColorTemperature: 0
65 |
--------------------------------------------------------------------------------
/GameClient/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 |
--------------------------------------------------------------------------------
/GameClient/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 |
--------------------------------------------------------------------------------
/GameClient/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 |
--------------------------------------------------------------------------------
/GameClient/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: 4
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_ReuseCollisionCallbacks: 1
28 | m_AutoSyncTransforms: 0
29 | m_AlwaysShowColliders: 0
30 | m_ShowColliderSleep: 1
31 | m_ShowColliderContacts: 0
32 | m_ShowColliderAABB: 0
33 | m_ContactArrowScale: 0.2
34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
39 |
--------------------------------------------------------------------------------
/GameClient/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 | - type:
8 | m_NativeTypeID: 108
9 | m_ManagedTypePPtr: {fileID: 0}
10 | m_ManagedTypeFallback:
11 | defaultPresets:
12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea,
13 | type: 2}
14 | - type:
15 | m_NativeTypeID: 1020
16 | m_ManagedTypePPtr: {fileID: 0}
17 | m_ManagedTypeFallback:
18 | defaultPresets:
19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6,
20 | type: 2}
21 | - type:
22 | m_NativeTypeID: 1006
23 | m_ManagedTypePPtr: {fileID: 0}
24 | m_ManagedTypeFallback:
25 | defaultPresets:
26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9,
27 | type: 2}
28 |
--------------------------------------------------------------------------------
/GameClient/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.3.7f1
2 |
--------------------------------------------------------------------------------
/GameClient/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: 4
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: 16
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: 16
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: 16
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: 2
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: 16
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: 40
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: 1
136 | antiAliasing: 4
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: 16
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: 1
164 | antiAliasing: 4
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: 16
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSP2: 2
183 | Standalone: 5
184 | Tizen: 2
185 | WebGL: 3
186 | WiiU: 5
187 | Windows Store Apps: 5
188 | XboxOne: 5
189 | iPhone: 2
190 | tvOS: 2
191 |
--------------------------------------------------------------------------------
/GameClient/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 | - PostProcessing
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 |
--------------------------------------------------------------------------------
/GameClient/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.033333
7 | Maximum Allowed Timestep: 0.1
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.033333
10 |
--------------------------------------------------------------------------------
/GameClient/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 1
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
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 |
--------------------------------------------------------------------------------
/GameClient/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_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/GameServer/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
--------------------------------------------------------------------------------
/GameServer/GameServer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29318.209
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameServer", "GameServer\GameServer.csproj", "{6B4D622F-61BB-497B-A211-AD432E8887E4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {6B4D622F-61BB-497B-A211-AD432E8887E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {6B4D622F-61BB-497B-A211-AD432E8887E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6B4D622F-61BB-497B-A211-AD432E8887E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {6B4D622F-61BB-497B-A211-AD432E8887E4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {E143CC06-5373-4453-B05F-58A391549E79}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/GameServer/GameServer/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameServer
6 | {
7 | class Constants
8 | {
9 | public const int TICKS_PER_SEC = 30; // How many ticks per second
10 | public const float MS_PER_TICK = 1000f / TICKS_PER_SEC; // How many milliseconds per tick
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameServer/GameServer/GameLogic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameServer
6 | {
7 | class GameLogic
8 | {
9 | /// Runs all game logic.
10 | public static void Update()
11 | {
12 | foreach (Client _client in Server.clients.Values)
13 | {
14 | if (_client.player != null)
15 | {
16 | _client.player.Update();
17 | }
18 | }
19 |
20 | ThreadManager.UpdateMain();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameServer/GameServer/GameServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/GameServer/GameServer/Player.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Numerics;
5 |
6 | namespace GameServer
7 | {
8 | class Player
9 | {
10 | public int id;
11 | public string username;
12 |
13 | public Vector3 position;
14 | public Quaternion rotation;
15 |
16 | private float moveSpeed = 5f / Constants.TICKS_PER_SEC;
17 | private bool[] inputs;
18 |
19 | public Player(int _id, string _username, Vector3 _spawnPosition)
20 | {
21 | id = _id;
22 | username = _username;
23 | position = _spawnPosition;
24 | rotation = Quaternion.Identity;
25 |
26 | inputs = new bool[4];
27 | }
28 |
29 | /// Processes player input and moves the player.
30 | public void Update()
31 | {
32 | Vector2 _inputDirection = Vector2.Zero;
33 | if (inputs[0])
34 | {
35 | _inputDirection.Y += 1;
36 | }
37 | if (inputs[1])
38 | {
39 | _inputDirection.Y -= 1;
40 | }
41 | if (inputs[2])
42 | {
43 | _inputDirection.X += 1;
44 | }
45 | if (inputs[3])
46 | {
47 | _inputDirection.X -= 1;
48 | }
49 |
50 | Move(_inputDirection);
51 | }
52 |
53 | /// Calculates the player's desired movement direction and moves him.
54 | ///
55 | private void Move(Vector2 _inputDirection)
56 | {
57 | Vector3 _forward = Vector3.Transform(new Vector3(0, 0, 1), rotation);
58 | Vector3 _right = Vector3.Normalize(Vector3.Cross(_forward, new Vector3(0, 1, 0)));
59 |
60 | Vector3 _moveDirection = _right * _inputDirection.X + _forward * _inputDirection.Y;
61 | position += _moveDirection * moveSpeed;
62 |
63 | ServerSend.PlayerPosition(this);
64 | ServerSend.PlayerRotation(this);
65 | }
66 |
67 | /// Updates the player input with newly received input.
68 | /// The new key inputs.
69 | /// The new rotation.
70 | public void SetInput(bool[] _inputs, Quaternion _rotation)
71 | {
72 | inputs = _inputs;
73 | rotation = _rotation;
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/GameServer/GameServer/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace GameServer
5 | {
6 | class Program
7 | {
8 | private static bool isRunning = false;
9 |
10 | static void Main(string[] args)
11 | {
12 | Console.Title = "Game Server";
13 | isRunning = true;
14 |
15 | Thread mainThread = new Thread(new ThreadStart(MainThread));
16 | mainThread.Start();
17 |
18 | Server.Start(50, 26950);
19 | }
20 |
21 | private static void MainThread()
22 | {
23 | Console.WriteLine($"Main thread started. Running at {Constants.TICKS_PER_SEC} ticks per second.");
24 | DateTime _nextLoop = DateTime.Now;
25 |
26 | while (isRunning)
27 | {
28 | while (_nextLoop < DateTime.Now)
29 | {
30 | // If the time for the next loop is in the past, aka it's time to execute another tick
31 | GameLogic.Update(); // Execute game logic
32 |
33 | _nextLoop = _nextLoop.AddMilliseconds(Constants.MS_PER_TICK); // Calculate at what point in time the next tick should be executed
34 |
35 | if (_nextLoop > DateTime.Now)
36 | {
37 | // If the execution time for the next tick is in the future, aka the server is NOT running behind
38 | Thread.Sleep(_nextLoop - DateTime.Now); // Let the thread sleep until it's needed again.
39 | }
40 | }
41 | }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/GameServer/GameServer/Server.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Net;
5 | using System.Net.Sockets;
6 |
7 | namespace GameServer
8 | {
9 | class Server
10 | {
11 | public static int MaxPlayers { get; private set; }
12 | public static int Port { get; private set; }
13 | public static Dictionary clients = new Dictionary();
14 | public delegate void PacketHandler(int _fromClient, Packet _packet);
15 | public static Dictionary packetHandlers;
16 |
17 | private static TcpListener tcpListener;
18 | private static UdpClient udpListener;
19 |
20 | /// Starts the server.
21 | /// The maximum players that can be connected simultaneously.
22 | /// The port to start the server on.
23 | public static void Start(int _maxPlayers, int _port)
24 | {
25 | MaxPlayers = _maxPlayers;
26 | Port = _port;
27 |
28 | Console.WriteLine("Starting server...");
29 | InitializeServerData();
30 |
31 | tcpListener = new TcpListener(IPAddress.Any, Port);
32 | tcpListener.Start();
33 | tcpListener.BeginAcceptTcpClient(TCPConnectCallback, null);
34 |
35 | udpListener = new UdpClient(Port);
36 | udpListener.BeginReceive(UDPReceiveCallback, null);
37 |
38 | Console.WriteLine($"Server started on port {Port}.");
39 | }
40 |
41 | /// Handles new TCP connections.
42 | private static void TCPConnectCallback(IAsyncResult _result)
43 | {
44 | TcpClient _client = tcpListener.EndAcceptTcpClient(_result);
45 | tcpListener.BeginAcceptTcpClient(TCPConnectCallback, null);
46 | Console.WriteLine($"Incoming connection from {_client.Client.RemoteEndPoint}...");
47 |
48 | for (int i = 1; i <= MaxPlayers; i++)
49 | {
50 | if (clients[i].tcp.socket == null)
51 | {
52 | clients[i].tcp.Connect(_client);
53 | return;
54 | }
55 | }
56 |
57 | Console.WriteLine($"{_client.Client.RemoteEndPoint} failed to connect: Server full!");
58 | }
59 |
60 | /// Receives incoming UDP data.
61 | private static void UDPReceiveCallback(IAsyncResult _result)
62 | {
63 | try
64 | {
65 | IPEndPoint _clientEndPoint = new IPEndPoint(IPAddress.Any, 0);
66 | byte[] _data = udpListener.EndReceive(_result, ref _clientEndPoint);
67 | udpListener.BeginReceive(UDPReceiveCallback, null);
68 |
69 | if (_data.Length < 4)
70 | {
71 | return;
72 | }
73 |
74 | using (Packet _packet = new Packet(_data))
75 | {
76 | int _clientId = _packet.ReadInt();
77 |
78 | if (_clientId == 0)
79 | {
80 | return;
81 | }
82 |
83 | if (clients[_clientId].udp.endPoint == null)
84 | {
85 | // If this is a new connection
86 | clients[_clientId].udp.Connect(_clientEndPoint);
87 | return;
88 | }
89 |
90 | if (clients[_clientId].udp.endPoint.ToString() == _clientEndPoint.ToString())
91 | {
92 | // Ensures that the client is not being impersonated by another by sending a false clientID
93 | clients[_clientId].udp.HandleData(_packet);
94 | }
95 | }
96 | }
97 | catch (Exception _ex)
98 | {
99 | Console.WriteLine($"Error receiving UDP data: {_ex}");
100 | }
101 | }
102 |
103 | /// Sends a packet to the specified endpoint via UDP.
104 | /// The endpoint to send the packet to.
105 | /// The packet to send.
106 | public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet)
107 | {
108 | try
109 | {
110 | if (_clientEndPoint != null)
111 | {
112 | udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null);
113 | }
114 | }
115 | catch (Exception _ex)
116 | {
117 | Console.WriteLine($"Error sending data to {_clientEndPoint} via UDP: {_ex}");
118 | }
119 | }
120 |
121 | /// Initializes all necessary server data.
122 | private static void InitializeServerData()
123 | {
124 | for (int i = 1; i <= MaxPlayers; i++)
125 | {
126 | clients.Add(i, new Client(i));
127 | }
128 |
129 | packetHandlers = new Dictionary()
130 | {
131 | { (int)ClientPackets.welcomeReceived, ServerHandle.WelcomeReceived },
132 | { (int)ClientPackets.playerMovement, ServerHandle.PlayerMovement },
133 | };
134 | Console.WriteLine("Initialized packets.");
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/GameServer/GameServer/ServerHandle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Numerics;
4 | using System.Text;
5 |
6 | namespace GameServer
7 | {
8 | class ServerHandle
9 | {
10 | public static void WelcomeReceived(int _fromClient, Packet _packet)
11 | {
12 | int _clientIdCheck = _packet.ReadInt();
13 | string _username = _packet.ReadString();
14 |
15 | Console.WriteLine($"{Server.clients[_fromClient].tcp.socket.Client.RemoteEndPoint} connected successfully and is now player {_fromClient}.");
16 | if (_fromClient != _clientIdCheck)
17 | {
18 | Console.WriteLine($"Player \"{_username}\" (ID: {_fromClient}) has assumed the wrong client ID ({_clientIdCheck})!");
19 | }
20 | Server.clients[_fromClient].SendIntoGame(_username);
21 | }
22 |
23 | public static void PlayerMovement(int _fromClient, Packet _packet)
24 | {
25 | bool[] _inputs = new bool[_packet.ReadInt()];
26 | for (int i = 0; i < _inputs.Length; i++)
27 | {
28 | _inputs[i] = _packet.ReadBool();
29 | }
30 | Quaternion _rotation = _packet.ReadQuaternion();
31 |
32 | Server.clients[_fromClient].player.SetInput(_inputs, _rotation);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GameServer/GameServer/ServerSend.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameServer
6 | {
7 | class ServerSend
8 | {
9 | /// Sends a packet to a client via TCP.
10 | /// The client to send the packet the packet to.
11 | /// The packet to send to the client.
12 | private static void SendTCPData(int _toClient, Packet _packet)
13 | {
14 | _packet.WriteLength();
15 | Server.clients[_toClient].tcp.SendData(_packet);
16 | }
17 |
18 | /// Sends a packet to a client via UDP.
19 | /// The client to send the packet the packet to.
20 | /// The packet to send to the client.
21 | private static void SendUDPData(int _toClient, Packet _packet)
22 | {
23 | _packet.WriteLength();
24 | Server.clients[_toClient].udp.SendData(_packet);
25 | }
26 |
27 | /// Sends a packet to all clients via TCP.
28 | /// The packet to send.
29 | private static void SendTCPDataToAll(Packet _packet)
30 | {
31 | _packet.WriteLength();
32 | for (int i = 1; i <= Server.MaxPlayers; i++)
33 | {
34 | Server.clients[i].tcp.SendData(_packet);
35 | }
36 | }
37 | /// Sends a packet to all clients except one via TCP.
38 | /// The client to NOT send the data to.
39 | /// The packet to send.
40 | private static void SendTCPDataToAll(int _exceptClient, Packet _packet)
41 | {
42 | _packet.WriteLength();
43 | for (int i = 1; i <= Server.MaxPlayers; i++)
44 | {
45 | if (i != _exceptClient)
46 | {
47 | Server.clients[i].tcp.SendData(_packet);
48 | }
49 | }
50 | }
51 |
52 | /// Sends a packet to all clients via UDP.
53 | /// The packet to send.
54 | private static void SendUDPDataToAll(Packet _packet)
55 | {
56 | _packet.WriteLength();
57 | for (int i = 1; i <= Server.MaxPlayers; i++)
58 | {
59 | Server.clients[i].udp.SendData(_packet);
60 | }
61 | }
62 | /// Sends a packet to all clients except one via UDP.
63 | /// The client to NOT send the data to.
64 | /// The packet to send.
65 | private static void SendUDPDataToAll(int _exceptClient, Packet _packet)
66 | {
67 | _packet.WriteLength();
68 | for (int i = 1; i <= Server.MaxPlayers; i++)
69 | {
70 | if (i != _exceptClient)
71 | {
72 | Server.clients[i].udp.SendData(_packet);
73 | }
74 | }
75 | }
76 |
77 | #region Packets
78 | /// Sends a welcome message to the given client.
79 | /// The client to send the packet to.
80 | /// The message to send.
81 | public static void Welcome(int _toClient, string _msg)
82 | {
83 | using (Packet _packet = new Packet((int)ServerPackets.welcome))
84 | {
85 | _packet.Write(_msg);
86 | _packet.Write(_toClient);
87 |
88 | SendTCPData(_toClient, _packet);
89 | }
90 | }
91 |
92 | /// Tells a client to spawn a player.
93 | /// The client that should spawn the player.
94 | /// The player to spawn.
95 | public static void SpawnPlayer(int _toClient, Player _player)
96 | {
97 | using (Packet _packet = new Packet((int)ServerPackets.spawnPlayer))
98 | {
99 | _packet.Write(_player.id);
100 | _packet.Write(_player.username);
101 | _packet.Write(_player.position);
102 | _packet.Write(_player.rotation);
103 |
104 | SendTCPData(_toClient, _packet);
105 | }
106 | }
107 |
108 | /// Sends a player's updated position to all clients.
109 | /// The player whose position to update.
110 | public static void PlayerPosition(Player _player)
111 | {
112 | using (Packet _packet = new Packet((int)ServerPackets.playerPosition))
113 | {
114 | _packet.Write(_player.id);
115 | _packet.Write(_player.position);
116 |
117 | SendUDPDataToAll(_packet);
118 | }
119 | }
120 |
121 | /// Sends a player's updated rotation to all clients except to himself (to avoid overwriting the local player's rotation).
122 | /// The player whose rotation to update.
123 | public static void PlayerRotation(Player _player)
124 | {
125 | using (Packet _packet = new Packet((int)ServerPackets.playerRotation))
126 | {
127 | _packet.Write(_player.id);
128 | _packet.Write(_player.rotation);
129 |
130 | SendUDPDataToAll(_player.id, _packet);
131 | }
132 | }
133 | #endregion
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/GameServer/GameServer/ThreadManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameServer
6 | {
7 | class ThreadManager
8 | {
9 | private static readonly List executeOnMainThread = new List();
10 | private static readonly List executeCopiedOnMainThread = new List();
11 | private static bool actionToExecuteOnMainThread = false;
12 |
13 | /// Sets an action to be executed on the main thread.
14 | /// The action to be executed on the main thread.
15 | public static void ExecuteOnMainThread(Action _action)
16 | {
17 | if (_action == null)
18 | {
19 | Console.WriteLine("No action to execute on main thread!");
20 | return;
21 | }
22 |
23 | lock (executeOnMainThread)
24 | {
25 | executeOnMainThread.Add(_action);
26 | actionToExecuteOnMainThread = true;
27 | }
28 | }
29 |
30 | /// Executes all code meant to run on the main thread. NOTE: Call this ONLY from the main thread.
31 | public static void UpdateMain()
32 | {
33 | if (actionToExecuteOnMainThread)
34 | {
35 | executeCopiedOnMainThread.Clear();
36 | lock (executeOnMainThread)
37 | {
38 | executeCopiedOnMainThread.AddRange(executeOnMainThread);
39 | executeOnMainThread.Clear();
40 | actionToExecuteOnMainThread = false;
41 | }
42 |
43 | for (int i = 0; i < executeCopiedOnMainThread.Count; i++)
44 | {
45 | executeCopiedOnMainThread[i]();
46 | }
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Licence.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Tom Weiland
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Important!
2 |
3 | I've created a new, *way better* networking solution, [RiptideNetworking](https://github.com/tom-weiland/RiptideNetworking), along with [improved tutorials](https://youtube.com/playlist?list=PLXkn83W0Qkfn3qF7NU4OEtVwOD6U2wphJ) on how to use it.
4 |
5 | # C# Networking Tutorial Series
6 | This is the source code for my [C# networking tutorial series](https://www.youtube.com/playlist?list=PLXkn83W0QkfnqsK8I0RAz5AbUxfg3bOQ5) on YouTube.
7 |
8 | Each branch contains the code corresponding to what you should have at the end of each video in the series.
9 |
10 | Video | Branch
11 | --- | ---
12 | [Part 1](https://youtu.be/uh8XaC0Y5MA) | [tutorial-part1](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part1)
13 | [Part 2](https://youtu.be/4uHTSknGJaY) | [tutorial-part2](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part2)
14 | [Part 3](https://youtu.be/QajkUJeypy4) | [tutorial-part3](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part3)
15 | [Part 4](https://youtu.be/_h6Ta-vxAzQ) | [tutorial-part4](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part4)
16 | [Part 5](https://youtu.be/Q3G_BBpbCek) | [tutorial-part5](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part5)
17 | [Part 6](https://youtu.be/qkjr_rv4AIQ) | [tutorial-part6](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part6)
18 | [Part 7](https://youtu.be/fnc2WKGV2eA) | [tutorial-part7](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part7)
19 | [Part 8](https://youtu.be/yxQ0_TL1jw8) | [tutorial-part8](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part8)
20 | [Part 9](https://youtu.be/7Tvdla3lqwo) | [tutorial-part9](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part9)
21 | [Part 10](https://youtu.be/lVX7qgiSYgY) | [tutorial-part10](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part10)
22 | [Part 11](https://youtu.be/IhctHRcI3gs) | [tutorial-part11](https://github.com/tom-weiland/tcp-udp-networking/tree/tutorial-part11)
23 |
24 | **Note:** using the console app server in the GameServer project (from any branch) with the GameClient project from branch 6 and up *will produce errors*. This is because after part 5 of the series, we moved the server code into Unity and stopped updating the console server.
25 |
26 | **Unity Version: 2018.3.7**
27 |
28 |
--------------------------------------------------------------------------------
/UnityGameServer/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
4 | #
5 | /[Ll]ibrary/
6 | /[Tt]emp/
7 | /[Oo]bj/
8 | /[Bb]uild/
9 | /[Bb]uilds/
10 | /[Ll]ogs/
11 | /[Mm]emoryCaptures/
12 |
13 | # Never ignore Asset meta data
14 | !/[Aa]ssets/**/*.meta
15 |
16 | # Uncomment this line if you wish to ignore the asset store tools plugin
17 | # /[Aa]ssets/AssetStoreTools*
18 |
19 | # Autogenerated Jetbrains Rider plugin
20 | [Aa]ssets/Plugins/Editor/JetBrains*
21 |
22 | # Visual Studio cache directory
23 | .vs/
24 |
25 | # Gradle cache directory
26 | .gradle/
27 |
28 | # Autogenerated VS/MD/Consulo solution and project files
29 | ExportedObj/
30 | .consulo/
31 | *.csproj
32 | *.unityproj
33 | *.sln
34 | *.suo
35 | *.tmp
36 | *.user
37 | *.userprefs
38 | *.pidb
39 | *.booproj
40 | *.svd
41 | *.pdb
42 | *.mdb
43 | *.opendb
44 | *.VC.db
45 |
46 | # Unity3D generated meta files
47 | *.pidb.meta
48 | *.pdb.meta
49 | *.mdb.meta
50 |
51 | # Unity3D generated file on crash reports
52 | sysinfo.txt
53 |
54 | # Builds
55 | *.apk
56 | *.unitypackage
57 |
58 | # Crashlytics generated file
59 | crashlytics-build.properties
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03053d6a119e87c49a13a1caaffdc7b8
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Enemy.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &3836324251903321801
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 285872425894075200}
12 | - component: {fileID: 3744993397257897151}
13 | - component: {fileID: 1625433066320220041}
14 | m_Layer: 0
15 | m_Name: Model
16 | m_TagString: Untagged
17 | m_Icon: {fileID: 0}
18 | m_NavMeshLayer: 0
19 | m_StaticEditorFlags: 0
20 | m_IsActive: 1
21 | --- !u!4 &285872425894075200
22 | Transform:
23 | m_ObjectHideFlags: 0
24 | m_CorrespondingSourceObject: {fileID: 0}
25 | m_PrefabInstance: {fileID: 0}
26 | m_PrefabAsset: {fileID: 0}
27 | m_GameObject: {fileID: 3836324251903321801}
28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29 | m_LocalPosition: {x: 0, y: -0.1, z: 0}
30 | m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
31 | m_Children: []
32 | m_Father: {fileID: 6574823444410646575}
33 | m_RootOrder: 0
34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35 | --- !u!33 &3744993397257897151
36 | MeshFilter:
37 | m_ObjectHideFlags: 0
38 | m_CorrespondingSourceObject: {fileID: 0}
39 | m_PrefabInstance: {fileID: 0}
40 | m_PrefabAsset: {fileID: 0}
41 | m_GameObject: {fileID: 3836324251903321801}
42 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
43 | --- !u!23 &1625433066320220041
44 | MeshRenderer:
45 | m_ObjectHideFlags: 0
46 | m_CorrespondingSourceObject: {fileID: 0}
47 | m_PrefabInstance: {fileID: 0}
48 | m_PrefabAsset: {fileID: 0}
49 | m_GameObject: {fileID: 3836324251903321801}
50 | m_Enabled: 1
51 | m_CastShadows: 1
52 | m_ReceiveShadows: 1
53 | m_DynamicOccludee: 1
54 | m_MotionVectors: 1
55 | m_LightProbeUsage: 1
56 | m_ReflectionProbeUsage: 1
57 | m_RenderingLayerMask: 1
58 | m_RendererPriority: 0
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!1 &4187005777591049097
81 | GameObject:
82 | m_ObjectHideFlags: 0
83 | m_CorrespondingSourceObject: {fileID: 0}
84 | m_PrefabInstance: {fileID: 0}
85 | m_PrefabAsset: {fileID: 0}
86 | serializedVersion: 6
87 | m_Component:
88 | - component: {fileID: 6574823444410646575}
89 | - component: {fileID: 6277959537082929143}
90 | - component: {fileID: 2319307683833354698}
91 | m_Layer: 0
92 | m_Name: Enemy
93 | m_TagString: Enemy
94 | m_Icon: {fileID: 0}
95 | m_NavMeshLayer: 0
96 | m_StaticEditorFlags: 0
97 | m_IsActive: 1
98 | --- !u!4 &6574823444410646575
99 | Transform:
100 | m_ObjectHideFlags: 0
101 | m_CorrespondingSourceObject: {fileID: 0}
102 | m_PrefabInstance: {fileID: 0}
103 | m_PrefabAsset: {fileID: 0}
104 | m_GameObject: {fileID: 4187005777591049097}
105 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
106 | m_LocalPosition: {x: 0, y: 0, z: 0}
107 | m_LocalScale: {x: 1, y: 1, z: 1}
108 | m_Children:
109 | - {fileID: 285872425894075200}
110 | - {fileID: 4375789778787327676}
111 | m_Father: {fileID: 0}
112 | m_RootOrder: 0
113 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
114 | --- !u!114 &6277959537082929143
115 | MonoBehaviour:
116 | m_ObjectHideFlags: 0
117 | m_CorrespondingSourceObject: {fileID: 0}
118 | m_PrefabInstance: {fileID: 0}
119 | m_PrefabAsset: {fileID: 0}
120 | m_GameObject: {fileID: 4187005777591049097}
121 | m_Enabled: 1
122 | m_EditorHideFlags: 0
123 | m_Script: {fileID: 11500000, guid: acb6dd31ae39a294f99cb34bb1d3217e, type: 3}
124 | m_Name:
125 | m_EditorClassIdentifier:
126 | id: 0
127 | state: 0
128 | target: {fileID: 0}
129 | controller: {fileID: 2319307683833354698}
130 | shootOrigin: {fileID: 4375789778787327676}
131 | gravity: -19.62
132 | patrolSpeed: 2
133 | chaseSpeed: 8
134 | health: 0
135 | maxHealth: 100
136 | detectionRange: 30
137 | shootRange: 15
138 | shootAccuracy: 0.01
139 | patrolDuration: 3
140 | idleDuration: 1
141 | --- !u!143 &2319307683833354698
142 | CharacterController:
143 | m_ObjectHideFlags: 0
144 | m_CorrespondingSourceObject: {fileID: 0}
145 | m_PrefabInstance: {fileID: 0}
146 | m_PrefabAsset: {fileID: 0}
147 | m_GameObject: {fileID: 4187005777591049097}
148 | m_Material: {fileID: 0}
149 | m_IsTrigger: 0
150 | m_Enabled: 1
151 | serializedVersion: 2
152 | m_Height: 1.8
153 | m_Radius: 0.45
154 | m_SlopeLimit: 45
155 | m_StepOffset: 0.3
156 | m_SkinWidth: 0.08
157 | m_MinMoveDistance: 0.001
158 | m_Center: {x: 0, y: -0.1, z: 0}
159 | --- !u!1 &5842331344950954625
160 | GameObject:
161 | m_ObjectHideFlags: 0
162 | m_CorrespondingSourceObject: {fileID: 0}
163 | m_PrefabInstance: {fileID: 0}
164 | m_PrefabAsset: {fileID: 0}
165 | serializedVersion: 6
166 | m_Component:
167 | - component: {fileID: 4375789778787327676}
168 | m_Layer: 0
169 | m_Name: ShootOrigin
170 | m_TagString: Untagged
171 | m_Icon: {fileID: 0}
172 | m_NavMeshLayer: 0
173 | m_StaticEditorFlags: 0
174 | m_IsActive: 1
175 | --- !u!4 &4375789778787327676
176 | Transform:
177 | m_ObjectHideFlags: 0
178 | m_CorrespondingSourceObject: {fileID: 0}
179 | m_PrefabInstance: {fileID: 0}
180 | m_PrefabAsset: {fileID: 0}
181 | m_GameObject: {fileID: 5842331344950954625}
182 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
183 | m_LocalPosition: {x: 0, y: 0.5, z: 0}
184 | m_LocalScale: {x: 1, y: 1, z: 1}
185 | m_Children: []
186 | m_Father: {fileID: 6574823444410646575}
187 | m_RootOrder: 1
188 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
189 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Enemy.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9304265d43a31f043bb49ce027fa06b2
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Player.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &3836324251903321801
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 285872425894075200}
12 | - component: {fileID: 3744993397257897151}
13 | - component: {fileID: 1625433066320220041}
14 | m_Layer: 0
15 | m_Name: Model
16 | m_TagString: Untagged
17 | m_Icon: {fileID: 0}
18 | m_NavMeshLayer: 0
19 | m_StaticEditorFlags: 0
20 | m_IsActive: 1
21 | --- !u!4 &285872425894075200
22 | Transform:
23 | m_ObjectHideFlags: 0
24 | m_CorrespondingSourceObject: {fileID: 0}
25 | m_PrefabInstance: {fileID: 0}
26 | m_PrefabAsset: {fileID: 0}
27 | m_GameObject: {fileID: 3836324251903321801}
28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29 | m_LocalPosition: {x: 0, y: -0.1, z: 0}
30 | m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
31 | m_Children: []
32 | m_Father: {fileID: 6574823444410646575}
33 | m_RootOrder: 0
34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35 | --- !u!33 &3744993397257897151
36 | MeshFilter:
37 | m_ObjectHideFlags: 0
38 | m_CorrespondingSourceObject: {fileID: 0}
39 | m_PrefabInstance: {fileID: 0}
40 | m_PrefabAsset: {fileID: 0}
41 | m_GameObject: {fileID: 3836324251903321801}
42 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
43 | --- !u!23 &1625433066320220041
44 | MeshRenderer:
45 | m_ObjectHideFlags: 0
46 | m_CorrespondingSourceObject: {fileID: 0}
47 | m_PrefabInstance: {fileID: 0}
48 | m_PrefabAsset: {fileID: 0}
49 | m_GameObject: {fileID: 3836324251903321801}
50 | m_Enabled: 1
51 | m_CastShadows: 1
52 | m_ReceiveShadows: 1
53 | m_DynamicOccludee: 1
54 | m_MotionVectors: 1
55 | m_LightProbeUsage: 1
56 | m_ReflectionProbeUsage: 1
57 | m_RenderingLayerMask: 1
58 | m_RendererPriority: 0
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!1 &4187005777591049097
81 | GameObject:
82 | m_ObjectHideFlags: 0
83 | m_CorrespondingSourceObject: {fileID: 0}
84 | m_PrefabInstance: {fileID: 0}
85 | m_PrefabAsset: {fileID: 0}
86 | serializedVersion: 6
87 | m_Component:
88 | - component: {fileID: 6574823444410646575}
89 | - component: {fileID: 1920120271202843960}
90 | - component: {fileID: 2319307683833354698}
91 | m_Layer: 0
92 | m_Name: Player
93 | m_TagString: Player
94 | m_Icon: {fileID: 0}
95 | m_NavMeshLayer: 0
96 | m_StaticEditorFlags: 0
97 | m_IsActive: 1
98 | --- !u!4 &6574823444410646575
99 | Transform:
100 | m_ObjectHideFlags: 0
101 | m_CorrespondingSourceObject: {fileID: 0}
102 | m_PrefabInstance: {fileID: 0}
103 | m_PrefabAsset: {fileID: 0}
104 | m_GameObject: {fileID: 4187005777591049097}
105 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
106 | m_LocalPosition: {x: 0, y: 0, z: 0}
107 | m_LocalScale: {x: 1, y: 1, z: 1}
108 | m_Children:
109 | - {fileID: 285872425894075200}
110 | - {fileID: 4375789778787327676}
111 | m_Father: {fileID: 0}
112 | m_RootOrder: 0
113 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
114 | --- !u!114 &1920120271202843960
115 | MonoBehaviour:
116 | m_ObjectHideFlags: 0
117 | m_CorrespondingSourceObject: {fileID: 0}
118 | m_PrefabInstance: {fileID: 0}
119 | m_PrefabAsset: {fileID: 0}
120 | m_GameObject: {fileID: 4187005777591049097}
121 | m_Enabled: 1
122 | m_EditorHideFlags: 0
123 | m_Script: {fileID: 11500000, guid: 10a3aab0770abde4b94f5c2dbbb4ec43, type: 3}
124 | m_Name:
125 | m_EditorClassIdentifier:
126 | id: 0
127 | username:
128 | controller: {fileID: 2319307683833354698}
129 | shootOrigin: {fileID: 4375789778787327676}
130 | gravity: -19.62
131 | moveSpeed: 5
132 | jumpSpeed: 9
133 | health: 0
134 | maxHealth: 100
135 | itemAmount: 0
136 | maxItemAmount: 3
137 | --- !u!143 &2319307683833354698
138 | CharacterController:
139 | m_ObjectHideFlags: 0
140 | m_CorrespondingSourceObject: {fileID: 0}
141 | m_PrefabInstance: {fileID: 0}
142 | m_PrefabAsset: {fileID: 0}
143 | m_GameObject: {fileID: 4187005777591049097}
144 | m_Material: {fileID: 0}
145 | m_IsTrigger: 0
146 | m_Enabled: 1
147 | serializedVersion: 2
148 | m_Height: 1.8
149 | m_Radius: 0.45
150 | m_SlopeLimit: 45
151 | m_StepOffset: 0.3
152 | m_SkinWidth: 0.08
153 | m_MinMoveDistance: 0.001
154 | m_Center: {x: 0, y: -0.1, z: 0}
155 | --- !u!1 &5842331344950954625
156 | GameObject:
157 | m_ObjectHideFlags: 0
158 | m_CorrespondingSourceObject: {fileID: 0}
159 | m_PrefabInstance: {fileID: 0}
160 | m_PrefabAsset: {fileID: 0}
161 | serializedVersion: 6
162 | m_Component:
163 | - component: {fileID: 4375789778787327676}
164 | m_Layer: 0
165 | m_Name: ShootOrigin
166 | m_TagString: Untagged
167 | m_Icon: {fileID: 0}
168 | m_NavMeshLayer: 0
169 | m_StaticEditorFlags: 0
170 | m_IsActive: 1
171 | --- !u!4 &4375789778787327676
172 | Transform:
173 | m_ObjectHideFlags: 0
174 | m_CorrespondingSourceObject: {fileID: 0}
175 | m_PrefabInstance: {fileID: 0}
176 | m_PrefabAsset: {fileID: 0}
177 | m_GameObject: {fileID: 5842331344950954625}
178 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
179 | m_LocalPosition: {x: 0, y: 0.5, z: 0}
180 | m_LocalScale: {x: 1, y: 1, z: 1}
181 | m_Children: []
182 | m_Father: {fileID: 6574823444410646575}
183 | m_RootOrder: 1
184 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
185 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Player.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 28356974c7337f046a4d87eaf2777d62
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Projectile.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &7859153389591767978
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 8822721517185649292}
12 | - component: {fileID: 5147613761648901581}
13 | - component: {fileID: 1847390749998622219}
14 | - component: {fileID: 6894529365249132288}
15 | - component: {fileID: 5624069270633476096}
16 | - component: {fileID: 1261209405735380722}
17 | m_Layer: 0
18 | m_Name: Projectile
19 | m_TagString: Untagged
20 | m_Icon: {fileID: 0}
21 | m_NavMeshLayer: 0
22 | m_StaticEditorFlags: 0
23 | m_IsActive: 1
24 | --- !u!4 &8822721517185649292
25 | Transform:
26 | m_ObjectHideFlags: 0
27 | m_CorrespondingSourceObject: {fileID: 0}
28 | m_PrefabInstance: {fileID: 0}
29 | m_PrefabAsset: {fileID: 0}
30 | m_GameObject: {fileID: 7859153389591767978}
31 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
32 | m_LocalPosition: {x: 0, y: 0, z: 0}
33 | m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
34 | m_Children: []
35 | m_Father: {fileID: 0}
36 | m_RootOrder: 0
37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
38 | --- !u!33 &5147613761648901581
39 | MeshFilter:
40 | m_ObjectHideFlags: 0
41 | m_CorrespondingSourceObject: {fileID: 0}
42 | m_PrefabInstance: {fileID: 0}
43 | m_PrefabAsset: {fileID: 0}
44 | m_GameObject: {fileID: 7859153389591767978}
45 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
46 | --- !u!23 &1847390749998622219
47 | MeshRenderer:
48 | m_ObjectHideFlags: 0
49 | m_CorrespondingSourceObject: {fileID: 0}
50 | m_PrefabInstance: {fileID: 0}
51 | m_PrefabAsset: {fileID: 0}
52 | m_GameObject: {fileID: 7859153389591767978}
53 | m_Enabled: 1
54 | m_CastShadows: 1
55 | m_ReceiveShadows: 1
56 | m_DynamicOccludee: 1
57 | m_MotionVectors: 1
58 | m_LightProbeUsage: 1
59 | m_ReflectionProbeUsage: 1
60 | m_RenderingLayerMask: 1
61 | m_RendererPriority: 0
62 | m_Materials:
63 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
64 | m_StaticBatchInfo:
65 | firstSubMesh: 0
66 | subMeshCount: 0
67 | m_StaticBatchRoot: {fileID: 0}
68 | m_ProbeAnchor: {fileID: 0}
69 | m_LightProbeVolumeOverride: {fileID: 0}
70 | m_ScaleInLightmap: 1
71 | m_PreserveUVs: 0
72 | m_IgnoreNormalsForChartDetection: 0
73 | m_ImportantGI: 0
74 | m_StitchLightmapSeams: 0
75 | m_SelectedEditorRenderState: 3
76 | m_MinimumChartSize: 4
77 | m_AutoUVMaxDistance: 0.5
78 | m_AutoUVMaxAngle: 89
79 | m_LightmapParameters: {fileID: 0}
80 | m_SortingLayerID: 0
81 | m_SortingLayer: 0
82 | m_SortingOrder: 0
83 | --- !u!135 &6894529365249132288
84 | SphereCollider:
85 | m_ObjectHideFlags: 0
86 | m_CorrespondingSourceObject: {fileID: 0}
87 | m_PrefabInstance: {fileID: 0}
88 | m_PrefabAsset: {fileID: 0}
89 | m_GameObject: {fileID: 7859153389591767978}
90 | m_Material: {fileID: 0}
91 | m_IsTrigger: 0
92 | m_Enabled: 1
93 | serializedVersion: 2
94 | m_Radius: 0.5
95 | m_Center: {x: 0, y: 0, z: 0}
96 | --- !u!54 &5624069270633476096
97 | Rigidbody:
98 | m_ObjectHideFlags: 0
99 | m_CorrespondingSourceObject: {fileID: 0}
100 | m_PrefabInstance: {fileID: 0}
101 | m_PrefabAsset: {fileID: 0}
102 | m_GameObject: {fileID: 7859153389591767978}
103 | serializedVersion: 2
104 | m_Mass: 1
105 | m_Drag: 0
106 | m_AngularDrag: 0.05
107 | m_UseGravity: 1
108 | m_IsKinematic: 0
109 | m_Interpolate: 0
110 | m_Constraints: 0
111 | m_CollisionDetection: 1
112 | --- !u!114 &1261209405735380722
113 | MonoBehaviour:
114 | m_ObjectHideFlags: 0
115 | m_CorrespondingSourceObject: {fileID: 0}
116 | m_PrefabInstance: {fileID: 0}
117 | m_PrefabAsset: {fileID: 0}
118 | m_GameObject: {fileID: 7859153389591767978}
119 | m_Enabled: 1
120 | m_EditorHideFlags: 0
121 | m_Script: {fileID: 11500000, guid: b92bdea942031bb479ec374325f6f79f, type: 3}
122 | m_Name:
123 | m_EditorClassIdentifier:
124 | id: 0
125 | rigidBody: {fileID: 5624069270633476096}
126 | thrownByPlayer: 0
127 | initialForce: {x: 0, y: 0, z: 0}
128 | explosionRadius: 1.5
129 | explosionDamage: 75
130 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Prefabs/Projectile.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f08613b9a5c37044f8cb2ad66a833ea6
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 084f0ca817ec8b240be997893f6ce238
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scenes/Game.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3c480f0cfc32ace4693e3e03a67ed96e
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d22258711682f694780d96a6041c760b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Client.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae5889edfa6c79b44bc21d97c6c095d6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Constants.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Constants
6 | {
7 | public const int TICKS_PER_SEC = 30; // How many ticks per second
8 | public const float MS_PER_TICK = 1000f / TICKS_PER_SEC; // How many milliseconds per tick
9 | }
10 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Constants.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94dccfc3a4466104e851491227a4d34d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Enemy.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Enemy : MonoBehaviour
6 | {
7 | public static int maxEnemies = 10;
8 | public static Dictionary enemies = new Dictionary();
9 | private static int nextEnemyId = 1;
10 |
11 | public int id;
12 | public EnemyState state;
13 | public Player target;
14 | public CharacterController controller;
15 | public Transform shootOrigin;
16 | public float gravity = -9.81f;
17 | public float patrolSpeed = 2f;
18 | public float chaseSpeed = 8f;
19 | public float health;
20 | public float maxHealth = 100f;
21 | public float detectionRange = 30f;
22 | public float shootRange = 15f;
23 | public float shootAccuracy = 0.1f;
24 | public float patrolDuration = 3f;
25 | public float idleDuration = 1f;
26 |
27 | private bool isPatrolRoutineRunning;
28 | private float yVelocity = 0;
29 |
30 | private void Start()
31 | {
32 | id = nextEnemyId;
33 | nextEnemyId++;
34 | enemies.Add(id, this);
35 |
36 | ServerSend.SpawnEnemy(this);
37 |
38 | state = EnemyState.patrol;
39 | gravity *= Time.fixedDeltaTime * Time.fixedDeltaTime;
40 | patrolSpeed *= Time.fixedDeltaTime;
41 | chaseSpeed *= Time.fixedDeltaTime;
42 | }
43 |
44 | private void FixedUpdate()
45 | {
46 | switch (state)
47 | {
48 | case EnemyState.idle:
49 | LookForPlayer();
50 | break;
51 | case EnemyState.patrol:
52 | if (!LookForPlayer())
53 | {
54 | Patrol();
55 | }
56 | break;
57 | case EnemyState.chase:
58 | Chase();
59 | break;
60 | case EnemyState.attack:
61 | Attack();
62 | break;
63 | default:
64 | break;
65 | }
66 | }
67 |
68 | private bool LookForPlayer()
69 | {
70 | foreach (Client _client in Server.clients.Values)
71 | {
72 | if (_client.player != null)
73 | {
74 | Vector3 _enemyToPlayer = _client.player.transform.position - transform.position;
75 | if (_enemyToPlayer.magnitude <= detectionRange)
76 | {
77 | if (Physics.Raycast(shootOrigin.position, _enemyToPlayer, out RaycastHit _hit, detectionRange))
78 | {
79 | if (_hit.collider.CompareTag("Player"))
80 | {
81 | target = _hit.collider.GetComponent();
82 | if (isPatrolRoutineRunning)
83 | {
84 | isPatrolRoutineRunning = false;
85 | StopCoroutine(StartPatrol());
86 | }
87 |
88 | state = EnemyState.chase;
89 | return true;
90 | }
91 | }
92 | }
93 | }
94 | }
95 |
96 | return false;
97 | }
98 |
99 | private void Patrol()
100 | {
101 | if (!isPatrolRoutineRunning)
102 | {
103 | StartCoroutine(StartPatrol());
104 | }
105 |
106 | Move(transform.forward, patrolSpeed);
107 | }
108 |
109 | private IEnumerator StartPatrol()
110 | {
111 | isPatrolRoutineRunning = true;
112 | Vector2 _randomPatrolDirection = Random.insideUnitCircle.normalized;
113 | transform.forward = new Vector3(_randomPatrolDirection.x, 0f, _randomPatrolDirection.y);
114 |
115 | yield return new WaitForSeconds(patrolDuration);
116 |
117 | state = EnemyState.idle;
118 |
119 | yield return new WaitForSeconds(idleDuration);
120 |
121 | state = EnemyState.patrol;
122 | isPatrolRoutineRunning = false;
123 | }
124 |
125 | private void Chase()
126 | {
127 | if (CanSeeTarget())
128 | {
129 | Vector3 _enemyToPlayer = target.transform.position - transform.position;
130 |
131 | if (_enemyToPlayer.magnitude <= shootRange)
132 | {
133 | state = EnemyState.attack;
134 | }
135 | else
136 | {
137 | Move(_enemyToPlayer, chaseSpeed);
138 | }
139 | }
140 | else
141 | {
142 | target = null;
143 | state = EnemyState.patrol;
144 | }
145 | }
146 |
147 | private void Attack()
148 | {
149 | if (CanSeeTarget())
150 | {
151 | Vector3 _enemyToPlayer = target.transform.position - transform.position;
152 | transform.forward = new Vector3(_enemyToPlayer.x, 0f, _enemyToPlayer.z);
153 |
154 | if (_enemyToPlayer.magnitude <= shootRange)
155 | {
156 | Shoot(_enemyToPlayer);
157 | }
158 | else
159 | {
160 | Move(_enemyToPlayer, chaseSpeed);
161 | }
162 | }
163 | else
164 | {
165 | target = null;
166 | state = EnemyState.patrol;
167 | }
168 | }
169 |
170 | private void Move(Vector3 _direction, float _speed)
171 | {
172 | _direction.y = 0f;
173 | transform.forward = _direction;
174 | Vector3 _movement = transform.forward * _speed;
175 |
176 | if (controller.isGrounded)
177 | {
178 | yVelocity = 0f;
179 | }
180 | yVelocity += gravity;
181 |
182 | _movement.y = yVelocity;
183 | controller.Move(_movement);
184 |
185 | ServerSend.EnemyPosition(this);
186 | }
187 |
188 | private void Shoot(Vector3 _shootDirection)
189 | {
190 | if (Physics.Raycast(shootOrigin.position, _shootDirection, out RaycastHit _hit, shootRange))
191 | {
192 | if (_hit.collider.CompareTag("Player"))
193 | {
194 | if (Random.value <= shootAccuracy)
195 | {
196 | _hit.collider.GetComponent().TakeDamage(50f);
197 | }
198 | }
199 | }
200 | }
201 |
202 | public void TakeDamage(float _damage)
203 | {
204 | health -= _damage;
205 | if (health <= 0f)
206 | {
207 | health = 0f;
208 |
209 | enemies.Remove(id);
210 | Destroy(gameObject);
211 | }
212 |
213 | ServerSend.EnemyHealth(this);
214 | }
215 |
216 | private bool CanSeeTarget()
217 | {
218 | if (target == null)
219 | {
220 | return false;
221 | }
222 |
223 | if (Physics.Raycast(shootOrigin.position, target.transform.position - transform.position, out RaycastHit _hit, detectionRange))
224 | {
225 | if (_hit.collider.CompareTag("Player"))
226 | {
227 | return true;
228 | }
229 | }
230 |
231 | return false;
232 | }
233 | }
234 |
235 | public enum EnemyState
236 | {
237 | idle,
238 | patrol,
239 | chase,
240 | attack
241 | }
242 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Enemy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: acb6dd31ae39a294f99cb34bb1d3217e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/EnemySpawner.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class EnemySpawner : MonoBehaviour
6 | {
7 | public float frequency = 3f;
8 |
9 | private void Start()
10 | {
11 | StartCoroutine(SpawnEnemy());
12 | }
13 |
14 | private IEnumerator SpawnEnemy()
15 | {
16 | yield return new WaitForSeconds(frequency);
17 |
18 | if (Enemy.enemies.Count < Enemy.maxEnemies)
19 | {
20 | NetworkManager.instance.InstantiateEnemy(transform.position);
21 | }
22 | StartCoroutine(SpawnEnemy());
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/EnemySpawner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aace1cb2e0ba9ae45b89cbf4f3d3e5f7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ItemSpawner.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ItemSpawner : MonoBehaviour
6 | {
7 | public static Dictionary spawners = new Dictionary();
8 | private static int nextSpawnerId = 1;
9 |
10 | public int spawnerId;
11 | public bool hasItem = false;
12 |
13 | private void Start()
14 | {
15 | hasItem = false;
16 | spawnerId = nextSpawnerId;
17 | nextSpawnerId++;
18 | spawners.Add(spawnerId, this);
19 |
20 | StartCoroutine(SpawnItem());
21 | }
22 |
23 | private void OnTriggerEnter(Collider other)
24 | {
25 | if (hasItem && other.CompareTag("Player"))
26 | {
27 | Player _player = other.GetComponent();
28 | if (_player.AttemptPickupItem())
29 | {
30 | ItemPickedUp(_player.id);
31 | }
32 | }
33 | }
34 |
35 | private IEnumerator SpawnItem()
36 | {
37 | yield return new WaitForSeconds(10f);
38 |
39 | hasItem = true;
40 | ServerSend.ItemSpawned(spawnerId);
41 | }
42 |
43 | private void ItemPickedUp(int _byPlayer)
44 | {
45 | hasItem = false;
46 | ServerSend.ItemPickedUp(spawnerId, _byPlayer);
47 |
48 | StartCoroutine(SpawnItem());
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ItemSpawner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7eb4dee8120f6594f8670ff1705ff30e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/NetworkManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class NetworkManager : MonoBehaviour
6 | {
7 | public static NetworkManager instance;
8 |
9 | public GameObject playerPrefab;
10 | public GameObject enemyPrefab;
11 | public GameObject projectilePrefab;
12 |
13 | private void Awake()
14 | {
15 | if (instance == null)
16 | {
17 | instance = this;
18 | }
19 | else if (instance != this)
20 | {
21 | Debug.Log("Instance already exists, destroying object!");
22 | Destroy(this);
23 | }
24 | }
25 |
26 | private void Start()
27 | {
28 | QualitySettings.vSyncCount = 0;
29 | Application.targetFrameRate = 30;
30 |
31 | Server.Start(50, 26950);
32 | }
33 |
34 | private void OnApplicationQuit()
35 | {
36 | Server.Stop();
37 | }
38 |
39 | public Player InstantiatePlayer()
40 | {
41 | return Instantiate(playerPrefab, new Vector3(0f, 0.5f, 0f), Quaternion.identity).GetComponent();
42 | }
43 |
44 | public void InstantiateEnemy(Vector3 _position)
45 | {
46 | Instantiate(enemyPrefab, _position, Quaternion.identity);
47 | }
48 |
49 | public Projectile InstantiateProjectile(Transform _shootOrigin)
50 | {
51 | return Instantiate(projectilePrefab, _shootOrigin.position + _shootOrigin.forward * 0.7f, Quaternion.identity).GetComponent();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/NetworkManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4693e9532c2c5c8438cf1b69f92ef2fc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Packet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec3427c8daef48b40afa30470a806258
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Player.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Player : MonoBehaviour
6 | {
7 | public int id;
8 | public string username;
9 | public CharacterController controller;
10 | public Transform shootOrigin;
11 | public float gravity = -9.81f;
12 | public float moveSpeed = 5f;
13 | public float jumpSpeed = 5f;
14 | public float throwForce = 600f;
15 | public float health;
16 | public float maxHealth = 100f;
17 | public int itemAmount = 0;
18 | public int maxItemAmount = 3;
19 |
20 | private bool[] inputs;
21 | private float yVelocity = 0;
22 |
23 | private void Start()
24 | {
25 | gravity *= Time.fixedDeltaTime * Time.fixedDeltaTime;
26 | moveSpeed *= Time.fixedDeltaTime;
27 | jumpSpeed *= Time.fixedDeltaTime;
28 | }
29 |
30 | public void Initialize(int _id, string _username)
31 | {
32 | id = _id;
33 | username = _username;
34 | health = maxHealth;
35 |
36 | inputs = new bool[5];
37 | }
38 |
39 | /// Processes player input and moves the player.
40 | public void FixedUpdate()
41 | {
42 | if (health <= 0f)
43 | {
44 | return;
45 | }
46 |
47 | Vector2 _inputDirection = Vector2.zero;
48 | if (inputs[0])
49 | {
50 | _inputDirection.y += 1;
51 | }
52 | if (inputs[1])
53 | {
54 | _inputDirection.y -= 1;
55 | }
56 | if (inputs[2])
57 | {
58 | _inputDirection.x -= 1;
59 | }
60 | if (inputs[3])
61 | {
62 | _inputDirection.x += 1;
63 | }
64 |
65 | Move(_inputDirection);
66 | }
67 |
68 | /// Calculates the player's desired movement direction and moves him.
69 | ///
70 | private void Move(Vector2 _inputDirection)
71 | {
72 | Vector3 _moveDirection = transform.right * _inputDirection.x + transform.forward * _inputDirection.y;
73 | _moveDirection *= moveSpeed;
74 |
75 | if (controller.isGrounded)
76 | {
77 | yVelocity = 0f;
78 | if (inputs[4])
79 | {
80 | yVelocity = jumpSpeed;
81 | }
82 | }
83 | yVelocity += gravity;
84 |
85 | _moveDirection.y = yVelocity;
86 | controller.Move(_moveDirection);
87 |
88 | ServerSend.PlayerPosition(this);
89 | ServerSend.PlayerRotation(this);
90 | }
91 |
92 | /// Updates the player input with newly received input.
93 | /// The new key inputs.
94 | /// The new rotation.
95 | public void SetInput(bool[] _inputs, Quaternion _rotation)
96 | {
97 | inputs = _inputs;
98 | transform.rotation = _rotation;
99 | }
100 |
101 | public void Shoot(Vector3 _viewDirection)
102 | {
103 | if (health <= 0f)
104 | {
105 | return;
106 | }
107 |
108 | if (Physics.Raycast(shootOrigin.position, _viewDirection, out RaycastHit _hit, 25f))
109 | {
110 | if (_hit.collider.CompareTag("Player"))
111 | {
112 | _hit.collider.GetComponent().TakeDamage(50f);
113 | }
114 | else if (_hit.collider.CompareTag("Enemy"))
115 | {
116 | _hit.collider.GetComponent().TakeDamage(50f);
117 | }
118 | }
119 | }
120 |
121 | public void ThrowItem(Vector3 _viewDirection)
122 | {
123 | if (health <= 0f)
124 | {
125 | return;
126 | }
127 |
128 | if (itemAmount > 0)
129 | {
130 | itemAmount--;
131 | NetworkManager.instance.InstantiateProjectile(shootOrigin).Initialize(_viewDirection, throwForce, id);
132 | }
133 | }
134 |
135 | public void TakeDamage(float _damage)
136 | {
137 | if (health <= 0f)
138 | {
139 | return;
140 | }
141 |
142 | health -= _damage;
143 | if (health <= 0f)
144 | {
145 | health = 0f;
146 | controller.enabled = false;
147 | transform.position = new Vector3(0f, 25f, 0f);
148 | ServerSend.PlayerPosition(this);
149 | StartCoroutine(Respawn());
150 | }
151 |
152 | ServerSend.PlayerHealth(this);
153 | }
154 |
155 | private IEnumerator Respawn()
156 | {
157 | yield return new WaitForSeconds(5f);
158 |
159 | health = maxHealth;
160 | controller.enabled = true;
161 | ServerSend.PlayerRespawned(this);
162 | }
163 |
164 | public bool AttemptPickupItem()
165 | {
166 | if (itemAmount >= maxItemAmount)
167 | {
168 | return false;
169 | }
170 |
171 | itemAmount++;
172 | return true;
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Player.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10a3aab0770abde4b94f5c2dbbb4ec43
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Projectile.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class Projectile : MonoBehaviour
6 | {
7 | public static Dictionary projectiles = new Dictionary();
8 | private static int nextProjectileId = 1;
9 |
10 | public int id;
11 | public Rigidbody rigidBody;
12 | public int thrownByPlayer;
13 | public Vector3 initialForce;
14 | public float explosionRadius = 1.5f;
15 | public float explosionDamage = 75f;
16 |
17 | private void Start()
18 | {
19 | id = nextProjectileId;
20 | nextProjectileId++;
21 | projectiles.Add(id, this);
22 |
23 | ServerSend.SpawnProjectile(this, thrownByPlayer);
24 |
25 | rigidBody.AddForce(initialForce);
26 | StartCoroutine(ExplodeAfterTime());
27 | }
28 |
29 | private void FixedUpdate()
30 | {
31 | ServerSend.ProjectilePosition(this);
32 | }
33 |
34 | private void OnCollisionEnter(Collision collision)
35 | {
36 | Explode();
37 | }
38 |
39 | public void Initialize(Vector3 _initialMovementDirection, float _initialForceStrength, int _thrownByPlayer)
40 | {
41 | initialForce = _initialMovementDirection * _initialForceStrength;
42 | thrownByPlayer = _thrownByPlayer;
43 | }
44 |
45 | private void Explode()
46 | {
47 | ServerSend.ProjectileExploded(this);
48 |
49 | Collider[] _colliders = Physics.OverlapSphere(transform.position, explosionRadius);
50 | foreach (Collider _collider in _colliders)
51 | {
52 | if (_collider.CompareTag("Player"))
53 | {
54 | _collider.GetComponent().TakeDamage(explosionDamage);
55 | }
56 | else if (_collider.CompareTag("Enemy"))
57 | {
58 | _collider.GetComponent().TakeDamage(explosionDamage);
59 | }
60 | }
61 |
62 | projectiles.Remove(id);
63 | Destroy(gameObject);
64 | }
65 |
66 | private IEnumerator ExplodeAfterTime()
67 | {
68 | yield return new WaitForSeconds(10f);
69 |
70 | Explode();
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Projectile.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b92bdea942031bb479ec374325f6f79f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Server.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Net;
5 | using System.Net.Sockets;
6 | using UnityEngine;
7 |
8 | public class Server
9 | {
10 | public static int MaxPlayers { get; private set; }
11 | public static int Port { get; private set; }
12 | public static Dictionary clients = new Dictionary();
13 | public delegate void PacketHandler(int _fromClient, Packet _packet);
14 | public static Dictionary packetHandlers;
15 |
16 | private static TcpListener tcpListener;
17 | private static UdpClient udpListener;
18 |
19 | /// Starts the server.
20 | /// The maximum players that can be connected simultaneously.
21 | /// The port to start the server on.
22 | public static void Start(int _maxPlayers, int _port)
23 | {
24 | MaxPlayers = _maxPlayers;
25 | Port = _port;
26 |
27 | Debug.Log("Starting server...");
28 | InitializeServerData();
29 |
30 | tcpListener = new TcpListener(IPAddress.Any, Port);
31 | tcpListener.Start();
32 | tcpListener.BeginAcceptTcpClient(TCPConnectCallback, null);
33 |
34 | udpListener = new UdpClient(Port);
35 | udpListener.BeginReceive(UDPReceiveCallback, null);
36 |
37 | Debug.Log($"Server started on port {Port}.");
38 | }
39 |
40 | /// Handles new TCP connections.
41 | private static void TCPConnectCallback(IAsyncResult _result)
42 | {
43 | TcpClient _client = tcpListener.EndAcceptTcpClient(_result);
44 | tcpListener.BeginAcceptTcpClient(TCPConnectCallback, null);
45 | Debug.Log($"Incoming connection from {_client.Client.RemoteEndPoint}...");
46 |
47 | for (int i = 1; i <= MaxPlayers; i++)
48 | {
49 | if (clients[i].tcp.socket == null)
50 | {
51 | clients[i].tcp.Connect(_client);
52 | return;
53 | }
54 | }
55 |
56 | Debug.Log($"{_client.Client.RemoteEndPoint} failed to connect: Server full!");
57 | }
58 |
59 | /// Receives incoming UDP data.
60 | private static void UDPReceiveCallback(IAsyncResult _result)
61 | {
62 | try
63 | {
64 | IPEndPoint _clientEndPoint = new IPEndPoint(IPAddress.Any, 0);
65 | byte[] _data = udpListener.EndReceive(_result, ref _clientEndPoint);
66 | udpListener.BeginReceive(UDPReceiveCallback, null);
67 |
68 | if (_data.Length < 4)
69 | {
70 | return;
71 | }
72 |
73 | using (Packet _packet = new Packet(_data))
74 | {
75 | int _clientId = _packet.ReadInt();
76 |
77 | if (_clientId == 0)
78 | {
79 | return;
80 | }
81 |
82 | if (clients[_clientId].udp.endPoint == null)
83 | {
84 | // If this is a new connection
85 | clients[_clientId].udp.Connect(_clientEndPoint);
86 | return;
87 | }
88 |
89 | if (clients[_clientId].udp.endPoint.ToString() == _clientEndPoint.ToString())
90 | {
91 | // Ensures that the client is not being impersonated by another by sending a false clientID
92 | clients[_clientId].udp.HandleData(_packet);
93 | }
94 | }
95 | }
96 | catch (Exception _ex)
97 | {
98 | Debug.Log($"Error receiving UDP data: {_ex}");
99 | }
100 | }
101 |
102 | /// Sends a packet to the specified endpoint via UDP.
103 | /// The endpoint to send the packet to.
104 | /// The packet to send.
105 | public static void SendUDPData(IPEndPoint _clientEndPoint, Packet _packet)
106 | {
107 | try
108 | {
109 | if (_clientEndPoint != null)
110 | {
111 | udpListener.BeginSend(_packet.ToArray(), _packet.Length(), _clientEndPoint, null, null);
112 | }
113 | }
114 | catch (Exception _ex)
115 | {
116 | Debug.Log($"Error sending data to {_clientEndPoint} via UDP: {_ex}");
117 | }
118 | }
119 |
120 | /// Initializes all necessary server data.
121 | private static void InitializeServerData()
122 | {
123 | for (int i = 1; i <= MaxPlayers; i++)
124 | {
125 | clients.Add(i, new Client(i));
126 | }
127 |
128 | packetHandlers = new Dictionary()
129 | {
130 | { (int)ClientPackets.welcomeReceived, ServerHandle.WelcomeReceived },
131 | { (int)ClientPackets.playerMovement, ServerHandle.PlayerMovement },
132 | { (int)ClientPackets.playerShoot, ServerHandle.PlayerShoot },
133 | { (int)ClientPackets.playerThrowItem, ServerHandle.PlayerThrowItem }
134 | };
135 | Debug.Log("Initialized packets.");
136 | }
137 |
138 | public static void Stop()
139 | {
140 | tcpListener.Stop();
141 | udpListener.Close();
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/Server.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 07be6e9e23eb44340b93c2281ce2c60c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ServerHandle.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class ServerHandle
6 | {
7 | public static void WelcomeReceived(int _fromClient, Packet _packet)
8 | {
9 | int _clientIdCheck = _packet.ReadInt();
10 | string _username = _packet.ReadString();
11 |
12 | Debug.Log($"{Server.clients[_fromClient].tcp.socket.Client.RemoteEndPoint} connected successfully and is now player {_fromClient}.");
13 | if (_fromClient != _clientIdCheck)
14 | {
15 | Debug.Log($"Player \"{_username}\" (ID: {_fromClient}) has assumed the wrong client ID ({_clientIdCheck})!");
16 | }
17 | Server.clients[_fromClient].SendIntoGame(_username);
18 | }
19 |
20 | public static void PlayerMovement(int _fromClient, Packet _packet)
21 | {
22 | bool[] _inputs = new bool[_packet.ReadInt()];
23 | for (int i = 0; i < _inputs.Length; i++)
24 | {
25 | _inputs[i] = _packet.ReadBool();
26 | }
27 | Quaternion _rotation = _packet.ReadQuaternion();
28 |
29 | Server.clients[_fromClient].player.SetInput(_inputs, _rotation);
30 | }
31 |
32 | public static void PlayerShoot(int _fromClient, Packet _packet)
33 | {
34 | Vector3 _shootDirection = _packet.ReadVector3();
35 |
36 | Server.clients[_fromClient].player.Shoot(_shootDirection);
37 | }
38 |
39 | public static void PlayerThrowItem(int _fromClient, Packet _packet)
40 | {
41 | Vector3 _throwDirection = _packet.ReadVector3();
42 |
43 | Server.clients[_fromClient].player.ThrowItem(_throwDirection);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ServerHandle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f460961833a4ec94cbc291c4f8cb416e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ServerSend.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64f9b696fe0958540af3f423ef2f9ed2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ThreadManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | public class ThreadManager : MonoBehaviour
7 | {
8 | private static readonly List executeOnMainThread = new List();
9 | private static readonly List executeCopiedOnMainThread = new List();
10 | private static bool actionToExecuteOnMainThread = false;
11 |
12 | private void FixedUpdate()
13 | {
14 | UpdateMain();
15 | }
16 |
17 | /// Sets an action to be executed on the main thread.
18 | /// The action to be executed on the main thread.
19 | public static void ExecuteOnMainThread(Action _action)
20 | {
21 | if (_action == null)
22 | {
23 | Console.WriteLine("No action to execute on main thread!");
24 | return;
25 | }
26 |
27 | lock (executeOnMainThread)
28 | {
29 | executeOnMainThread.Add(_action);
30 | actionToExecuteOnMainThread = true;
31 | }
32 | }
33 |
34 | /// Executes all code meant to run on the main thread. NOTE: Call this ONLY from the main thread.
35 | public static void UpdateMain()
36 | {
37 | if (actionToExecuteOnMainThread)
38 | {
39 | executeCopiedOnMainThread.Clear();
40 | lock (executeOnMainThread)
41 | {
42 | executeCopiedOnMainThread.AddRange(executeOnMainThread);
43 | executeOnMainThread.Clear();
44 | actionToExecuteOnMainThread = false;
45 | }
46 |
47 | for (int i = 0; i < executeCopiedOnMainThread.Count; i++)
48 | {
49 | executeCopiedOnMainThread[i]();
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/UnityGameServer/Assets/Scripts/ThreadManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8005a96840a16bf459c9596f0324a5f4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/UnityGameServer/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ads": "2.0.8",
4 | "com.unity.analytics": "3.2.2",
5 | "com.unity.collab-proxy": "1.2.15",
6 | "com.unity.package-manager-ui": "2.0.3",
7 | "com.unity.purchasing": "2.0.3",
8 | "com.unity.textmeshpro": "1.3.0",
9 | "com.unity.modules.ai": "1.0.0",
10 | "com.unity.modules.animation": "1.0.0",
11 | "com.unity.modules.assetbundle": "1.0.0",
12 | "com.unity.modules.audio": "1.0.0",
13 | "com.unity.modules.cloth": "1.0.0",
14 | "com.unity.modules.director": "1.0.0",
15 | "com.unity.modules.imageconversion": "1.0.0",
16 | "com.unity.modules.imgui": "1.0.0",
17 | "com.unity.modules.jsonserialize": "1.0.0",
18 | "com.unity.modules.particlesystem": "1.0.0",
19 | "com.unity.modules.physics": "1.0.0",
20 | "com.unity.modules.physics2d": "1.0.0",
21 | "com.unity.modules.screencapture": "1.0.0",
22 | "com.unity.modules.terrain": "1.0.0",
23 | "com.unity.modules.terrainphysics": "1.0.0",
24 | "com.unity.modules.tilemap": "1.0.0",
25 | "com.unity.modules.ui": "1.0.0",
26 | "com.unity.modules.uielements": "1.0.0",
27 | "com.unity.modules.umbra": "1.0.0",
28 | "com.unity.modules.unityanalytics": "1.0.0",
29 | "com.unity.modules.unitywebrequest": "1.0.0",
30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
31 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
32 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
33 | "com.unity.modules.unitywebrequestwww": "1.0.0",
34 | "com.unity.modules.vehicles": "1.0.0",
35 | "com.unity.modules.video": "1.0.0",
36 | "com.unity.modules.vr": "1.0.0",
37 | "com.unity.modules.wind": "1.0.0",
38 | "com.unity.modules.xr": "1.0.0"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UnityGameServer/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: 1024
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/UnityGameServer/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 |
--------------------------------------------------------------------------------
/UnityGameServer/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: 8
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: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 |
--------------------------------------------------------------------------------
/UnityGameServer/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/Game.unity
10 | guid: 3c480f0cfc32ace4693e3e03a67ed96e
11 | m_configObjects: {}
12 |
--------------------------------------------------------------------------------
/UnityGameServer/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: 7
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_SpritePackerMode: 0
12 | m_SpritePackerPaddingPower: 1
13 | m_EtcTextureCompressorBehavior: 1
14 | m_EtcTextureFastCompressor: 1
15 | m_EtcTextureNormalCompressor: 2
16 | m_EtcTextureBestCompressor: 4
17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
18 | m_ProjectGenerationRootNamespace:
19 | m_UserGeneratedProjectSuffix:
20 | m_CollabEditorSettings:
21 | inProgressEnabled: 1
22 |
--------------------------------------------------------------------------------
/UnityGameServer/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 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
41 | m_PreloadedShaders: []
42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
43 | type: 0}
44 | m_CustomRenderPipeline: {fileID: 0}
45 | m_TransparencySortMode: 0
46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
47 | m_DefaultRenderingPath: 1
48 | m_DefaultMobileRenderingPath: 1
49 | m_TierSettings: []
50 | m_LightmapStripping: 0
51 | m_FogStripping: 0
52 | m_InstancingStripping: 0
53 | m_LightmapKeepPlain: 1
54 | m_LightmapKeepDirCombined: 1
55 | m_LightmapKeepDynamicPlain: 1
56 | m_LightmapKeepDynamicDirCombined: 1
57 | m_LightmapKeepShadowMask: 1
58 | m_LightmapKeepSubtractive: 1
59 | m_FogKeepLinear: 1
60 | m_FogKeepExp: 1
61 | m_FogKeepExp2: 1
62 | m_AlbedoSwatchInfos: []
63 | m_LightsUseLinearIntensity: 0
64 | m_LightsUseColorTemperature: 0
65 |
--------------------------------------------------------------------------------
/UnityGameServer/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 |
--------------------------------------------------------------------------------
/UnityGameServer/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 |
--------------------------------------------------------------------------------
/UnityGameServer/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 |
--------------------------------------------------------------------------------
/UnityGameServer/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: 4
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_ReuseCollisionCallbacks: 1
28 | m_AutoSyncTransforms: 0
29 | m_AlwaysShowColliders: 0
30 | m_ShowColliderSleep: 1
31 | m_ShowColliderContacts: 0
32 | m_ShowColliderAABB: 0
33 | m_ContactArrowScale: 0.2
34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
39 |
--------------------------------------------------------------------------------
/UnityGameServer/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 | - type:
8 | m_NativeTypeID: 108
9 | m_ManagedTypePPtr: {fileID: 0}
10 | m_ManagedTypeFallback:
11 | defaultPresets:
12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea,
13 | type: 2}
14 | - type:
15 | m_NativeTypeID: 1020
16 | m_ManagedTypePPtr: {fileID: 0}
17 | m_ManagedTypeFallback:
18 | defaultPresets:
19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6,
20 | type: 2}
21 | - type:
22 | m_NativeTypeID: 1006
23 | m_ManagedTypePPtr: {fileID: 0}
24 | m_ManagedTypeFallback:
25 | defaultPresets:
26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9,
27 | type: 2}
28 |
--------------------------------------------------------------------------------
/UnityGameServer/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.3.7f1
2 |
--------------------------------------------------------------------------------
/UnityGameServer/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: 4
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: 16
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: 16
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: 16
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: 2
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: 16
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: 40
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: 1
136 | antiAliasing: 4
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: 16
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: 1
164 | antiAliasing: 4
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: 16
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSP2: 2
183 | Standalone: 5
184 | Tizen: 2
185 | WebGL: 3
186 | WiiU: 5
187 | Windows Store Apps: 5
188 | XboxOne: 5
189 | iPhone: 2
190 | tvOS: 2
191 |
--------------------------------------------------------------------------------
/UnityGameServer/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 | - Enemy
8 | layers:
9 | - Default
10 | - TransparentFX
11 | - Ignore Raycast
12 | -
13 | - Water
14 | - UI
15 | -
16 | -
17 | - PostProcessing
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | -
41 | m_SortingLayers:
42 | - name: Default
43 | uniqueID: 0
44 | locked: 0
45 |
--------------------------------------------------------------------------------
/UnityGameServer/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.033333
7 | Maximum Allowed Timestep: 0.1
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.033333
10 |
--------------------------------------------------------------------------------
/UnityGameServer/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 1
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
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 |
--------------------------------------------------------------------------------
/UnityGameServer/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_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------