Add Enemy Change Button
Add Enemy Change Button. Tidy up Unity Script folder.
This commit is contained in:
@@ -1 +1 @@
|
||||
{"count":1,"self":49.843855999999995,"total":49.849858,"children":{"InitializeActuators":{"count":2,"self":0.0010003,"total":0.0010003,"children":null},"InitializeSensors":{"count":2,"self":0.0010000999999999999,"total":0.0010000999999999999,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1662380026","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 209fdf30-2c1f-11ed-916f-33e85f4223cc -accessToken IuORxC7h70N41GHOqk3KOoetERc0UUQjx5TXQ7GcoN400ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"InGame","end_time_seconds":"1662380076"}}
|
||||
{"count":1,"self":76.1056064,"total":77.0151326,"children":{"InitializeActuators":{"count":2,"self":0.0010002,"total":0.0010002,"children":null},"InitializeSensors":{"count":2,"self":0.0010006,"total":0.0010006,"children":null},"AgentSendState":{"count":3525,"self":0.020509199999999998,"total":0.045513399999999996,"children":{"CollectObservations":{"count":3525,"self":0.014000199999999999,"total":0.014000199999999999,"children":null},"WriteActionMask":{"count":3525,"self":0.0015004999999999999,"total":0.0015004999999999999,"children":null},"RequestDecision":{"count":3525,"self":0.0095035,"total":0.0095035,"children":null}}},"DecideAction":{"count":3525,"self":0.0245083,"total":0.0245083,"children":null},"AgentAct":{"count":3525,"self":0.83650059999999993,"total":0.83650059999999993,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":2,"max":206.058914,"min":20.96005,"runningAverage":113.509483,"value":206.058914,"weightedAverage":67.2347641}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1662472464","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 209fdf30-2c1f-11ed-916f-33e85f4223cc -accessToken 5GeE0MPO4nIT2FtMaaxUH4hsA72o91Oemjld-dVfVXY00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"InGame","end_time_seconds":"1662472541"}}
|
||||
@@ -1 +1 @@
|
||||
{"count":1,"self":43.5237632,"total":43.6840131,"children":{"InitializeActuators":{"count":2,"self":0.0009992,"total":0.0009992,"children":null},"InitializeSensors":{"count":2,"self":0.0009998,"total":0.0009998,"children":null},"AgentSendState":{"count":593,"self":0.0074995,"total":0.013000699999999999,"children":{"CollectObservations":{"count":593,"self":0.0015008999999999999,"total":0.0015008999999999999,"children":null},"WriteActionMask":{"count":593,"self":0,"total":0,"children":null},"RequestDecision":{"count":593,"self":0.0040003,"total":0.0040003,"children":null}}},"DecideAction":{"count":593,"self":0.0039997999999999995,"total":0.0039997999999999995,"children":null},"AgentAct":{"count":593,"self":0.1412494,"total":0.1412494,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1662366923","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 209fdf30-2c1f-11ed-916f-33e85f4223cc -accessToken 3CjC0epfWRwxG_KrVpNvr61CG1zT0gOQYZxf1vrmOrM00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"Start","end_time_seconds":"1662366967"}}
|
||||
{"count":1,"self":5.485704,"total":5.4877040999999993,"children":{"InitializeActuators":{"count":2,"self":0.0010002,"total":0.0010002,"children":null},"InitializeSensors":{"count":2,"self":0.0010000999999999999,"total":0.0010000999999999999,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1662470064","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-PPO\\Aimbot-PPO-MultiScene -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 209fdf30-2c1f-11ed-916f-33e85f4223cc -accessToken 5GeE0MPO4nIT2FtMaaxUH4hsA72o91Oemjld-dVfVXY00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.0","scene_name":"Start","end_time_seconds":"1662470069"}}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -690,6 +690,59 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 282242985}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &289162991
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 289162992}
|
||||
- component: {fileID: 289162993}
|
||||
m_Layer: 5
|
||||
m_Name: EnemyNum
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &289162992
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 289162991}
|
||||
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_Children:
|
||||
- {fileID: 409680776}
|
||||
- {fileID: 1746261329}
|
||||
m_Father: {fileID: 1375409014}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 214, y: -290}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &289162993
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 289162991}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 64d0bcf55e4db0c488996ba1051c279f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
DataTransfer: {fileID: 1483319556}
|
||||
EnemyNumInput: {fileID: 409680777}
|
||||
EnemyNumText: {fileID: 1746261330}
|
||||
--- !u!1 &293920964
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -940,6 +993,161 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 350269940}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &409680775
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 409680776}
|
||||
- component: {fileID: 409680779}
|
||||
- component: {fileID: 409680778}
|
||||
- component: {fileID: 409680777}
|
||||
m_Layer: 5
|
||||
m_Name: EnemyNumInput
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &409680776
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409680775}
|
||||
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_Children:
|
||||
- {fileID: 830483181}
|
||||
- {fileID: 1963132020}
|
||||
m_Father: {fileID: 289162992}
|
||||
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: 80, y: 0}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &409680777
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409680775}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 409680778}
|
||||
m_TextComponent: {fileID: 1963132021}
|
||||
m_Placeholder: {fileID: 830483182}
|
||||
m_ContentType: 2
|
||||
m_InputType: 0
|
||||
m_AsteriskChar: 42
|
||||
m_KeyboardType: 4
|
||||
m_LineType: 0
|
||||
m_HideMobileInput: 0
|
||||
m_CharacterValidation: 1
|
||||
m_CharacterLimit: 0
|
||||
m_OnEndEdit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 289162993}
|
||||
m_TargetAssemblyTypeName: StartSceneEnemyNumChanger, Assembly-CSharp
|
||||
m_MethodName: onValueChanged
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
m_ShouldActivateOnSelect: 1
|
||||
--- !u!114 &409680778
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409680775}
|
||||
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: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &409680779
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 409680775}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &473186478
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2432,6 +2640,85 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 808693437}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &830483180
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 830483181}
|
||||
- component: {fileID: 830483183}
|
||||
- component: {fileID: 830483182}
|
||||
m_Layer: 5
|
||||
m_Name: Placeholder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &830483181
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 830483180}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 409680776}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 5, y: 0}
|
||||
m_SizeDelta: {x: -10, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &830483182
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 830483180}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 979318e2cdafc0e43bfd56bb63011857, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 2
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 3
|
||||
--- !u!222 &830483183
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 830483180}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &846094854
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3806,6 +4093,7 @@ RectTransform:
|
||||
- {fileID: 1539152182}
|
||||
- {fileID: 1546066800}
|
||||
- {fileID: 2046915484}
|
||||
- {fileID: 289162992}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -3984,8 +4272,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 52ba7faaa6129cf418f26c5933d4ea0e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
LoadDirDate: 0
|
||||
LoadDirTime: 0
|
||||
nonRewardDefault: -0.05
|
||||
shootRewardDefault: -0.06
|
||||
shootWithoutReadyRewardDefault: -0.06
|
||||
@@ -3993,15 +4279,7 @@ MonoBehaviour:
|
||||
killRewardDefault: 10
|
||||
winRewardDefault: 20
|
||||
loseRewardDefault: -10
|
||||
nonReward: 0
|
||||
shootReward: 0
|
||||
shootWithoutReadyReward: 0
|
||||
hitReward: 0
|
||||
killReward: 0
|
||||
winReward: 0
|
||||
loseReward: 0
|
||||
DecisionPeriod: 1
|
||||
ActionsBetweenDecisions: 0
|
||||
EnemyNumDefault: 3
|
||||
--- !u!4 &1483319558
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4246,7 +4524,7 @@ RectTransform:
|
||||
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: 305.43787, y: 0}
|
||||
m_AnchoredPosition: {x: 286.9, y: 0.5}
|
||||
m_SizeDelta: {x: 247.8758, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1633180793
|
||||
@@ -4543,6 +4821,85 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1733870682}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1746261328
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1746261329}
|
||||
- component: {fileID: 1746261331}
|
||||
- component: {fileID: 1746261330}
|
||||
m_Layer: 5
|
||||
m_Name: EnemyNumText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1746261329
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1746261328}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 289162992}
|
||||
m_RootOrder: 1
|
||||
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: -48.5, y: 0}
|
||||
m_SizeDelta: {x: 80, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1746261330
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1746261328}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 979318e2cdafc0e43bfd56bb63011857, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Enemy Num
|
||||
--- !u!222 &1746261331
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1746261328}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1768793742
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5171,6 +5528,85 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1952163554}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1963132019
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1963132020}
|
||||
- component: {fileID: 1963132022}
|
||||
- component: {fileID: 1963132021}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1963132020
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963132019}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 409680776}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: -20, y: -13}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1963132021
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963132019}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 0
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!222 &1963132022
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963132019}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1982556590
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5361,8 +5797,8 @@ RectTransform:
|
||||
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: 85.2, y: 0}
|
||||
m_SizeDelta: {x: 160, y: 20}
|
||||
m_AnchoredPosition: {x: 81.57973, y: 0}
|
||||
m_SizeDelta: {x: 152.7595, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2025428252
|
||||
MonoBehaviour:
|
||||
@@ -5464,7 +5900,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 207.1, y: -287.3}
|
||||
m_AnchoredPosition: {x: 214, y: -317.9}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2046915485
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a21ce0a6cd8625d40a303acfa21d924c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+3
@@ -99,6 +99,9 @@ public class AgentWithGun : Agent
|
||||
HistoryRec = transform.GetComponent<HistoryRecorder>();
|
||||
rayScript = GetComponent<RaySensors>();
|
||||
|
||||
// Enemy Num
|
||||
enemyNum = DataTransfer.EnemyNum;
|
||||
|
||||
// get load directory.
|
||||
LoadDirDate = DataTransfer.LoadDirDate;
|
||||
LoadDirTime = DataTransfer.LoadDirTime;
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RealTimeEnemyNumChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
|
||||
public InputField enemyNumInputField;
|
||||
public Text enemyNumPlaceholder;
|
||||
public Text enemyNumAddInfoText;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
enemyNumAddInfoText.text = "";
|
||||
}
|
||||
|
||||
public void nonRBTPresses()
|
||||
{
|
||||
if (enemyNumInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
enemyNumPlaceholder.color = Color.red;
|
||||
enemyNumPlaceholder.text = "Wrong Type!";
|
||||
enemyNumInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (enemyNumInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
enemyNumPlaceholder.color = Color.gray;
|
||||
enemyNumPlaceholder.text = "nonR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
enemyNumPlaceholder.color = Color.gray;
|
||||
enemyNumPlaceholder.text = "nonR";
|
||||
string num = enemyNumInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().enemyNum = Math.Abs(int.Parse(num));
|
||||
enemyNumInputField.GetComponent<InputField>().text = "";
|
||||
enemyNumAddInfoText.text = $"Enemy Num = {num} add Success. Valid in the next round.";
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1f4766daac5b854db2634c914619261
|
||||
guid: 137cfd15c80550b4589b3dce99ff2d09
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -0,0 +1,207 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RealTimeRewardChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
|
||||
public InputField nonRInputField;
|
||||
public InputField shootRInputField;
|
||||
public InputField shootWithoutReadyRInputField;
|
||||
public InputField hitRInputField;
|
||||
public InputField killRInputField;
|
||||
public InputField winRInputField;
|
||||
public InputField loseRInputField;
|
||||
|
||||
public Text nonRPlaceholder;
|
||||
public Text shootRPlaceholder;
|
||||
public Text shootWithoutReadyRPlaceholder;
|
||||
public Text hitRPlaceholder;
|
||||
public Text killRPlaceholder;
|
||||
public Text winRPlaceholder;
|
||||
public Text loseRPlaceholder;
|
||||
|
||||
|
||||
public void nonRBTPresses()
|
||||
{
|
||||
if (nonRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
nonRPlaceholder.color = Color.red;
|
||||
nonRPlaceholder.text = "Wrong Type!";
|
||||
nonRInputField.GetComponent<InputField>().text = "";
|
||||
}else if (nonRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
nonRPlaceholder.color = Color.gray;
|
||||
nonRPlaceholder.text = "nonR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
nonRPlaceholder.color = Color.gray;
|
||||
nonRPlaceholder.text = "nonR";
|
||||
string reward = nonRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().nonReward = float.Parse(reward);
|
||||
nonRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void shootRBTPresses()
|
||||
{
|
||||
if (shootRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
shootRPlaceholder.color = Color.red;
|
||||
shootRPlaceholder.text = "Wrong Type!";
|
||||
shootRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (shootRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
shootRPlaceholder.color = Color.gray;
|
||||
shootRPlaceholder.text = "shootR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
shootRPlaceholder.color = Color.gray;
|
||||
shootRPlaceholder.text = "shootR";
|
||||
string reward = shootRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().shootReward = float.Parse(reward);
|
||||
shootRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void shootWithoutReadyRBTPresses()
|
||||
{
|
||||
if (shootWithoutReadyRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
shootWithoutReadyRPlaceholder.color = Color.red;
|
||||
shootWithoutReadyRPlaceholder.text = "Wrong Type!";
|
||||
shootWithoutReadyRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (shootWithoutReadyRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
shootWithoutReadyRPlaceholder.color = Color.gray;
|
||||
shootWithoutReadyRPlaceholder.text = "SWORR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
shootWithoutReadyRPlaceholder.color = Color.gray;
|
||||
shootWithoutReadyRPlaceholder.text = "SWORR";
|
||||
string reward = shootWithoutReadyRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().shootWithoutReadyReward = float.Parse(reward);
|
||||
shootWithoutReadyRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void hitRBTPresses()
|
||||
{
|
||||
if (hitRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
hitRPlaceholder.color = Color.red;
|
||||
hitRPlaceholder.text = "Wrong Type!";
|
||||
hitRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (hitRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
hitRPlaceholder.color = Color.gray;
|
||||
hitRPlaceholder.text = "hitR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
hitRPlaceholder.color = Color.gray;
|
||||
hitRPlaceholder.text = "hitR";
|
||||
string reward = hitRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().hitReward = float.Parse(reward);
|
||||
hitRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void killRBTPresses()
|
||||
{
|
||||
if (killRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
killRPlaceholder.color = Color.red;
|
||||
killRPlaceholder.text = "Wrong Type!";
|
||||
killRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (killRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
killRPlaceholder.color = Color.gray;
|
||||
killRPlaceholder.text = "killR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
killRPlaceholder.color = Color.gray;
|
||||
killRPlaceholder.text = "killR";
|
||||
string reward = killRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().killReward = float.Parse(reward);
|
||||
killRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void winRBTPresses()
|
||||
{
|
||||
if (winRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
winRPlaceholder.color = Color.red;
|
||||
winRPlaceholder.text = "Wrong Type!";
|
||||
winRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (winRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
winRPlaceholder.color = Color.gray;
|
||||
winRPlaceholder.text = "winR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
winRPlaceholder.color = Color.gray;
|
||||
winRPlaceholder.text = "winR";
|
||||
string reward = winRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().winReward = float.Parse(reward);
|
||||
winRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void loseRBTPresses()
|
||||
{
|
||||
if (loseRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
loseRPlaceholder.color = Color.red;
|
||||
loseRPlaceholder.text = "Wrong Type!";
|
||||
loseRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
else if (loseRInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
loseRPlaceholder.color = Color.gray;
|
||||
loseRPlaceholder.text = "loseR";
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
loseRPlaceholder.color = Color.gray;
|
||||
loseRPlaceholder.text = "loseR";
|
||||
string reward = loseRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().loseReward = float.Parse(reward);
|
||||
loseRInputField.GetComponent<InputField>().text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e23822cccaf08084ab5cde559ca068e0
|
||||
guid: f31155528181e24438cf507311adf048
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -1,17 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class OnCam : MonoBehaviour
|
||||
{
|
||||
public void OnBecameInvisible()
|
||||
{
|
||||
Debug.Log("I SEE U");
|
||||
}
|
||||
|
||||
// ...and enable it again when it becomes visible.
|
||||
public void OnBecameVisible()
|
||||
{
|
||||
Debug.Log("NO Visual");
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RewardChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
|
||||
public Button nonRBT;
|
||||
public Button shootRBT;
|
||||
public Button shootWithoutReadyRBT;
|
||||
public Button hitRBT;
|
||||
public Button killRBT;
|
||||
public Button winRBT;
|
||||
public Button loseRBT;
|
||||
|
||||
public InputField nonRInputField;
|
||||
public InputField shootRInputField;
|
||||
public InputField shootWithoutReadyRInputField;
|
||||
public InputField hitRInputField;
|
||||
public InputField killRInputField;
|
||||
public InputField winRInputField;
|
||||
public InputField loseRInputField;
|
||||
|
||||
|
||||
public void nonRBTPresses(){
|
||||
string reward = nonRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().nonReward = float.Parse(reward);
|
||||
}
|
||||
public void shootRBTPresses(){
|
||||
string reward = shootRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().shootReward = float.Parse(reward);
|
||||
}
|
||||
public void shootWithoutReadyRBTPresses(){
|
||||
string reward = shootWithoutReadyRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().shootWithoutReadyReward = float.Parse(reward);
|
||||
}
|
||||
public void hitRBTPresses(){
|
||||
string reward = hitRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().hitReward = float.Parse(reward);
|
||||
}
|
||||
public void killRBTPresses(){
|
||||
string reward = killRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().killReward = float.Parse(reward);
|
||||
}
|
||||
public void winRBTPresses(){
|
||||
string reward = winRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().winReward = float.Parse(reward);
|
||||
}
|
||||
public void loseRBTPresses(){
|
||||
string reward = loseRInputField.GetComponent<InputField>().text;
|
||||
Agent.GetComponent<AgentWithGun>().loseReward = float.Parse(reward);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58aaf9e292ab84e488d6a832943252d0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+7
-7
@@ -34,7 +34,7 @@ public class RewardsChange : MonoBehaviour
|
||||
|
||||
public void nonRValueChanged()
|
||||
{
|
||||
if (nonRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if (nonRInputOBJ.GetComponent<InputField>().text == "" || nonRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
nonRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().nonReward = DataTransfer.GetComponent<StartSeneData>().nonRewardDefault;
|
||||
@@ -47,7 +47,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void shootRValueChanged()
|
||||
{
|
||||
if (shootRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if (shootRInputOBJ.GetComponent<InputField>().text == "" || shootRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
shootRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootReward = DataTransfer.GetComponent<StartSeneData>().shootRewardDefault;
|
||||
@@ -59,7 +59,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void shootWOReadyRValueChanged()
|
||||
{
|
||||
if(shootWithoutReadyRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if(shootWithoutReadyRInputOBJ.GetComponent<InputField>().text == "" || shootWithoutReadyRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
shootWithoutReadyRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().shootWithoutReadyReward = DataTransfer.GetComponent<StartSeneData>().shootWithoutReadyRewardDefault;
|
||||
@@ -71,7 +71,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void hitRValueChanged()
|
||||
{
|
||||
if(hitRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if(hitRInputOBJ.GetComponent<InputField>().text == "" || hitRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
hitRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().hitReward = DataTransfer.GetComponent<StartSeneData>().hitRewardDefault;
|
||||
@@ -83,7 +83,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void winRValueChanged()
|
||||
{
|
||||
if(winRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if(winRInputOBJ.GetComponent<InputField>().text == "" || winRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
winRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().winReward = DataTransfer.GetComponent<StartSeneData>().winRewardDefault;
|
||||
@@ -95,7 +95,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void loseRValueChanged()
|
||||
{
|
||||
if(loseRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if(loseRInputOBJ.GetComponent<InputField>().text == "" || loseRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
loseRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().loseReward = DataTransfer.GetComponent<StartSeneData>().loseRewardDefault;
|
||||
@@ -107,7 +107,7 @@ public class RewardsChange : MonoBehaviour
|
||||
}
|
||||
public void killRValueChanged()
|
||||
{
|
||||
if(killRInputOBJ.GetComponent<InputField>().text == "")
|
||||
if(killRInputOBJ.GetComponent<InputField>().text == "" || killRInputOBJ.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
killRInputText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().killReward = DataTransfer.GetComponent<StartSeneData>().killRewardDefault;
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class StartSceneEnemyNumChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject DataTransfer;
|
||||
public InputField EnemyNumInput;
|
||||
public Text EnemyNumText;
|
||||
|
||||
public void onValueChanged()
|
||||
{
|
||||
if (EnemyNumInput.GetComponent<InputField>().text == "" || EnemyNumInput.GetComponent<InputField>().text.Contains("-"))
|
||||
{
|
||||
EnemyNumText.color = Color.gray;
|
||||
DataTransfer.GetComponent<StartSeneData>().nonReward = DataTransfer.GetComponent<StartSeneData>().EnemyNumDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
EnemyNumText.color = Color.yellow;
|
||||
DataTransfer.GetComponent<StartSeneData>().EnemyNum = Math.Abs(int.Parse(EnemyNumInput.GetComponent<InputField>().text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64d0bcf55e4db0c488996ba1051c279f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+20
-13
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class StartSeneData : MonoBehaviour
|
||||
{
|
||||
public string LoadDirDate = "0";
|
||||
public string LoadDirTime = "0";
|
||||
[Header("Default Rewards")]
|
||||
public float nonRewardDefault = -0.05f;
|
||||
public float shootRewardDefault = -0.06f;
|
||||
@@ -15,18 +14,26 @@ public class StartSeneData : MonoBehaviour
|
||||
public float winRewardDefault = 20.0f;
|
||||
public float loseRewardDefault = -10.0f;
|
||||
|
||||
[Header("Rewards for Transfer")]
|
||||
public float nonReward;
|
||||
public float shootReward;
|
||||
public float shootWithoutReadyReward;
|
||||
public float hitReward;
|
||||
public float killReward;
|
||||
public float winReward;
|
||||
public float loseReward;
|
||||
// LoadDir
|
||||
[System.NonSerialized]public string LoadDirDate = "0";
|
||||
[System.NonSerialized]public string LoadDirTime = "0";
|
||||
|
||||
[Header("Decision Period")]
|
||||
public int DecisionPeriod = 1;
|
||||
public bool ActionsBetweenDecisions = true;
|
||||
// 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
|
||||
public int EnemyNumDefault = 3;
|
||||
[System.NonSerialized]public int EnemyNum = 3;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Reference in New Issue
Block a user