V3.0 追加控制模式,改进代码
追加控制模式,实现鼠标在地图中的坐标映射 追加控制UI Todo: 游戏流程修改 游戏State对应修改
This commit is contained in:
parent
71f2687422
commit
ff094aaba5
@ -2,19 +2,22 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: prototype_512x512_brown
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@ -55,23 +58,24 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlend: 10
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _Mode: 2
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlend: 5
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
|
@ -0,0 +1,86 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: prototype_512x512_brown_Preview
|
||||
m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 3c227d230cca14c42822692b6aff3459, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 2
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 5
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.5529412}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a178b36b47a10a8469f084f0c5704530
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1
Assets/ML-Agents/Timers/Play_timers.json
Normal file
1
Assets/ML-Agents/Timers/Play_timers.json
Normal file
@ -0,0 +1 @@
|
||||
{"count":1,"self":125.68559359999999,"total":127.0390736,"children":{"InitializeActuators":{"count":2,"self":0.0010002,"total":0.0010002,"children":null},"InitializeSensors":{"count":2,"self":0.0005021,"total":0.0005021,"children":null},"AgentSendState":{"count":6113,"self":0.027592799999999997,"total":0.23222669999999998,"children":{"CollectObservations":{"count":6113,"self":0.1815569,"total":0.1815569,"children":null},"WriteActionMask":{"count":6113,"self":0.008039,"total":0.008039,"children":null},"RequestDecision":{"count":6113,"self":0.015038,"total":0.015038,"children":null}}},"DecideAction":{"count":6113,"self":0.028539099999999998,"total":0.028539099999999998,"children":null},"AgentAct":{"count":6113,"self":1.0907158,"total":1.0907158,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":4,"max":-3383.484,"min":-8498.57,"runningAverage":-4832.122,"value":-3835.63672,"weightedAverage":-5697.07031}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1681045338","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId fa309b90-d6ce-11ed-9045-4dbcec259de8 -accessToken fwCnFBjbqXUmAHgSbjU61dMBi2ynquSahIP-il_N8Nw00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Play","end_time_seconds":"1681045465"}}
|
7
Assets/ML-Agents/Timers/Play_timers.json.meta
Normal file
7
Assets/ML-Agents/Timers/Play_timers.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f05e157ae6dfad438bef962c912869f
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1
Assets/ML-Agents/Timers/StartScene_timers.json
Normal file
1
Assets/ML-Agents/Timers/StartScene_timers.json
Normal file
@ -0,0 +1 @@
|
||||
{"count":1,"self":781.18722559999992,"total":781.5040601,"children":{"InitializeActuators":{"count":16,"self":0.0004999,"total":0.0004999,"children":null},"InitializeSensors":{"count":16,"self":0.0015036,"total":0.0015036,"children":null},"AgentSendState":{"count":203,"self":0.0030017999999999998,"total":0.035560999999999995,"children":{"CollectObservations":{"count":1624,"self":0.028057099999999998,"total":0.028057099999999998,"children":null},"WriteActionMask":{"count":1624,"self":0.0010004,"total":0.0010004,"children":null},"RequestDecision":{"count":1624,"self":0.0035017,"total":0.0035017,"children":null}}},"DecideAction":{"count":203,"self":0.0039965999999999995,"total":0.0039965999999999995,"children":null},"AgentAct":{"count":203,"self":0.2752849,"total":0.2752849,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1678392064","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 520c86b0-bde0-11ed-9810-875c245949c8 -accessToken RVRz317WzCTfJi27pE1v_cAB6-5cBf5A74kzAcPhIY400ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"StartScene","end_time_seconds":"1678392845"}}
|
7
Assets/ML-Agents/Timers/StartScene_timers.json.meta
Normal file
7
Assets/ML-Agents/Timers/StartScene_timers.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70e04424d04d9fa4783cf9668b896f2e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1
Assets/ML-Agents/Timers/Train_timers.json
Normal file
1
Assets/ML-Agents/Timers/Train_timers.json
Normal file
@ -0,0 +1 @@
|
||||
{"count":1,"self":105.8334976,"total":115.9071355,"children":{"InitializeActuators":{"count":16,"self":0.001506,"total":0.001506,"children":null},"InitializeSensors":{"count":16,"self":0.0005,"total":0.0005,"children":null},"AgentSendState":{"count":5532,"self":0.0751334,"total":0.9096873,"children":{"CollectObservations":{"count":44256,"self":0.7708767,"total":0.7708767,"children":null},"WriteActionMask":{"count":44256,"self":0.0115488,"total":0.0115488,"children":null},"RequestDecision":{"count":44256,"self":0.0521284,"total":0.0521284,"children":null}}},"DecideAction":{"count":5532,"self":0.1003589,"total":0.1003589,"children":null},"AgentAct":{"count":5532,"self":9.0610888,"total":9.0610885,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":24,"max":-1334.344,"min":-4660.173,"runningAverage":-3296.991,"value":-2130.93115,"weightedAverage":-3015.34155}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1678968472","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 95c208a0-c3e2-11ed-ba33-cd85ab7492d7 -accessToken dEnaZTAbgRFb4hDzujLqu0W0lsAmE9CjVl0K2HZzSFQ00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Train","end_time_seconds":"1678968588"}}
|
7
Assets/ML-Agents/Timers/Train_timers.json.meta
Normal file
7
Assets/ML-Agents/Timers/Train_timers.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae87e62e4be78fe42ace9a215c6df898
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Prefeb/MousePreview.meta
Normal file
8
Assets/Prefeb/MousePreview.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d977dfc99258e33479c3f56fb82d58ce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
397
Assets/Prefeb/MousePreview/Enemy-Preview.prefab
Normal file
397
Assets/Prefeb/MousePreview/Enemy-Preview.prefab
Normal file
@ -0,0 +1,397 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &389133021
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 389133022}
|
||||
- component: {fileID: 389133026}
|
||||
- component: {fileID: 389133025}
|
||||
- component: {fileID: 389133024}
|
||||
- component: {fileID: 3595646475546117520}
|
||||
m_Layer: 5
|
||||
m_Name: HPBar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &389133022
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 389133021}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1209469037}
|
||||
m_Father: {fileID: 8240453774489061358}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 1.3}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &389133026
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 389133021}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &389133025
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 389133021}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 1
|
||||
--- !u!114 &389133024
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 389133021}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &3595646475546117520
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 389133021}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 925561829acf6c94097de75bf186b561, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &535890556
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 535890557}
|
||||
- component: {fileID: 535890559}
|
||||
- component: {fileID: 535890558}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &535890557
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 535890556}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1209469037}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1, y: 0.22}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &535890559
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 535890556}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &535890558
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 535890556}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 6e45334af48d8be41bc466a250835d44, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &1209469036
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1209469037}
|
||||
- component: {fileID: 1209469039}
|
||||
- component: {fileID: 1209469038}
|
||||
m_Layer: 5
|
||||
m_Name: BG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1209469037
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1209469036}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 535890557}
|
||||
m_Father: {fileID: 389133022}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1, y: 0.22}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1209469039
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1209469036}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1209469038
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1209469036}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &8240453774489061354
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8240453774489061358}
|
||||
- component: {fileID: 8240453774489061359}
|
||||
- component: {fileID: 8240453774489061356}
|
||||
- component: {fileID: 8240453774489061357}
|
||||
- component: {fileID: 8240453774489061329}
|
||||
- component: {fileID: 1083433161029782277}
|
||||
m_Layer: 0
|
||||
m_Name: Enemy-Preview
|
||||
m_TagString: Enemy
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8240453774489061358
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 5, y: 1, z: -2}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 389133022}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &8240453774489061359
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &8240453774489061356
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a178b36b47a10a8469f084f0c5704530, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!136 &8240453774489061357
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 0
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8240453774489061329
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8cded1019e262a04e8d9ccb536d1ff20, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
b: {fileID: 0}
|
||||
--- !u!114 &1083433161029782277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8240453774489061354}
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b25389b3cd1e7084d81fa752823ef210, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isDead: 0
|
||||
MaxHP: 100
|
7
Assets/Prefeb/MousePreview/Enemy-Preview.prefab.meta
Normal file
7
Assets/Prefeb/MousePreview/Enemy-Preview.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ab54e9b526726747877884a6f39c8ef
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
144
Assets/Prefeb/SelectEffect.prefab
Normal file
144
Assets/Prefeb/SelectEffect.prefab
Normal file
@ -0,0 +1,144 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &395223127228427279
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6088153073699997735}
|
||||
- component: {fileID: 3883336356577164080}
|
||||
- component: {fileID: 5931586663366854329}
|
||||
- component: {fileID: 3319472584262705651}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6088153073699997735
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 395223127228427279}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6561472780860268577}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3883336356577164080
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 395223127228427279}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &5931586663366854329
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 395223127228427279}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &3319472584262705651
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 395223127228427279}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6561472780860268583
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6561472780860268577}
|
||||
- component: {fileID: 6561472780860268582}
|
||||
m_Layer: 0
|
||||
m_Name: SelectEffect
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6561472780860268577
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6561472780860268583}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6088153073699997735}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6561472780860268582
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6561472780860268583}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 42a602efe0639c144907a166e7e59a79, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
7
Assets/Prefeb/SelectEffect.prefab.meta
Normal file
7
Assets/Prefeb/SelectEffect.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66420aca630480743a18632a2ac888e9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
20289
Assets/Scenes/Play.unity
Normal file
20289
Assets/Scenes/Play.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/Play.unity.meta
Normal file
7
Assets/Scenes/Play.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bb967f323b0e974384a9545832754ed
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1600
Assets/Scenes/StartScene.unity
Normal file
1600
Assets/Scenes/StartScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/StartScene.unity.meta
Normal file
7
Assets/Scenes/StartScene.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4260567fdad382b45aff2dfe6afb2dd8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -596,6 +596,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -607,8 +608,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -6536,8 +6537,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -12415,8 +12416,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -12958,11 +12959,11 @@ RectTransform:
|
||||
m_Father: {fileID: 55747560}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 250, y: -150}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &413189341
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -13582,11 +13583,11 @@ RectTransform:
|
||||
m_Father: {fileID: 55747560}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 250, y: -150}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: -250, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &440411431
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -14321,8 +14322,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -20930,6 +20931,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -20941,8 +20943,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -21163,8 +21165,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -22538,11 +22540,11 @@ RectTransform:
|
||||
m_Father: {fileID: 413189340}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 2, y: -0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 2, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &762190081
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -22570,7 +22572,7 @@ MonoBehaviour:
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
@ -31184,6 +31186,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -31195,8 +31198,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -33405,8 +33408,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -40195,6 +40198,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -40206,8 +40210,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -40553,8 +40557,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -42752,8 +42756,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -43806,8 +43810,8 @@ MonoBehaviour:
|
||||
group1Tag: Player
|
||||
group2Tag: Enemy
|
||||
minEnemyAreaX: 0
|
||||
attackProb: 0
|
||||
gotoProb: 1
|
||||
attackProb: 0.5
|
||||
gotoProb: 0
|
||||
defenceProb: 0
|
||||
targetState:
|
||||
- 0
|
||||
@ -44369,11 +44373,11 @@ RectTransform:
|
||||
m_Father: {fileID: 440411430}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 2, y: -0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: -2, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &1714055741
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -44401,7 +44405,7 @@ MonoBehaviour:
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
@ -44849,6 +44853,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -44860,8 +44865,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -47049,6 +47054,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -47060,8 +47066,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -52054,6 +52060,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -52065,8 +52072,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
||||
@ -57417,6 +57424,7 @@ MonoBehaviour:
|
||||
targetTimeBonusPerSec: 0.5
|
||||
areaTimeBonusPerSec: 0.2
|
||||
distanceReward: 50
|
||||
facingTargetReward: 10
|
||||
goWinRewardDefault: 999
|
||||
attackWinRewardDefault: 999
|
||||
defenceWinRewardDefault: 999
|
||||
@ -57428,8 +57436,8 @@ MonoBehaviour:
|
||||
killReward: -5
|
||||
shootWithoutReadyReward: -1.15
|
||||
killBonusReward: 0
|
||||
facingReward: 2
|
||||
shootTargetAreaReward: 5
|
||||
facingReward: 5
|
||||
shootTargetAreaReward: 10
|
||||
movePenalty: 0.1
|
||||
spinPenalty: 0.08
|
||||
mousePenalty: 0.06
|
@ -4,15 +4,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEditor;
|
||||
using Unity.MLAgents;
|
||||
using Unity.MLAgents.Sensors;
|
||||
using Unity.MLAgents.Actuators;
|
||||
using System.Linq;
|
||||
using System.Drawing;
|
||||
using Color = UnityEngine.Color;
|
||||
using static TargetController;
|
||||
|
||||
/*TODO:
|
||||
√tag 攻击排他
|
||||
@ -63,6 +58,7 @@ public class AgentWithGun : Agent
|
||||
private bool gunReadyToggle = true;
|
||||
private string myTag = "";
|
||||
private float lastEnemyFacingDistance = 0f; // record last enemy facing minimum distance
|
||||
private float lastTargetFacingDistance = 0f; // record last target facing minimum distance
|
||||
// scripts
|
||||
private RaySensors raySensors;
|
||||
private CharacterController PlayerController;
|
||||
@ -72,6 +68,7 @@ public class AgentWithGun : Agent
|
||||
private EnemyContainer eneContainer;
|
||||
private TargetController targetCon;
|
||||
private HUDController hudController;
|
||||
private StartSeneData startSceneData;
|
||||
|
||||
// observation
|
||||
float[] myObserve = new float[4];
|
||||
@ -84,8 +81,25 @@ public class AgentWithGun : Agent
|
||||
|
||||
[System.NonSerialized] public int finishedState;
|
||||
|
||||
// start scene datas
|
||||
private int gamemode;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// initialize startSceneData & datas
|
||||
// while GameObject StartSceneDataTransfer is exist
|
||||
try {
|
||||
startSceneData = GameObject.Find("StartSceneDataTransfer").GetComponent<StartSeneData>();
|
||||
gamemode = startSceneData.gamemode;
|
||||
}
|
||||
// while GameObject StartSceneDataTransfer is not exist
|
||||
catch
|
||||
{
|
||||
Debug.LogError("Run WithOut StartScreen");
|
||||
gamemode = 0;
|
||||
}
|
||||
|
||||
// initialize scripts
|
||||
paramContainer = ParameterContainerObj.GetComponent<ParameterContainer>();
|
||||
eneContainer = EnemyContainerObj.GetComponent<EnemyContainer>();
|
||||
blockContainer = SceneBlockContainerObj.GetComponent<SceneBlockContainer>();
|
||||
@ -94,25 +108,20 @@ private void Start()
|
||||
hudController = HUDObj.GetComponent<HUDController>();
|
||||
raySensors = GetComponent<RaySensors>();
|
||||
PlayerController = this.transform.GetComponent<CharacterController>();
|
||||
// Environment parameters
|
||||
|
||||
// initialize Environment parameters
|
||||
lockMouse = paramContainer.lockMouse;
|
||||
Damage = paramContainer.Damage;
|
||||
fireRate = paramContainer.fireRate;
|
||||
enemyNum = hudController.enemyNum;
|
||||
lockCameraX = paramContainer.lockCameraX;
|
||||
lockCameraY = paramContainer.lockCameraY;
|
||||
//initialize remainTime
|
||||
|
||||
// initialize remainTime
|
||||
// this agent's tag
|
||||
myTag = gameObject.tag;
|
||||
}
|
||||
|
||||
/* ----------此Update用于debug,Build前删除或注释掉!----------*/
|
||||
/*void Update()
|
||||
{
|
||||
//Debug.Log(RaySensors.rayTagResult[0]);
|
||||
}*/
|
||||
/* ----------此Update用于debug,Build前删除或注释掉!----------*/
|
||||
|
||||
// ------------动作处理--------------
|
||||
// moveAgent 用于模拟Input.GetAxis移动
|
||||
public void moveAgent(int vertical, int horizontal)
|
||||
@ -273,7 +282,7 @@ float ballistic()
|
||||
return targetCon.hitEnemyReward(gotHitObj.transform.position);
|
||||
}
|
||||
}
|
||||
if (targetCon.targetTypeInt == (int)TargetController.Targets.Attack)
|
||||
if (targetCon.targetTypeInt == (int)SceneBlockContainer.Targets.Attack)
|
||||
{
|
||||
// while if attack mode
|
||||
float targetDis = Vector3.Distance(blockContainer.thisBlock.transform.position, transform.position);
|
||||
@ -311,7 +320,7 @@ float facingReward()
|
||||
bool isFacingtoEnemy = false;
|
||||
float enemyFacingDistance = 0f;
|
||||
Ray ray = thisCam.ScreenPointToRay(new Vector3(thisCam.pixelWidth / 2, thisCam.pixelHeight / 2, 0));
|
||||
if (targetCon.targetTypeInt == (int)TargetController.Targets.Free)
|
||||
if (targetCon.targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
{
|
||||
//free mode
|
||||
RaycastHit hit;
|
||||
@ -356,20 +365,31 @@ float facingReward()
|
||||
// Debug.Log("ninimum = " + thisReward);
|
||||
}
|
||||
}
|
||||
else if(targetCon.targetTypeInt == (int)TargetController.Targets.Attack)
|
||||
else if(targetCon.targetTypeInt == (int)SceneBlockContainer.Targets.Attack)
|
||||
{
|
||||
// attack mode
|
||||
// Target to Agent distance
|
||||
float targetDis = Vector3.Distance(blockContainer.thisBlock.transform.position, transform.position);
|
||||
// center of screen between target's distance
|
||||
float camCenterToTarget = Vector3.Distance(ray.origin + (ray.direction * targetDis), blockContainer.thisBlock.transform.position);
|
||||
if(targetDis <= raySensors.viewDistance)
|
||||
{
|
||||
// Debug.DrawRay(new Vector3(0,0,0), viewPoint, Color.red);
|
||||
if (Vector3.Distance(ray.origin + (ray.direction * targetDis), blockContainer.thisBlock.transform.position) <= blockContainer.thisBlock.firebasesAreaDiameter / 2)
|
||||
// while center of screen between target's distance is lower than firebasesAreaDiameter
|
||||
// while facing to target
|
||||
if (camCenterToTarget <= blockContainer.thisBlock.firebasesAreaDiameter / 2)
|
||||
{
|
||||
// im watching target
|
||||
// Debug.DrawRay(ray.origin, viewPoint-ray.origin, Color.blue);
|
||||
|
||||
thisReward = paramContainer.facingReward;
|
||||
}else
|
||||
{
|
||||
// while not facing to target
|
||||
thisReward = (lastTargetFacingDistance - camCenterToTarget) * paramContainer.facingTargetReward;
|
||||
}
|
||||
}
|
||||
// update lastTargetFacingDistance
|
||||
lastTargetFacingDistance = camCenterToTarget;
|
||||
}
|
||||
return thisReward;
|
||||
}
|
||||
@ -426,6 +446,7 @@ public float rewardCalculate(float sceneReward,float mouseX,float movement)
|
||||
// env开始执行初始化
|
||||
public override void OnEpisodeBegin()
|
||||
{
|
||||
Debug.LogWarning("GameState|START TEST!");
|
||||
step = 0;
|
||||
if (lockMouse)
|
||||
{
|
||||
@ -468,7 +489,7 @@ public override void CollectObservations(VectorSensor sensor)
|
||||
sensor.AddObservation(targetStates);// (6) targettype, target x,y,z, firebasesAreaDiameter
|
||||
sensor.AddObservation(inAreaState); // (1)
|
||||
sensor.AddObservation(remainTime); // (1)
|
||||
sensor.AddObservation(gunReadyToggle); //(1) save gun is ready?
|
||||
sensor.AddObservation(gunReadyToggle); // (1) save gun is ready?
|
||||
sensor.AddObservation(myObserve); // (4)自机位置xyz+朝向 float[](4,1)
|
||||
if (oneHotRayTag)
|
||||
{
|
||||
@ -527,14 +548,14 @@ public override void OnActionReceived(ActionBuffers actionBuffers)
|
||||
// Win or lose Finished
|
||||
Debug.Log("Finish reward = " + thisRoundReward);
|
||||
EP += 1;
|
||||
string targetString = Enum.GetName(typeof(TargetController.Targets), targetCon.targetTypeInt);
|
||||
string targetString = Enum.GetName(typeof(SceneBlockContainer.Targets), targetCon.targetTypeInt);
|
||||
switch (finishedState)
|
||||
{
|
||||
case (int)TargetController.EndType.Win:
|
||||
Debug.LogWarning(targetString+"|Win");
|
||||
Debug.LogWarning("Result|"+targetString+"|Win");
|
||||
break;
|
||||
case (int)TargetController.EndType.Lose:
|
||||
Debug.LogWarning(targetString+"|Lose");
|
||||
Debug.LogWarning("Result|"+targetString+"|Lose");
|
||||
break;
|
||||
default:
|
||||
Debug.LogWarning("TypeError");
|
||||
|
@ -21,7 +21,7 @@ public void SendDebugStatementToPython(string logString, string stackTrace, LogT
|
||||
{
|
||||
if (type == LogType.Warning)
|
||||
{
|
||||
var stringToSend = "result|"+logString;
|
||||
var stringToSend = "Warning|" + logString;
|
||||
using (var msgOut = new OutgoingMessage())
|
||||
{
|
||||
msgOut.WriteString(stringToSend);
|
||||
|
@ -134,19 +134,19 @@ public void updateTargetType(int targetInt)
|
||||
{
|
||||
switch (targetInt)
|
||||
{
|
||||
case (int)TargetController.Targets.Go:
|
||||
case (int)SceneBlockContainer.Targets.Go:
|
||||
targetTypeText.text = "GOTO";
|
||||
targetTypeText.color = Color.blue;
|
||||
break;
|
||||
case (int)TargetController.Targets.Attack:
|
||||
case (int)SceneBlockContainer.Targets.Attack:
|
||||
targetTypeText.text = "Attack!";
|
||||
targetTypeText.color = Color.red;
|
||||
break;
|
||||
case (int)TargetController.Targets.Defence:
|
||||
case (int)SceneBlockContainer.Targets.Defence:
|
||||
targetTypeText.text = "Defence";
|
||||
targetTypeText.color = Color.green;
|
||||
break;
|
||||
case (int)TargetController.Targets.Free:
|
||||
case (int)SceneBlockContainer.Targets.Free:
|
||||
targetTypeText.text = "Free";
|
||||
targetTypeText.color = Color.yellow;
|
||||
break;
|
||||
|
@ -45,6 +45,8 @@ public class ParameterContainer : MonoBehaviour
|
||||
public float areaTimeBonusPerSec = 1.0f;
|
||||
[Tooltip("distance reward reward = r*(1-(nowDis/startDis))")]
|
||||
public float distanceReward = 20.0f;
|
||||
[Tooltip("facing to Target distance reward reward = r*(1-(nowDis/startDis))")]
|
||||
public float facingTargetReward = 20.0f;
|
||||
[Space(10)]
|
||||
[Tooltip("Goto Win reward")]
|
||||
public float goWinRewardDefault = 100.0f;
|
||||
@ -117,7 +119,7 @@ private void Start()
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (targetCon.targetTypeInt != (int)TargetController.Targets.Free)
|
||||
if (targetCon.targetTypeInt != (int)SceneBlockContainer.Targets.Free)
|
||||
{
|
||||
(agentDistance, agentInArea) = blockCont.getAgentTargetDistanceAndInside(agentObj.transform.position);
|
||||
// attack goto or defence target
|
||||
|
@ -101,8 +101,8 @@ private void singleRaycastUpdate(Ray ray,LineRenderer thisLineRenderer,rayInfoUI
|
||||
rayDisResult = thisHit.distance;
|
||||
lineLength = rayDisResult;
|
||||
rayInfoText += "\n" + Convert.ToString(rayDisResult);
|
||||
rayDisResult = rayDisResult / viewDistance; // Normalization!
|
||||
//输出log
|
||||
// rayDisResult = rayDisResult / viewDistance; // Normalization!
|
||||
// 输出log
|
||||
switch (rayTagResult)
|
||||
{
|
||||
case 1:// Wall
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
public class SceneBlockContainer : MonoBehaviour
|
||||
{
|
||||
public enum Targets { Free, Go, Attack, Defence, Num };// Num is use for get total target bumber
|
||||
public float sceneSize = 10f;
|
||||
public GameObject EnvironmentObj;
|
||||
public GameObject[] attackBlockPrefabs = new GameObject[1];
|
||||
@ -18,7 +19,7 @@ private void Start()
|
||||
{
|
||||
}
|
||||
// create block random
|
||||
public void createNewBlock(int targetType, int blockType, Vector3 blockPosition,string tag1,string tag2)
|
||||
public void createNewBlock(Targets targetType, int blockType, Vector3 blockPosition,string tag1 = "Player", string tag2 = "Enemy")
|
||||
{
|
||||
// check if thisBlock is deleted
|
||||
if (thisBlockObj != null)
|
||||
@ -30,7 +31,7 @@ public void createNewBlock(int targetType, int blockType, Vector3 blockPosition,
|
||||
// choose target type
|
||||
switch (targetType)
|
||||
{
|
||||
case (int)TargetController.Targets.Go:
|
||||
case Targets.Go:
|
||||
// goto
|
||||
thisBlockObj = Instantiate(goBlockPrefabs[blockType], blockPosition + EnvironmentObj.transform.position, Quaternion.identity, transform);
|
||||
thisBlock = thisBlockObj.GetComponent<SceneBlock>();
|
||||
@ -38,7 +39,7 @@ public void createNewBlock(int targetType, int blockType, Vector3 blockPosition,
|
||||
thisBlock.group2Tag = tag2;
|
||||
sceneSize = thisBlock.blockSize;
|
||||
break;
|
||||
case (int)TargetController.Targets.Attack:
|
||||
case Targets.Attack:
|
||||
// attack
|
||||
thisBlockObj = Instantiate(attackBlockPrefabs[blockType], blockPosition+ EnvironmentObj.transform.position, Quaternion.identity, transform);
|
||||
thisBlock = thisBlockObj.GetComponent<SceneBlock>();
|
||||
@ -46,7 +47,7 @@ public void createNewBlock(int targetType, int blockType, Vector3 blockPosition,
|
||||
thisBlock.group2Tag = tag2;
|
||||
sceneSize = thisBlock.blockSize;
|
||||
break;
|
||||
case (int)TargetController.Targets.Defence:
|
||||
case Targets.Defence:
|
||||
// defence
|
||||
thisBlockObj = Instantiate(defencePrefabs[blockType], blockPosition + EnvironmentObj.transform.position, Quaternion.identity, transform);
|
||||
thisBlock = thisBlockObj.GetComponent<SceneBlock>();
|
||||
|
@ -43,7 +43,6 @@ public class TargetController : MonoBehaviour
|
||||
|
||||
[System.NonSerialized] public int targetTypeInt;
|
||||
public float[] targetState = new float[6];
|
||||
public enum Targets { Free, Go, Attack, Defence, Num };// Num is use for get total target bumber
|
||||
public enum EndType { Win, Lose, Running, Num };
|
||||
[System.NonSerialized] public int targetNum = 0;
|
||||
private Dictionary<int, float[]> oneHotRarget = new Dictionary<int, float[]>();
|
||||
@ -87,7 +86,7 @@ void Start()
|
||||
hudCon = HUDObj.GetComponent<HUDController>();
|
||||
raySensors = AgentObj.GetComponent<RaySensors>();
|
||||
freeProb = 1 - attackProb - gotoProb - defenceProb;
|
||||
targetNum = (int)Targets.Num;
|
||||
targetNum = (int)SceneBlockContainer.Targets.Num;
|
||||
if (freeProb < 0)
|
||||
{
|
||||
Debug.LogError("target percentage wrong");
|
||||
@ -120,7 +119,7 @@ public void rollNewScene()
|
||||
{
|
||||
// goto target spawn
|
||||
Debug.Log("GOTO THIS TARGET!");
|
||||
targetTypeInt = (int)Targets.Go;
|
||||
targetTypeInt = (int)SceneBlockContainer.Targets.Go;
|
||||
int randBlockType = Random.Range(0, blockCont.goBlockPrefabs.Length);
|
||||
// get choosed scene size
|
||||
sceneSize = blockCont.goBlockPrefabs[randBlockType].GetComponent<SceneBlock>().blockSize;
|
||||
@ -131,7 +130,7 @@ public void rollNewScene()
|
||||
moveAgentToSpwanArea();
|
||||
// init scene block
|
||||
blockCont.destroyBlock();
|
||||
blockCont.createNewBlock(targetTypeInt, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
blockCont.createNewBlock(SceneBlockContainer.Targets.Go, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
enemyCont.destroyAllEnemys();
|
||||
enemyCont.randomInitEnemysExcept(hudCon.enemyNum, targetPosition, sceneSize);
|
||||
blockCont.thisBlock.initBlock(EnvironmentObj);
|
||||
@ -142,7 +141,7 @@ public void rollNewScene()
|
||||
{
|
||||
// attack target spawn
|
||||
Debug.Log("ATTACK!");
|
||||
targetTypeInt = (int)Targets.Attack;
|
||||
targetTypeInt = (int)SceneBlockContainer.Targets.Attack;
|
||||
int randBlockType = Random.Range(0, blockCont.attackBlockPrefabs.Length);
|
||||
// get choosed scene size
|
||||
sceneSize = blockCont.attackBlockPrefabs[randBlockType].GetComponent<SceneBlock>().blockSize;
|
||||
@ -153,7 +152,7 @@ public void rollNewScene()
|
||||
moveAgentToSpwanArea();
|
||||
// init scene block
|
||||
blockCont.destroyBlock();
|
||||
blockCont.createNewBlock(targetTypeInt, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
blockCont.createNewBlock(SceneBlockContainer.Targets.Attack, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
enemyCont.destroyAllEnemys();
|
||||
enemyCont.randomInitEnemysExcept(hudCon.enemyNum, targetPosition, sceneSize);
|
||||
blockCont.thisBlock.initBlock(EnvironmentObj);
|
||||
@ -165,7 +164,7 @@ public void rollNewScene()
|
||||
{
|
||||
// defence target spawn
|
||||
Debug.Log("DEFENCE!");
|
||||
targetTypeInt = (int)Targets.Defence;
|
||||
targetTypeInt = (int)SceneBlockContainer.Targets.Defence;
|
||||
int randBlockType = Random.Range(0, blockCont.attackBlockPrefabs.Length);
|
||||
// get choosed scene size
|
||||
sceneSize = blockCont.defencePrefabs[randBlockType].GetComponent<SceneBlock>().blockSize;
|
||||
@ -176,7 +175,7 @@ public void rollNewScene()
|
||||
moveAgentTo(targetPosition);
|
||||
// init scene block
|
||||
blockCont.destroyBlock();
|
||||
blockCont.createNewBlock(targetTypeInt, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
blockCont.createNewBlock(SceneBlockContainer.Targets.Defence, randBlockType, targetPosition, group1Tag, group2Tag);
|
||||
enemyCont.destroyAllEnemys();
|
||||
enemyCont.randomInitEnemysExcept(hudCon.enemyNum, targetPosition, sceneSize);
|
||||
blockCont.thisBlock.initBlock(EnvironmentObj);
|
||||
@ -186,7 +185,7 @@ public void rollNewScene()
|
||||
else
|
||||
{
|
||||
//Debug.Log("Free");
|
||||
targetTypeInt = (int)Targets.Free;
|
||||
targetTypeInt = (int)SceneBlockContainer.Targets.Free;
|
||||
enemyCont.destroyAllEnemys();
|
||||
enemyCont.randomInitEnemys(hudCon.enemyNum);
|
||||
moveAgentToSpwanArea();
|
||||
@ -200,7 +199,7 @@ public void rollNewScene()
|
||||
public void updateTargetStates()
|
||||
{
|
||||
// targettype, x,y,z, firebasesAreaDiameter
|
||||
if (targetTypeInt == (int)Targets.Free)
|
||||
if (targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
{
|
||||
targetState[0] = targetTypeInt;
|
||||
for(int i = 1; i < targetState.Length; i++)
|
||||
@ -262,7 +261,7 @@ public void moveAgentTo(Vector3 thisPosition)
|
||||
float nowDistance = 0f;
|
||||
switch (targetTypeInt)
|
||||
{
|
||||
case (int)Targets.Go:
|
||||
case (int)SceneBlockContainer.Targets.Go:
|
||||
// goto
|
||||
(nowDistance, inArea) = blockCont.getAgentTargetDistanceAndInside(AgentObj.transform.position);
|
||||
envUICon.updateTargetGauge(blockCont.thisBlock.firebasesBelong, blockCont.thisBlock.belongMaxPoint);
|
||||
@ -292,7 +291,7 @@ public void moveAgentTo(Vector3 thisPosition)
|
||||
endTypeInt = (int)EndType.Running;
|
||||
}
|
||||
break;
|
||||
case (int)Targets.Attack:
|
||||
case (int)SceneBlockContainer.Targets.Attack:
|
||||
// attack
|
||||
(nowDistance, inArea) = blockCont.getAgentTargetDistanceAndInside(AgentObj.transform.position);
|
||||
envUICon.updateTargetGauge(blockCont.thisBlock.firebasesBelong, blockCont.thisBlock.belongMaxPoint);
|
||||
@ -323,7 +322,7 @@ public void moveAgentTo(Vector3 thisPosition)
|
||||
endTypeInt = (int)EndType.Running;
|
||||
}
|
||||
break;
|
||||
case (int)Targets.Defence:
|
||||
case (int)SceneBlockContainer.Targets.Defence:
|
||||
//defence
|
||||
// !!! DIDN't FINISH!!!
|
||||
(nowDistance, inArea) = blockCont.getAgentTargetDistanceAndInside(AgentObj.transform.position);
|
||||
@ -411,7 +410,7 @@ public float getDistanceReward(float nowDistance,int inarea)
|
||||
public float killReward(Vector3 enemyPosition)
|
||||
{
|
||||
float thisKillReward = 0f;
|
||||
if (targetTypeInt == (int)Targets.Attack)
|
||||
if (targetTypeInt == (int)SceneBlockContainer.Targets.Attack)
|
||||
{
|
||||
// attack mode
|
||||
(_, int isInArea) = blockCont.thisBlock.getDist_inArea(enemyPosition);
|
||||
@ -425,7 +424,7 @@ public float killReward(Vector3 enemyPosition)
|
||||
thisKillReward = paramCon.killReward;
|
||||
}
|
||||
}
|
||||
else if (targetTypeInt == (int)Targets.Free)
|
||||
else if (targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
{
|
||||
// free mode hit
|
||||
thisKillReward = paramCon.killTargetEnemyReward;
|
||||
@ -442,7 +441,7 @@ public float killReward(Vector3 enemyPosition)
|
||||
public float hitEnemyReward(Vector3 enemyPosition)
|
||||
{
|
||||
float thisHitReward = 0f;
|
||||
if (targetTypeInt == (int)Targets.Attack)
|
||||
if (targetTypeInt == (int)SceneBlockContainer.Targets.Attack)
|
||||
{
|
||||
// attack mode
|
||||
(_, int isInArea) = blockCont.thisBlock.getDist_inArea(enemyPosition);
|
||||
@ -457,7 +456,7 @@ public float hitEnemyReward(Vector3 enemyPosition)
|
||||
thisHitReward = paramCon.hitReward;
|
||||
}
|
||||
}
|
||||
else if (targetTypeInt == (int)Targets.Free)
|
||||
else if (targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
{
|
||||
// free mode hit
|
||||
thisHitReward = paramCon.hitTargetReward;
|
||||
@ -473,7 +472,7 @@ public float hitEnemyReward(Vector3 enemyPosition)
|
||||
// get in area state
|
||||
public int getInAreaState()
|
||||
{
|
||||
if(targetTypeInt == (int)Targets.Go)
|
||||
if(targetTypeInt == (int)SceneBlockContainer.Targets.Go)
|
||||
{
|
||||
return inArea;
|
||||
}
|
||||
|
@ -14,15 +14,15 @@ public class WorldUIController : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
totalGames = new int[(int)TargetController.Targets.Num];
|
||||
winGames = new int[(int)TargetController.Targets.Num];
|
||||
Array.Clear(totalGames, 0, (int)TargetController.Targets.Num);
|
||||
Array.Clear(winGames, 0, (int)TargetController.Targets.Num);
|
||||
totalGames = new int[(int)SceneBlockContainer.Targets.Num];
|
||||
winGames = new int[(int)SceneBlockContainer.Targets.Num];
|
||||
Array.Clear(totalGames, 0, (int)SceneBlockContainer.Targets.Num);
|
||||
Array.Clear(winGames, 0, (int)SceneBlockContainer.Targets.Num);
|
||||
//WinChart.Init();
|
||||
WinChart.RemoveData();
|
||||
for (int i = 0; i < (int)TargetController.Targets.Num; i++)
|
||||
for (int i = 0; i < (int)SceneBlockContainer.Targets.Num; i++)
|
||||
{
|
||||
string lineName = Enum.GetName(typeof(TargetController.Targets), i);
|
||||
string lineName = Enum.GetName(typeof(SceneBlockContainer.Targets), i);
|
||||
WinChart.AddSerie<Line>(lineName);
|
||||
}
|
||||
}
|
||||
|
123
Assets/Script/MouseInMap.cs
Normal file
123
Assets/Script/MouseInMap.cs
Normal file
@ -0,0 +1,123 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class MouseInMap : MonoBehaviour
|
||||
{
|
||||
public Camera playCamera;
|
||||
public GameObject selectEffect;
|
||||
public GameObject PlayGameModeControllerObj;
|
||||
public GameObject EnemyContainerObj;
|
||||
public GameObject SceneBlockContainerObj;
|
||||
public GameObject HUDObj;
|
||||
|
||||
private Vector3 mouseInMapPosition = Vector3.zero;
|
||||
private Vector3 nowHitPosition = Vector3.zero;
|
||||
private LayerMask groundMask;
|
||||
private int randBlockNum;
|
||||
private GameObject preSet;
|
||||
private PlayGameModeController gameModeCon;
|
||||
private MousePreview mousePreviewCon;
|
||||
private EnemyContainer enemyCon;
|
||||
private SceneBlockContainer sceneBlockCon;
|
||||
private TargetUIController targetUICon;
|
||||
|
||||
public enum MouseMode
|
||||
{
|
||||
Default,
|
||||
AttackSet,
|
||||
GotoSet,
|
||||
EnemySet
|
||||
}
|
||||
public MouseMode mouseMode = MouseMode.Default;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
groundMask = LayerMask.GetMask("Ground");
|
||||
gameModeCon = PlayGameModeControllerObj.GetComponent<PlayGameModeController>();
|
||||
mousePreviewCon = this.GetComponent<MousePreview>();
|
||||
enemyCon = EnemyContainerObj.GetComponent<EnemyContainer>();
|
||||
sceneBlockCon = SceneBlockContainerObj.GetComponent<SceneBlockContainer>();
|
||||
targetUICon = HUDObj.GetComponent<TargetUIController>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
nowHitPosition = getMouseOnMapPosition();
|
||||
// if mouse position in area, update mouseInMapPosition as nowHitPosition
|
||||
if (nowHitPosition.x < gameModeCon.maxAgentAreaX && nowHitPosition.x > gameModeCon.minAgentAreaX && nowHitPosition.z < gameModeCon.maxEnemyAreaZ && nowHitPosition.z > gameModeCon.minAgentAreaZ)
|
||||
{
|
||||
mouseInMapPosition = nowHitPosition;
|
||||
mousePreviewCon.updatePreviewPosition(mouseInMapPosition);
|
||||
// Mouse button R pressed
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
switch(mouseMode)
|
||||
{
|
||||
case MouseMode.AttackSet:
|
||||
sceneBlockCon.createNewBlock(SceneBlockContainer.Targets.Attack, randBlockNum, mouseInMapPosition);
|
||||
changeMouseModeTo(MouseMode.Default);
|
||||
break;
|
||||
case MouseMode.GotoSet:
|
||||
sceneBlockCon.createNewBlock(SceneBlockContainer.Targets.Go, randBlockNum, mouseInMapPosition);
|
||||
changeMouseModeTo(MouseMode.Default);
|
||||
break;
|
||||
case MouseMode.EnemySet:
|
||||
enemyCon.initEnemyAtHere(new Vector3(mouseInMapPosition.x,1,mouseInMapPosition.z));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void changeMouseModeTo(MouseMode thisMouseMode)
|
||||
{
|
||||
mouseMode = thisMouseMode;
|
||||
switch (thisMouseMode)
|
||||
{
|
||||
case MouseMode.AttackSet:
|
||||
// random choose attack scene block type and set as preview
|
||||
randBlockNum = Random.Range(0, sceneBlockCon.attackBlockPrefabs.Length);
|
||||
preSet = sceneBlockCon.goBlockPrefabs[randBlockNum];
|
||||
mousePreviewCon.changePreviewTo(preSet);
|
||||
break;
|
||||
case MouseMode.GotoSet:
|
||||
// random choose Goto scene block type and set as preview
|
||||
randBlockNum = Random.Range(0, sceneBlockCon.goBlockPrefabs.Length);
|
||||
preSet = sceneBlockCon.goBlockPrefabs[randBlockNum];
|
||||
mousePreviewCon.changePreviewTo(preSet);
|
||||
break;
|
||||
case MouseMode.EnemySet:
|
||||
preSet = enemyCon.enemyPrefab;
|
||||
mousePreviewCon.changePreviewTo(preSet);
|
||||
break;
|
||||
default:
|
||||
mousePreviewCon.deleteAllPreviewModele();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get mouse position on map, return a Vector3
|
||||
public Vector3 getMouseOnMapPosition()
|
||||
{
|
||||
// shoot raycast from mainCamera center to mousepositon
|
||||
RaycastHit thisHit;
|
||||
Color rayColor = Color.red;
|
||||
Vector3 onMapPosition;
|
||||
Ray ray = playCamera.ScreenPointToRay(Input.mousePosition);
|
||||
// if raycast hit gameobject
|
||||
if (Physics.Raycast(ray, out thisHit, Mathf.Infinity, groundMask))
|
||||
{
|
||||
//draw raycast
|
||||
Debug.DrawRay(ray.origin, ray.direction * 100, rayColor);
|
||||
return onMapPosition = thisHit.point;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 664e98da80fb4d842b0c3aff09fd4dc9
|
||||
guid: 586cc33424b6eb941a724f7235d76abe
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
29
Assets/Script/MousePreview.cs
Normal file
29
Assets/Script/MousePreview.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
public class MousePreview : MonoBehaviour
|
||||
{
|
||||
|
||||
// show mousePreviewObj in mouse position
|
||||
public void changePreviewTo(GameObject mousePreviewObj)
|
||||
{
|
||||
deleteAllPreviewModele();
|
||||
Instantiate(mousePreviewObj, this.transform.position, Quaternion.identity, this.transform);
|
||||
}
|
||||
public void updatePreviewPosition(Vector3 previewPos)
|
||||
{
|
||||
// move this gameobject to previewPos
|
||||
this.transform.position = previewPos;
|
||||
}
|
||||
public void deleteAllPreviewModele()
|
||||
{
|
||||
// delete all child object
|
||||
foreach (Transform childObj in this.transform)
|
||||
{
|
||||
// destroy child
|
||||
Destroy(childObj.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44fd351436d221849991bd84d37d8109
|
||||
guid: 344fcc32b8a34e44395c603ede216670
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
8
Assets/Script/Play.meta
Normal file
8
Assets/Script/Play.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 772abe5dcba09d147adebd1e32dd12fc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
Assets/Script/Play/MouseSelector.cs
Normal file
17
Assets/Script/Play/MouseSelector.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MouseSelector : MonoBehaviour
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
// shoot raycast from mainCamera center to mousepositon
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccfe892ab0f980343b6df0fafaec38e2
|
||||
guid: 3460b8ea83509ed41b69b84ba0c86b87
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
104
Assets/Script/Play/PlayerCamera.cs
Normal file
104
Assets/Script/Play/PlayerCamera.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerCamera : MonoBehaviour
|
||||
{
|
||||
public float normalSpeed = 0.035f;
|
||||
public float shiftSpeed = 0.06f;
|
||||
public float zoomSpeed = -10.0f;
|
||||
public float rotateSpeed = 0.1f;
|
||||
|
||||
public float maxHeight = 40f;
|
||||
public float minHeight = 6f;
|
||||
|
||||
public Vector2 startMouseP;
|
||||
public Vector2 dragMouseP;
|
||||
|
||||
private float speed;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
// shift to speed UP
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
speed = shiftSpeed;
|
||||
zoomSpeed = 20.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
speed = normalSpeed;
|
||||
zoomSpeed = 10.0f;
|
||||
}
|
||||
|
||||
float hsp = transform.position.y * speed * Input.GetAxis("Horizontal"); // horizontal movement speed
|
||||
float vsp = transform.position.y * speed * Input.GetAxis("Vertical"); // vertical movement speed
|
||||
float scrollSp = Mathf.Log(transform.position.y) * -zoomSpeed * Input.GetAxis("Mouse ScrollWheel"); // scroll speed
|
||||
|
||||
// camera height limit
|
||||
if (transform.position.y + scrollSp > maxHeight)
|
||||
{
|
||||
scrollSp = maxHeight - transform.position.y;
|
||||
}
|
||||
else if (transform.position.y + scrollSp < minHeight)
|
||||
{
|
||||
scrollSp = minHeight - transform.position.y;
|
||||
}
|
||||
/* if((transform.position.y <= maxHeight) && (scrollSp > 0))
|
||||
{
|
||||
scrollSp = 0;
|
||||
}else if((transform.position.y >= minHeight)&& (scrollSp < 0))
|
||||
{
|
||||
scrollSp = 0;
|
||||
}
|
||||
if((transform.position.y + scrollSp) > maxHeight)
|
||||
{
|
||||
scrollSp = maxHeight - transform.position.y;
|
||||
}else if((transform.position.y + scrollSp) < minHeight)
|
||||
{
|
||||
scrollSp = minHeight - transform.position.y;
|
||||
}*/
|
||||
|
||||
Vector3 verticalMove = new Vector3(0,scrollSp,0); // vertical movement
|
||||
Vector3 lateralMove = hsp * transform.right; // lateral movement in global world ignore camera facing
|
||||
Vector3 fowardMove = transform.forward; // forward movement in global world ignore camera facing
|
||||
fowardMove.y = 0; // ignore y axis
|
||||
fowardMove = vsp * fowardMove.normalized; // normalize the vector
|
||||
|
||||
Vector3 move = verticalMove + lateralMove + fowardMove; // total movement
|
||||
|
||||
transform.position += move; // move the camera
|
||||
|
||||
cameraRotation();
|
||||
|
||||
}
|
||||
|
||||
void cameraRotation()
|
||||
{
|
||||
// camera rotation while press middle mousebutton
|
||||
if(Input.GetMouseButtonDown(2))
|
||||
{
|
||||
startMouseP = Input.mousePosition;
|
||||
}
|
||||
|
||||
if (Input.GetMouseButton(2))
|
||||
{
|
||||
dragMouseP = Input.mousePosition;
|
||||
|
||||
float dx = (dragMouseP - startMouseP).x * rotateSpeed;
|
||||
float dy = (dragMouseP - startMouseP).y * rotateSpeed;
|
||||
|
||||
transform.rotation *= Quaternion.Euler(new Vector3(0, dx, 0));
|
||||
transform.GetChild(0).rotation *= Quaternion.Euler(new Vector3(-dy, 0, 0));
|
||||
|
||||
startMouseP = dragMouseP;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73ae3df5f5faba1428ab2529c043b7ae
|
||||
guid: 2afdd3e39c405184380c3ffead15ea80
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
118
Assets/Script/PlayGameModeController.cs
Normal file
118
Assets/Script/PlayGameModeController.cs
Normal file
@ -0,0 +1,118 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayGameModeController : MonoBehaviour
|
||||
{
|
||||
public GameObject ParameterContainerObj;
|
||||
public GameObject EnemyContainerObj;
|
||||
public GameObject AgentObj;
|
||||
public GameObject SceneBlockContainerObj;
|
||||
|
||||
// area
|
||||
public GameObject edgeUp;
|
||||
public GameObject edgeDown;
|
||||
public GameObject edgeLeft;
|
||||
public GameObject edgeRight;
|
||||
public GameObject edgeAgent_Enemy;
|
||||
|
||||
public float minEnemyAreaX;
|
||||
public float maxEnemyAreaX;
|
||||
public float minEnemyAreaZ;
|
||||
public float maxEnemyAreaZ;
|
||||
public float minAgentAreaX;
|
||||
public float maxAgentAreaX;
|
||||
public float minAgentAreaZ;
|
||||
public float maxAgentAreaZ;
|
||||
|
||||
private ParameterContainer paramCon;
|
||||
private CharacterController agentCharaCon;
|
||||
private EnemyContainer enemyCon;
|
||||
private SceneBlockContainer sceneBlockCon;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
minEnemyAreaX = edgeLeft.transform.localPosition.x + 1.0f;
|
||||
maxEnemyAreaX = edgeRight.transform.localPosition.x - 1.0f;
|
||||
minEnemyAreaZ = edgeAgent_Enemy.transform.localPosition.z + 1.0f;
|
||||
maxEnemyAreaZ = edgeUp.transform.localPosition.z - 1.0f;
|
||||
|
||||
minAgentAreaX = edgeLeft.transform.localPosition.x + 1.0f;
|
||||
maxAgentAreaX = edgeRight.transform.localPosition.x - 1.0f;
|
||||
minAgentAreaZ = edgeDown.transform.localPosition.z + 1.0f;
|
||||
maxAgentAreaZ = edgeAgent_Enemy.transform.localPosition.z - 1.0f;
|
||||
|
||||
paramCon = ParameterContainerObj.GetComponent<ParameterContainer>();
|
||||
agentCharaCon = AgentObj.GetComponent<CharacterController>();
|
||||
enemyCon = EnemyContainerObj.GetComponent<EnemyContainer>();
|
||||
sceneBlockCon = SceneBlockContainerObj.GetComponent<SceneBlockContainer>();
|
||||
}
|
||||
|
||||
public enum GameMode
|
||||
{
|
||||
Stay,
|
||||
Free,
|
||||
Attack,
|
||||
Goto
|
||||
}
|
||||
public GameMode gameMode = GameMode.Stay;// default stay mode
|
||||
|
||||
public void startInitialize()
|
||||
{
|
||||
gameMode = GameMode.Stay;
|
||||
moveAgentToSpwanArea();
|
||||
enemyCon.destroyAllEnemys();
|
||||
sceneBlockCon.destroyBlock();
|
||||
}
|
||||
|
||||
// change to attack mode
|
||||
public void attackModeChange()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// change to free mode
|
||||
public void freeModeChange()
|
||||
{
|
||||
gameMode = GameMode.Free;
|
||||
}
|
||||
|
||||
// change to goto mode
|
||||
public void gotoModeChange()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// move Agent into Agent Spawn Area
|
||||
public void moveAgentToSpwanArea()
|
||||
{
|
||||
float randX = UnityEngine.Random.Range(minAgentAreaX, maxAgentAreaX); ;
|
||||
float randZ = 0f;
|
||||
if (paramCon.spawnAgentInAllMap)
|
||||
{
|
||||
// spawn agent in all around map
|
||||
randZ = UnityEngine.Random.Range(minAgentAreaZ, maxEnemyAreaZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
// spawn agent in only agent spawn area
|
||||
randZ = UnityEngine.Random.Range(minAgentAreaZ, maxAgentAreaZ);
|
||||
}
|
||||
|
||||
int Y = 1;
|
||||
Vector3 initAgentLoc = new Vector3(randX, Y, randZ);
|
||||
moveAgentTo(initAgentLoc);
|
||||
}
|
||||
|
||||
// move Agent to this position
|
||||
public void moveAgentTo(Vector3 thisPosition)
|
||||
{
|
||||
// while using transform.localPosition to move character
|
||||
// u should turn off character Controller or it won't work
|
||||
agentCharaCon.enabled = false;
|
||||
AgentObj.transform.localPosition = thisPosition;
|
||||
agentCharaCon.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
11
Assets/Script/PlayGameModeController.cs.meta
Normal file
11
Assets/Script/PlayGameModeController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77518fe48235bbe47bd3adde3630eb02
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,106 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EnvArgsChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject DataTransfer;
|
||||
|
||||
[Header("EnemyNum")]
|
||||
public Text EnemyNumText;
|
||||
public InputField EnemyNumInput;
|
||||
|
||||
[Header("TimeLimit")]
|
||||
public Text TimeLimText;
|
||||
public InputField TimelimInput;
|
||||
|
||||
[Header("Decision Period")]
|
||||
public Slider DecisionPeriodSlide;
|
||||
public Text DecisionPeriodDataText;
|
||||
public Toggle TakeActionsBetweenDecisionsToggle;
|
||||
|
||||
[Header("Lock Mouse")]
|
||||
public Toggle LockMouseToggle;
|
||||
|
||||
[Header("Default Camera")]
|
||||
public Toggle FPToggle;
|
||||
public Text FPText;
|
||||
public Toggle TPToggle;
|
||||
public Text TPText;
|
||||
|
||||
private StartSeneData startSeneData;
|
||||
private void Start()
|
||||
{
|
||||
startSeneData = DataTransfer.GetComponent<StartSeneData>();
|
||||
}
|
||||
|
||||
|
||||
public void onEnemynumValueChanged()
|
||||
{
|
||||
// enemy total num value control
|
||||
if (EnemyNumInput.GetComponent<InputField>().text == "" || EnemyNumInput.GetComponent<InputField>().text.Contains("-"))
|
||||
{
|
||||
EnemyNumText.color = Color.gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
EnemyNumText.color = Color.yellow;
|
||||
startSeneData.EnemyNum = Math.Abs(int.Parse(EnemyNumInput.GetComponent<InputField>().text));
|
||||
}
|
||||
}
|
||||
|
||||
public void onTimeValueChanged()
|
||||
{
|
||||
// time limit value control
|
||||
if (TimelimInput.GetComponent<InputField>().text == "" || TimelimInput.GetComponent<InputField>().text.Contains("-"))
|
||||
{
|
||||
TimeLimText.color = Color.gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
TimeLimText.color = Color.yellow;
|
||||
startSeneData.Timelim = Math.Abs(int.Parse(TimelimInput.GetComponent<InputField>().text));
|
||||
}
|
||||
}
|
||||
|
||||
public void onDPSlideValueChanged()
|
||||
{
|
||||
// DecisionPeriod(DP) value Control
|
||||
startSeneData.DecisionPeriod = (int)(DecisionPeriodSlide.GetComponent<Slider>().value);
|
||||
DecisionPeriodDataText.text = startSeneData.DecisionPeriod.ToString();
|
||||
}
|
||||
public void onABDToggleChanged()
|
||||
{
|
||||
// Actions Between Decisions(ABD) Toggle Control
|
||||
startSeneData.ActionsBetweenDecisions = TakeActionsBetweenDecisionsToggle.isOn;
|
||||
}
|
||||
public void onLockMouseToggleChanged()
|
||||
{
|
||||
// lock mouse or not
|
||||
startSeneData.lockMouse = LockMouseToggle.isOn;
|
||||
}
|
||||
public void onTPCamToggleChanged()
|
||||
{
|
||||
startSeneData.defaultTPCamera = true;
|
||||
|
||||
FPToggle.interactable = true;
|
||||
FPToggle.SetIsOnWithoutNotify(false);
|
||||
FPText.color = Color.gray;
|
||||
|
||||
TPToggle.SetIsOnWithoutNotify(true);
|
||||
TPToggle.interactable = false;
|
||||
TPText.color = Color.green;
|
||||
}
|
||||
public void onFPCameToggleChanged()
|
||||
{
|
||||
startSeneData.defaultTPCamera = false;
|
||||
|
||||
TPToggle.interactable = true;
|
||||
TPToggle.SetIsOnWithoutNotify(false);
|
||||
TPText.color = Color.gray;
|
||||
|
||||
FPToggle.SetIsOnWithoutNotify(true);
|
||||
FPToggle.interactable = false;
|
||||
FPText.color = Color.green;
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoadDirChanger : MonoBehaviour
|
||||
{
|
||||
public InputField LoadDirDateTextBox;
|
||||
public InputField LoadDirTimeTextBox;
|
||||
public Toggle Toggle;
|
||||
public GameObject DataTransfer;
|
||||
|
||||
|
||||
public void OnDirToggleChanged()
|
||||
{
|
||||
// if loadDirToggle is on then turn off the input text boxs.
|
||||
LoadDirDateTextBox.interactable = Toggle.isOn;
|
||||
LoadDirTimeTextBox.interactable = Toggle.isOn;
|
||||
// if loadDirToggle is off set loaddirs as 0.
|
||||
if (!Toggle.isOn)
|
||||
{
|
||||
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = "0";
|
||||
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = "0";
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDateValueChanged()
|
||||
{
|
||||
string input = LoadDirDateTextBox.GetComponent<InputField>().text;
|
||||
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = input;
|
||||
}
|
||||
public void OnTimeValueChanged()
|
||||
{
|
||||
string input = LoadDirTimeTextBox.GetComponent<InputField>().text;
|
||||
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = input;
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RewardsChange : MonoBehaviour
|
||||
{
|
||||
public GameObject DataTransfer;
|
||||
|
||||
public GameObject nonRInputOBJ;
|
||||
public GameObject shootRInputOBJ;
|
||||
public GameObject shootWithoutReadyRInputOBJ;
|
||||
public GameObject hitRInputOBJ;
|
||||
public GameObject killRInputOBJ;
|
||||
public GameObject winRInputOBJ;
|
||||
public GameObject loseRInputOBJ;
|
||||
|
||||
|
||||
public Text nonRInputText;
|
||||
public Text shootRInputText;
|
||||
public Text shootWithoutReadyRInputText;
|
||||
public Text hitRInputText;
|
||||
public Text killRInputText;
|
||||
public Text winRInputText;
|
||||
public Text loseRInputText;
|
||||
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
}
|
||||
// Update is called once per frame
|
||||
|
||||
public void nonRValueChanged()
|
||||
{
|
||||
if (nonRInputOBJ.GetComponent<InputField>().text == "" || nonRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
nonRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().nonReward = DataTransfer.GetComponent<StartSeneData>().nonRewardDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
nonRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().nonReward = float.Parse(nonRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void shootRValueChanged()
|
||||
{
|
||||
if (shootRInputOBJ.GetComponent<InputField>().text == "" || shootRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
shootRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootReward = DataTransfer.GetComponent<StartSeneData>().shootRewardDefault;
|
||||
}
|
||||
else {
|
||||
shootRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootReward = float.Parse(shootRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void shootWOReadyRValueChanged()
|
||||
{
|
||||
if(shootWithoutReadyRInputOBJ.GetComponent<InputField>().text == "" || shootWithoutReadyRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
shootWithoutReadyRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootWithoutReadyReward = DataTransfer.GetComponent<StartSeneData>().shootWithoutReadyRewardDefault;
|
||||
}
|
||||
else{
|
||||
shootWithoutReadyRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootWithoutReadyReward = float.Parse(shootWithoutReadyRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void hitRValueChanged()
|
||||
{
|
||||
if(hitRInputOBJ.GetComponent<InputField>().text == "" || hitRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
hitRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().hitReward = DataTransfer.GetComponent<StartSeneData>().hitRewardDefault;
|
||||
}
|
||||
else{
|
||||
hitRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().hitReward = float.Parse(hitRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void winRValueChanged()
|
||||
{
|
||||
if(winRInputOBJ.GetComponent<InputField>().text == "" || winRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
winRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().winReward = DataTransfer.GetComponent<StartSeneData>().winRewardDefault;
|
||||
}
|
||||
else{
|
||||
winRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().winReward = float.Parse(winRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void loseRValueChanged()
|
||||
{
|
||||
if(loseRInputOBJ.GetComponent<InputField>().text == "" || loseRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
loseRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().loseReward = DataTransfer.GetComponent<StartSeneData>().loseRewardDefault;
|
||||
}
|
||||
else{
|
||||
loseRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().loseReward = float.Parse(loseRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
public void killRValueChanged()
|
||||
{
|
||||
if(killRInputOBJ.GetComponent<InputField>().text == "" || killRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
killRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().killReward = DataTransfer.GetComponent<StartSeneData>().killRewardDefault;
|
||||
}
|
||||
else{
|
||||
killRInputText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().killReward = float.Parse(killRInputOBJ.GetComponent<InputField>().text);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneChange : MonoBehaviour
|
||||
{
|
||||
public GameObject DataTransfer;
|
||||
public Text errorText;
|
||||
// Start is called before the first frame update
|
||||
bool checkLoadDirFormat()
|
||||
{
|
||||
string thisLoadDirDate = DataTransfer.GetComponent<StartSeneData>().LoadDirDate;
|
||||
string thisLoadDirTime = DataTransfer.GetComponent<StartSeneData>().LoadDirTime;
|
||||
int LoadDirDateLength = thisLoadDirDate.Length;
|
||||
int LoadDirTimeLength = thisLoadDirTime.Length;
|
||||
if ((LoadDirDateLength == 8 && LoadDirTimeLength == 6) || (thisLoadDirDate == "0" && thisLoadDirTime == "0"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void onStartClick()
|
||||
{
|
||||
if (checkLoadDirFormat())
|
||||
{
|
||||
errorText.text = "Loading next Scene...";
|
||||
errorText.color = Color.green;
|
||||
SceneManager.LoadScene("InGame");
|
||||
}
|
||||
else
|
||||
{
|
||||
errorText.text = "Dir Format error";
|
||||
}
|
||||
}
|
||||
}
|
26
Assets/Script/Start/SceneLoader.cs
Normal file
26
Assets/Script/Start/SceneLoader.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneLoader : MonoBehaviour
|
||||
{
|
||||
public enum SceneType
|
||||
{
|
||||
Train,
|
||||
Play,
|
||||
}
|
||||
public void loadScene(SceneType sceneType)
|
||||
{
|
||||
switch (sceneType)
|
||||
{
|
||||
case SceneType.Train:
|
||||
SceneManager.LoadScene("Train");
|
||||
break;
|
||||
case SceneType.Play:
|
||||
SceneManager.LoadScene("Play");
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("SceneLoader:loadScene: unknown scene type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Script/Start/SceneLoader.cs.meta
Normal file
11
Assets/Script/Start/SceneLoader.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9860d0d9e8776b34c9526d76c4ef118b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,55 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class StartSeneData : MonoBehaviour
|
||||
{
|
||||
[Header("Default Rewards")]
|
||||
public float nonRewardDefault = -0.05f;
|
||||
public float shootRewardDefault = -0.06f;
|
||||
public float shootWithoutReadyRewardDefault = -0.06f;
|
||||
public float hitRewardDefault = 5.0f;
|
||||
public float killRewardDefault = 10.0f;
|
||||
public float winRewardDefault = 20.0f;
|
||||
public float loseRewardDefault = -0.05f;
|
||||
public bool lockMouse = false;
|
||||
public bool defaultTPCamera = true;
|
||||
[Header("Game mode")]
|
||||
public int gamemode = 0;// default trainning mode
|
||||
|
||||
// LoadDir
|
||||
[System.NonSerialized]public string LoadDirDate = "0";
|
||||
[System.NonSerialized]public string LoadDirTime = "0";
|
||||
|
||||
// Rewards
|
||||
[System.NonSerialized] public float nonReward;
|
||||
[System.NonSerialized] public float shootReward;
|
||||
[System.NonSerialized] public float shootWithoutReadyReward;
|
||||
[System.NonSerialized] public float hitReward;
|
||||
[System.NonSerialized] public float killReward;
|
||||
[System.NonSerialized] public float winReward;
|
||||
[System.NonSerialized] public float loseReward;
|
||||
|
||||
// DecisionPeriod
|
||||
[System.NonSerialized] public int DecisionPeriod = 1;
|
||||
[System.NonSerialized] public bool ActionsBetweenDecisions = true;
|
||||
|
||||
// EnemyNum
|
||||
[System.NonSerialized] public int EnemyNum = 3;
|
||||
|
||||
// TimeLimit
|
||||
[System.NonSerialized] public int Timelim = 15;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
nonReward = nonRewardDefault;
|
||||
shootReward = shootRewardDefault;
|
||||
shootWithoutReadyReward = shootWithoutReadyRewardDefault;
|
||||
hitReward = hitRewardDefault;
|
||||
killReward = killRewardDefault;
|
||||
winReward = winRewardDefault;
|
||||
loseReward = loseRewardDefault;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Awake()
|
||||
{
|
||||
DontDestroyOnLoad(transform.gameObject);
|
||||
|
52
Assets/Script/Start/StartUIManager.cs
Normal file
52
Assets/Script/Start/StartUIManager.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class StartUIManager : MonoBehaviour
|
||||
{
|
||||
public int WaitTimeLimit = 45;
|
||||
public GameObject SceneLoaderObj;
|
||||
public GameObject StartSceneDataObj;
|
||||
public TextMeshProUGUI MessageTextObj;
|
||||
public TextMeshProUGUI WaitTimeTextObj;
|
||||
private SceneLoader sceneLoader;
|
||||
private StartSeneData startSceneData;
|
||||
private float startTime;
|
||||
private float nowTime;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
sceneLoader = SceneLoaderObj.GetComponent<SceneLoader>();
|
||||
startSceneData = StartSceneDataObj.GetComponent<StartSeneData>();
|
||||
MessageTextObj.text = "";
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// update time limit left;
|
||||
float leftTime = WaitTimeLimit - Time.realtimeSinceStartup;
|
||||
WaitTimeTextObj.text = ((int)Math.Round(leftTime)).ToString();
|
||||
if (leftTime <= 1)
|
||||
{
|
||||
// if time limit is over, load Train Scene
|
||||
sceneLoader.loadScene(SceneLoader.SceneType.Train);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// while Train-StartButton Pressed
|
||||
public void OnTrainStartButtonPressed()
|
||||
{
|
||||
startSceneData.gamemode = 0;
|
||||
sceneLoader.loadScene(SceneLoader.SceneType.Train);
|
||||
MessageTextObj.text = "Loading Train Scene...";
|
||||
}
|
||||
// while StartButton-Play Pressed
|
||||
public void OnPlayButtonPressed()
|
||||
{
|
||||
startSceneData.gamemode = 1;
|
||||
sceneLoader.loadScene(SceneLoader.SceneType.Play);
|
||||
MessageTextObj.text = "Loading Play Scene...";
|
||||
}
|
||||
|
||||
}
|
11
Assets/Script/Start/StartUIManager.cs.meta
Normal file
11
Assets/Script/Start/StartUIManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7761fd42cad2b9544a15df1264649677
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
89
Assets/Script/TargetUIController.cs
Normal file
89
Assets/Script/TargetUIController.cs
Normal file
@ -0,0 +1,89 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TargetUIController : MonoBehaviour
|
||||
{
|
||||
// Controller to control the UI of the target,
|
||||
// select target type, select prefeb to set or sth.
|
||||
public GameObject gameModeController;
|
||||
public GameObject MouseSelectorObj;
|
||||
|
||||
public Button setAttackButton;
|
||||
public Button setGotoButton;
|
||||
public Button setFreeButton;
|
||||
public Button setStayButton;
|
||||
|
||||
private PlayGameModeController gameModeCon;
|
||||
private MouseInMap mouseInMapCon;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
gameModeCon = gameModeController.GetComponent<PlayGameModeController>();
|
||||
mouseInMapCon = MouseSelectorObj.GetComponent<MouseInMap>();
|
||||
}
|
||||
|
||||
public void clearGamePressed()
|
||||
{
|
||||
// Clear all enemies and targets. set gamemode to Stay mode
|
||||
gameModeCon.gameMode = PlayGameModeController.GameMode.Stay;
|
||||
mouseInMapCon.changeMouseModeTo(MouseInMap.MouseMode.Default);
|
||||
// disable setStayButton and enable other buttons
|
||||
setStayButton.interactable = false;
|
||||
setAttackButton.interactable = true;
|
||||
setGotoButton.interactable = true;
|
||||
setFreeButton.interactable = true;
|
||||
gameModeCon.startInitialize();
|
||||
}
|
||||
public void setEnemyPressed()
|
||||
{
|
||||
mouseInMapCon.changeMouseModeTo(MouseInMap.MouseMode.EnemySet);
|
||||
}
|
||||
public void setGotoPressed()
|
||||
{
|
||||
mouseInMapCon.changeMouseModeTo(MouseInMap.MouseMode.GotoSet);
|
||||
}
|
||||
public void setAttackPressed()
|
||||
{
|
||||
mouseInMapCon.changeMouseModeTo(MouseInMap.MouseMode.AttackSet);
|
||||
}
|
||||
public void setFreePressed()
|
||||
{
|
||||
mouseInMapCon.mouseMode = MouseInMap.MouseMode.Default;
|
||||
setStayButton.interactable = true;
|
||||
setAttackButton.interactable = true;
|
||||
setGotoButton.interactable = true;
|
||||
setFreeButton.interactable = false;
|
||||
}
|
||||
public void setStayPressed()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void UIButtonInteractable(PlayGameModeController.GameMode nowMode = PlayGameModeController.GameMode.Stay)
|
||||
{
|
||||
setStayButton.interactable = true;
|
||||
setAttackButton.interactable = true;
|
||||
setGotoButton.interactable = true;
|
||||
setFreeButton.interactable = true;
|
||||
switch(nowMode)
|
||||
{
|
||||
case PlayGameModeController.GameMode.Attack:
|
||||
setAttackButton.interactable = false;
|
||||
break;
|
||||
case PlayGameModeController.GameMode.Free:
|
||||
setFreeButton.interactable = false;
|
||||
break;
|
||||
case PlayGameModeController.GameMode.Goto:
|
||||
setGotoButton.interactable = false;
|
||||
break;
|
||||
case PlayGameModeController.GameMode.Stay:
|
||||
setStayButton.interactable = false;
|
||||
break;
|
||||
default:
|
||||
Debug.Log("TargetUIController.UIButtonInteractable : Type error");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Script/TargetUIController.cs.meta
Normal file
11
Assets/Script/TargetUIController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e5f471594a32c24194088f10d716a89
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Script/selectEffect.cs
Normal file
16
Assets/Script/selectEffect.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class selectEffect : MonoBehaviour
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
// if this gameobject exist over 5s, destroy it
|
||||
if (Time.time > 5)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Script/selectEffect.cs.meta
Normal file
11
Assets/Script/selectEffect.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42a602efe0639c144907a166e7e59a79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -4,5 +4,11 @@
|
||||
EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes: []
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/StartScene.unity
|
||||
guid: 4260567fdad382b45aff2dfe6afb2dd8
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Train.unity
|
||||
guid: ef8aa1b5799bc8a4c8adeedf1e5553c7
|
||||
m_configObjects: {}
|
||||
|
@ -3,7 +3,9 @@
|
||||
--- !u!78 &1
|
||||
TagManager:
|
||||
serializedVersion: 2
|
||||
tags: []
|
||||
tags:
|
||||
- Wall
|
||||
- Enemy
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
@ -11,7 +13,7 @@ TagManager:
|
||||
-
|
||||
- Water
|
||||
- UI
|
||||
-
|
||||
- Ground
|
||||
-
|
||||
-
|
||||
-
|
||||
|
@ -5,6 +5,18 @@ EditorUserSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 5703025650035e5d090f087148715d4443161e2c7e2c20357b281b31b0e43060
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 55090405535008090b5608764626074415151c79747c74602b7c1861e4b96c6c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 06570c0704040b0e5a575520137b5e44154f192e292d22367c2c4866b7b3376f
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 5453565f53020f085f5d0e72157a0844454f4c2b757d7265757a4f64b7b4313c
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-0:
|
||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||
flags: 0
|
||||
@ -28,9 +40,13 @@ EditorUserSettings:
|
||||
m_VCDebugCmd: 0
|
||||
m_VCDebugOut: 0
|
||||
m_SemanticMergeMode: 2
|
||||
m_DesiredImportWorkerCount: 3
|
||||
m_StandbyImportWorkerCount: 2
|
||||
m_IdleImportWorkerShutdownDelay: 60000
|
||||
m_VCShowFailedCheckout: 1
|
||||
m_VCOverwriteFailedCheckoutAssets: 1
|
||||
m_VCProjectOverlayIcons: 1
|
||||
m_VCHierarchyOverlayIcons: 1
|
||||
m_VCOtherOverlayIcons: 1
|
||||
m_VCAllowAsyncUpdate: 1
|
||||
m_ArtifactGarbageCollection: 1
|
||||
|
@ -14,91 +14,17 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_PixelRect:
|
||||
serializedVersion: 2
|
||||
x: -130
|
||||
y: 190
|
||||
width: 1852
|
||||
height: 989
|
||||
x: 62
|
||||
y: 43
|
||||
width: 1858
|
||||
height: 1037
|
||||
m_ShowMode: 4
|
||||
m_Title: Hierarchy
|
||||
m_RootView: {fileID: 12}
|
||||
m_Title: Project
|
||||
m_RootView: {fileID: 9}
|
||||
m_MinSize: {x: 875, y: 392}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
m_Maximized: 0
|
||||
m_Maximized: 1
|
||||
--- !u!114 &2
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_PixelRect:
|
||||
serializedVersion: 2
|
||||
x: -1080
|
||||
y: -695
|
||||
width: 1080
|
||||
height: 636
|
||||
m_ShowMode: 0
|
||||
m_Title: Game
|
||||
m_RootView: {fileID: 4}
|
||||
m_MinSize: {x: 100, y: 121}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_Maximized: 0
|
||||
--- !u!114 &3
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: GameView
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1080
|
||||
height: 636
|
||||
m_MinSize: {x: 100, y: 121}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_ActualView: {fileID: 16}
|
||||
m_Panes:
|
||||
- {fileID: 16}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &4
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 3}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1080
|
||||
height: 636
|
||||
m_MinSize: {x: 100, y: 121}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
vertical: 0
|
||||
controlID: 149
|
||||
--- !u!114 &5
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -114,18 +40,18 @@ MonoBehaviour:
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 680
|
||||
width: 1077
|
||||
height: 259
|
||||
y: 716
|
||||
width: 1090
|
||||
height: 271
|
||||
m_MinSize: {x: 231, y: 271}
|
||||
m_MaxSize: {x: 10001, y: 10021}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_Panes:
|
||||
- {fileID: 18}
|
||||
- {fileID: 17}
|
||||
- {fileID: 15}
|
||||
- {fileID: 14}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 1
|
||||
--- !u!114 &6
|
||||
--- !u!114 &3
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -138,19 +64,19 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 15}
|
||||
- {fileID: 5}
|
||||
- {fileID: 12}
|
||||
- {fileID: 2}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1077
|
||||
height: 939
|
||||
width: 1090
|
||||
height: 987
|
||||
m_MinSize: {x: 100, y: 200}
|
||||
m_MaxSize: {x: 8096, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 19
|
||||
--- !u!114 &7
|
||||
controlID: 74
|
||||
--- !u!114 &4
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -166,17 +92,17 @@ MonoBehaviour:
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 464
|
||||
y: 716
|
||||
width: 332
|
||||
height: 475
|
||||
height: 271
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_ActualView: {fileID: 22}
|
||||
m_ActualView: {fileID: 19}
|
||||
m_Panes:
|
||||
- {fileID: 22}
|
||||
- {fileID: 19}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &8
|
||||
--- !u!114 &5
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -189,19 +115,19 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 9}
|
||||
- {fileID: 7}
|
||||
- {fileID: 6}
|
||||
- {fileID: 4}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1077
|
||||
x: 1090
|
||||
y: 0
|
||||
width: 332
|
||||
height: 939
|
||||
m_MinSize: {x: 100, y: 200}
|
||||
m_MaxSize: {x: 8096, y: 16192}
|
||||
height: 987
|
||||
m_MinSize: {x: 202, y: 342}
|
||||
m_MaxSize: {x: 4002, y: 8042}
|
||||
vertical: 1
|
||||
controlID: 69
|
||||
--- !u!114 &9
|
||||
controlID: 114
|
||||
--- !u!114 &6
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -219,15 +145,15 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 332
|
||||
height: 464
|
||||
height: 716
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_ActualView: {fileID: 20}
|
||||
m_ActualView: {fileID: 17}
|
||||
m_Panes:
|
||||
- {fileID: 20}
|
||||
- {fileID: 17}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &10
|
||||
--- !u!114 &7
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -240,20 +166,20 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 6}
|
||||
- {fileID: 3}
|
||||
- {fileID: 5}
|
||||
- {fileID: 8}
|
||||
- {fileID: 11}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 30
|
||||
width: 1852
|
||||
height: 939
|
||||
m_MinSize: {x: 300, y: 200}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
width: 1858
|
||||
height: 987
|
||||
m_MinSize: {x: 402, y: 342}
|
||||
m_MaxSize: {x: 20194, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 68
|
||||
--- !u!114 &11
|
||||
controlID: 19
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -268,18 +194,18 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1409
|
||||
x: 1422
|
||||
y: 0
|
||||
width: 443
|
||||
height: 939
|
||||
width: 436
|
||||
height: 987
|
||||
m_MinSize: {x: 275, y: 50}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_ActualView: {fileID: 19}
|
||||
m_ActualView: {fileID: 16}
|
||||
m_Panes:
|
||||
- {fileID: 19}
|
||||
- {fileID: 16}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &12
|
||||
--- !u!114 &9
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -292,22 +218,22 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 13}
|
||||
- {fileID: 10}
|
||||
- {fileID: 14}
|
||||
- {fileID: 7}
|
||||
- {fileID: 11}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1852
|
||||
height: 989
|
||||
width: 1858
|
||||
height: 1037
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
m_UseTopView: 1
|
||||
m_TopViewHeight: 30
|
||||
m_UseBottomView: 1
|
||||
m_BottomViewHeight: 20
|
||||
--- !u!114 &13
|
||||
--- !u!114 &10
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -324,12 +250,12 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1852
|
||||
width: 1858
|
||||
height: 30
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
m_LastLoadedLayoutName:
|
||||
--- !u!114 &14
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -345,12 +271,12 @@ MonoBehaviour:
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 969
|
||||
width: 1852
|
||||
y: 1017
|
||||
width: 1858
|
||||
height: 20
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
--- !u!114 &15
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -367,16 +293,17 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1077
|
||||
height: 680
|
||||
width: 1090
|
||||
height: 716
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_ActualView: {fileID: 21}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_Panes:
|
||||
- {fileID: 21}
|
||||
- {fileID: 18}
|
||||
- {fileID: 13}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &16
|
||||
m_LastSelected: 1
|
||||
--- !u!114 &13
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -396,10 +323,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: -1080
|
||||
y: -695
|
||||
width: 1080
|
||||
height: 615
|
||||
x: 62
|
||||
y: 73
|
||||
width: 1089
|
||||
height: 695
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@ -410,7 +337,7 @@ MonoBehaviour:
|
||||
m_ShowGizmos: 0
|
||||
m_TargetDisplay: 0
|
||||
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_TargetSize: {x: 1080, y: 594}
|
||||
m_TargetSize: {x: 1089, y: 674}
|
||||
m_TextureFilterMode: 0
|
||||
m_TextureHideFlags: 61
|
||||
m_RenderIMGUI: 1
|
||||
@ -425,10 +352,10 @@ MonoBehaviour:
|
||||
m_VRangeLocked: 0
|
||||
hZoomLockedByDefault: 0
|
||||
vZoomLockedByDefault: 0
|
||||
m_HBaseRangeMin: -540
|
||||
m_HBaseRangeMax: 540
|
||||
m_VBaseRangeMin: -297
|
||||
m_VBaseRangeMax: 297
|
||||
m_HBaseRangeMin: -544.5
|
||||
m_HBaseRangeMax: 544.5
|
||||
m_VBaseRangeMin: -337
|
||||
m_VBaseRangeMax: 337
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
@ -437,7 +364,7 @@ MonoBehaviour:
|
||||
m_HSlider: 0
|
||||
m_VSlider: 0
|
||||
m_IgnoreScrollWheelUntilClicked: 0
|
||||
m_EnableMouseInput: 1
|
||||
m_EnableMouseInput: 0
|
||||
m_EnableSliderZoomHorizontal: 0
|
||||
m_EnableSliderZoomVertical: 0
|
||||
m_UniformScale: 1
|
||||
@ -446,29 +373,29 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 1080
|
||||
height: 594
|
||||
width: 1089
|
||||
height: 674
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Translation: {x: 540, y: 297}
|
||||
m_Translation: {x: 544.5, y: 337}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -540
|
||||
y: -297
|
||||
width: 1080
|
||||
height: 594
|
||||
x: -544.5
|
||||
y: -337
|
||||
width: 1089
|
||||
height: 674
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 1
|
||||
m_LastWindowPixelSize: {x: 1080, y: 615}
|
||||
m_LastWindowPixelSize: {x: 1089, y: 695}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000000000000000000
|
||||
m_XRRenderMode: 0
|
||||
m_RenderTexture: {fileID: 0}
|
||||
--- !u!114 &17
|
||||
--- !u!114 &14
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -488,15 +415,15 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 62
|
||||
y: 787
|
||||
width: 1086
|
||||
height: 252
|
||||
x: 64
|
||||
y: 789
|
||||
width: 1088
|
||||
height: 250
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
--- !u!114 &18
|
||||
--- !u!114 &15
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -516,10 +443,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: -130
|
||||
y: 900
|
||||
width: 1076
|
||||
height: 238
|
||||
x: 62
|
||||
y: 789
|
||||
width: 1089
|
||||
height: 250
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@ -537,22 +464,22 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Script/InGame
|
||||
- Assets/Script
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 16
|
||||
m_LastFolders:
|
||||
- Assets/Script/InGame
|
||||
- Assets/Script
|
||||
m_LastFoldersGridSize: 16
|
||||
m_LastProjectPath: C:\Users\UCUNI\OneDrive\Unity\ML-Agents\Aimbot-ParallelEnv
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 172}
|
||||
m_SelectedIDs: 22790000
|
||||
m_LastClickedID: 31010
|
||||
m_ExpandedIDs: 00000000e0780000e2780000e4780000e6780000e87800001c79000000ca9a3b
|
||||
scrollPos: {x: 0, y: 90}
|
||||
m_SelectedIDs: cc690000
|
||||
m_LastClickedID: 27084
|
||||
m_ExpandedIDs: 00000000a8690000aa690000ac690000ae690000b0690000cc69000000ca9a3b
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -568,7 +495,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 5}
|
||||
m_ClientGUIView: {fileID: 2}
|
||||
m_SearchString:
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
@ -580,7 +507,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 00000000e0780000e2780000e4780000e6780000e8780000
|
||||
m_ExpandedIDs: 00000000a8690000aa690000ac690000ae690000b0690000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -611,20 +538,20 @@ MonoBehaviour:
|
||||
m_ExpandedInstanceIDs: c623000000000000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_Name: MouseSelector
|
||||
m_OriginalName: MouseSelector
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_UserData: 2656
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_OriginalEventType: 0
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 5}
|
||||
m_ClientGUIView: {fileID: 2}
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
@ -632,11 +559,11 @@ MonoBehaviour:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_NewAssetIndexInList: -1
|
||||
m_ScrollPosition: {x: 0, y: 84}
|
||||
m_ScrollPosition: {x: 0, y: 0}
|
||||
m_GridSize: 16
|
||||
m_SkipHiddenPackages: 0
|
||||
m_DirectoriesAreaWidth: 355
|
||||
--- !u!114 &19
|
||||
--- !u!114 &16
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -656,10 +583,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1279
|
||||
y: 220
|
||||
width: 442
|
||||
height: 918
|
||||
x: 1484
|
||||
y: 73
|
||||
width: 435
|
||||
height: 966
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@ -677,7 +604,7 @@ MonoBehaviour:
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_PreviewWindow: {fileID: 0}
|
||||
--- !u!114 &20
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -697,10 +624,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 947
|
||||
y: 220
|
||||
x: 1152
|
||||
y: 73
|
||||
width: 330
|
||||
height: 443
|
||||
height: 695
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@ -710,7 +637,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: fc99ffff589affffec9bffff32fbffff886a0000
|
||||
m_ExpandedIDs: 32fbffff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -726,7 +653,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 9}
|
||||
m_ClientGUIView: {fileID: 6}
|
||||
m_SearchString:
|
||||
m_ExpandedScenes: []
|
||||
m_CurrenRootInstanceID: 0
|
||||
@ -734,7 +661,7 @@ MonoBehaviour:
|
||||
m_IsLocked: 0
|
||||
m_CurrentSortingName: TransformSorting
|
||||
m_WindowGUID: 4c969a2b90040154d917609493e03593
|
||||
--- !u!114 &21
|
||||
--- !u!114 &18
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -754,10 +681,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: -130
|
||||
y: 220
|
||||
width: 1076
|
||||
height: 659
|
||||
x: 62
|
||||
y: 73
|
||||
width: 1089
|
||||
height: 695
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@ -992,9 +919,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: -193.44568, y: -432.5919, z: 284.7471}
|
||||
m_Target: {x: 160.16556, y: -223.58987, z: 194.37906}
|
||||
speed: 2
|
||||
m_Value: {x: -193.44568, y: -432.5919, z: 284.7471}
|
||||
m_Value: {x: 160.16556, y: -223.58987, z: 194.37906}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@ -1041,13 +968,13 @@ MonoBehaviour:
|
||||
m_GridAxis: 1
|
||||
m_gridOpacity: 0.5
|
||||
m_Rotation:
|
||||
m_Target: {x: 0.40636468, y: 0.03531183, z: -0.015755024, w: 0.9128847}
|
||||
m_Target: {x: 0.37377584, y: 0.30120626, z: -0.12980841, w: 0.86757493}
|
||||
speed: 2
|
||||
m_Value: {x: 0.40636754, y: 0.03531208, z: -0.015755134, w: 0.91289115}
|
||||
m_Value: {x: 0.37378144, y: 0.30121076, z: -0.12981035, w: 0.8675879}
|
||||
m_Size:
|
||||
m_Target: 336.21252
|
||||
m_Target: 200.99156
|
||||
speed: 2
|
||||
m_Value: 321.73447
|
||||
m_Value: 200.99156
|
||||
m_Ortho:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
@ -1072,7 +999,7 @@ MonoBehaviour:
|
||||
m_SceneVisActive: 1
|
||||
m_LastLockedObject: {fileID: 0}
|
||||
m_ViewIsLockedToObject: 0
|
||||
--- !u!114 &22
|
||||
--- !u!114 &19
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1092,10 +1019,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 947
|
||||
y: 684
|
||||
x: 1152
|
||||
y: 789
|
||||
width: 330
|
||||
height: 454
|
||||
height: 250
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
|
Loading…
Reference in New Issue
Block a user