Parallel environment.
delete all unuse feature for Parallel environment. it's possible to run each single environment independent
This commit is contained in:
parent
6bc1456e4b
commit
ad547e4edb
25
Assets/EnviromentUIControl.cs
Normal file
25
Assets/EnviromentUIControl.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EnviromentUIControl : MonoBehaviour
|
||||
{
|
||||
public GameObject agentObj;
|
||||
public TextMeshProUGUI remainTimeText;
|
||||
private AgentWithGun agentScript;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
agentScript = agentObj.GetComponent<AgentWithGun>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
int remainTime = agentScript.remainTime;
|
||||
remainTimeText.text = "RemainTime:" + remainTime.ToString();
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a3e891536ddde24b86cbac3ad3837e6
|
||||
guid: e3ddb0247fbea1b4799dd33b60ab4f12
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -0,0 +1,332 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Prototype_512x512_Red 1
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _ALPHABLEND_ON _DISABLE_SSR_TRANSPARENT _NORMALMAP _NORMALMAP_TANGENT_SPACE
|
||||
_SPECULARHIGHLIGHTS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- DistortionVectors
|
||||
- MOTIONVECTORS
|
||||
- TransparentDepthPrepass
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AnisotropyMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 2800000, guid: 3d6064e2e1cd7214e9f67f3a68f494fb, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 3d6064e2e1cd7214e9f67f3a68f494fb, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 44ae09ed76086b14e82d37feb30c7650, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _CoatMaskMap:
|
||||
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}
|
||||
- _DetailMap:
|
||||
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}
|
||||
- _DistortionVectorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 100, y: 100}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissiveColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _HeightMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 3d6064e2e1cd7214e9f67f3a68f494fb, type: 3}
|
||||
m_Scale: {x: 100, y: 100}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
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}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 2800000, guid: 44ae09ed76086b14e82d37feb30c7650, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMapOS:
|
||||
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}
|
||||
- _SpecularColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SubsurfaceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TransmittanceColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _AORemapMax: 1
|
||||
- _AORemapMin: 0
|
||||
- _ATDistance: 1
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlbedoAffectEmissive: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaCutoffEnable: 0
|
||||
- _AlphaCutoffPostpass: 0.5
|
||||
- _AlphaCutoffPrepass: 0.5
|
||||
- _AlphaCutoffShadow: 0.5
|
||||
- _AlphaDstBlend: 0
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _AlphaToMaskInspectorValue: 0
|
||||
- _Anisotropy: 0
|
||||
- _Blend: 0
|
||||
- _BlendMode: 0
|
||||
- _BumpScale: 1
|
||||
- _CoatMask: 0
|
||||
- _Cull: 2
|
||||
- _CullMode: 2
|
||||
- _CullModeForward: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DetailAlbedoScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DetailNormalScale: 1
|
||||
- _DetailSmoothnessScale: 1
|
||||
- _DiffusionProfile: 0
|
||||
- _DiffusionProfileHash: 0
|
||||
- _DisplacementLockObjectScale: 1
|
||||
- _DisplacementLockTilingScale: 1
|
||||
- _DisplacementMode: 0
|
||||
- _DistortionBlendMode: 0
|
||||
- _DistortionBlurBlendMode: 0
|
||||
- _DistortionBlurDstBlend: 1
|
||||
- _DistortionBlurRemapMax: 1
|
||||
- _DistortionBlurRemapMin: 0
|
||||
- _DistortionBlurScale: 1
|
||||
- _DistortionBlurSrcBlend: 1
|
||||
- _DistortionDepthTest: 1
|
||||
- _DistortionDstBlend: 1
|
||||
- _DistortionEnable: 0
|
||||
- _DistortionScale: 1
|
||||
- _DistortionSrcBlend: 1
|
||||
- _DistortionVectorBias: -1
|
||||
- _DistortionVectorScale: 2
|
||||
- _DoubleSidedEnable: 0
|
||||
- _DoubleSidedNormalMode: 1
|
||||
- _DstBlend: 10
|
||||
- _EmissiveColorMode: 1
|
||||
- _EmissiveExposureWeight: 1
|
||||
- _EmissiveIntensity: 1
|
||||
- _EmissiveIntensityUnit: 0
|
||||
- _EnableBlendModePreserveSpecularLighting: 1
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _EnableGeometricSpecularAA: 0
|
||||
- _EnergyConservingSpecularColor: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossinessSource: 0
|
||||
- _GlossyReflections: 1
|
||||
- _HeightAmplitude: 0.02
|
||||
- _HeightCenter: 0.5
|
||||
- _HeightMapParametrization: 0
|
||||
- _HeightMax: 1
|
||||
- _HeightMin: -1
|
||||
- _HeightOffset: 0
|
||||
- _HeightPoMAmplitude: 2
|
||||
- _HeightTessAmplitude: 2
|
||||
- _HeightTessCenter: 0.5
|
||||
- _InvTilingScale: 1
|
||||
- _Ior: 1.5
|
||||
- _IridescenceMask: 1
|
||||
- _IridescenceThickness: 1
|
||||
- _LinkDetailsWithBase: 1
|
||||
- _MaterialID: 1
|
||||
- _Metallic: 0
|
||||
- _MetallicRemapMax: 0
|
||||
- _MetallicRemapMin: 0
|
||||
- _Mode: 2
|
||||
- _NormalMapSpace: 0
|
||||
- _NormalScale: 1
|
||||
- _OcclusionStrength: 1
|
||||
- _OpaqueCullMode: 2
|
||||
- _PPDLodThreshold: 5
|
||||
- _PPDMaxSamples: 15
|
||||
- _PPDMinSamples: 5
|
||||
- _PPDPrimitiveLength: 1
|
||||
- _PPDPrimitiveWidth: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _RayTracing: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 0
|
||||
- _RefractionModel: 0
|
||||
- _SSRefractionProjectionModel: 0
|
||||
- _Shininess: 0
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessRemapMax: 1
|
||||
- _SmoothnessRemapMin: 0
|
||||
- _SmoothnessSource: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecSource: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 0
|
||||
- _SpecularOcclusionMode: 1
|
||||
- _SrcBlend: 5
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 8
|
||||
- _StencilRefDistortionVec: 4
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 8
|
||||
- _StencilWriteMaskDistortionVec: 4
|
||||
- _StencilWriteMaskGBuffer: 14
|
||||
- _StencilWriteMaskMV: 40
|
||||
- _SubsurfaceMask: 1
|
||||
- _SupportDecals: 1
|
||||
- _Surface: 0
|
||||
- _SurfaceType: 0
|
||||
- _TexWorldScale: 1
|
||||
- _TexWorldScaleEmissive: 1
|
||||
- _Thickness: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 0
|
||||
- _TransparentZWrite: 0
|
||||
- _UVBase: 0
|
||||
- _UVDetail: 0
|
||||
- _UVEmissive: 0
|
||||
- _UVSec: 0
|
||||
- _UseEmissiveIntensity: 0
|
||||
- _UseShadowThreshold: 0
|
||||
- _ZTestDepthEqualForOpaque: 3
|
||||
- _ZTestGBuffer: 4
|
||||
- _ZTestModeDistortion: 4
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.12941177}
|
||||
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999993, g: 0.19999993, b: 0.19999993, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 000bfee73cbc81f49a85a2df2c5b87b2
|
||||
guid: cb4b0a68721292640b7b1b607cbc75f1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
@ -0,0 +1,332 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Prototype_512x512_Yellow 1
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _ALPHABLEND_ON _DISABLE_SSR_TRANSPARENT _NORMALMAP _NORMALMAP_TANGENT_SPACE
|
||||
_SPECULARHIGHLIGHTS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- DistortionVectors
|
||||
- MOTIONVECTORS
|
||||
- TransparentDepthPrepass
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AnisotropyMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 2800000, guid: ee12d2bc9f5c8554d97d5beb9dc4b275, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: ee12d2bc9f5c8554d97d5beb9dc4b275, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 44ae09ed76086b14e82d37feb30c7650, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _CoatMaskMap:
|
||||
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}
|
||||
- _DetailMap:
|
||||
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}
|
||||
- _DistortionVectorMap:
|
||||
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}
|
||||
- _EmissiveColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _HeightMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: ee12d2bc9f5c8554d97d5beb9dc4b275, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
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}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 2800000, guid: 44ae09ed76086b14e82d37feb30c7650, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMapOS:
|
||||
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}
|
||||
- _SpecularColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SubsurfaceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TransmittanceColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _AORemapMax: 1
|
||||
- _AORemapMin: 0
|
||||
- _ATDistance: 1
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlbedoAffectEmissive: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaCutoffEnable: 0
|
||||
- _AlphaCutoffPostpass: 0.5
|
||||
- _AlphaCutoffPrepass: 0.5
|
||||
- _AlphaCutoffShadow: 0.5
|
||||
- _AlphaDstBlend: 0
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _AlphaToMaskInspectorValue: 0
|
||||
- _Anisotropy: 0
|
||||
- _Blend: 0
|
||||
- _BlendMode: 0
|
||||
- _BumpScale: 1
|
||||
- _CoatMask: 0
|
||||
- _Cull: 2
|
||||
- _CullMode: 2
|
||||
- _CullModeForward: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DetailAlbedoScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DetailNormalScale: 1
|
||||
- _DetailSmoothnessScale: 1
|
||||
- _DiffusionProfile: 0
|
||||
- _DiffusionProfileHash: 0
|
||||
- _DisplacementLockObjectScale: 1
|
||||
- _DisplacementLockTilingScale: 1
|
||||
- _DisplacementMode: 0
|
||||
- _DistortionBlendMode: 0
|
||||
- _DistortionBlurBlendMode: 0
|
||||
- _DistortionBlurDstBlend: 1
|
||||
- _DistortionBlurRemapMax: 1
|
||||
- _DistortionBlurRemapMin: 0
|
||||
- _DistortionBlurScale: 1
|
||||
- _DistortionBlurSrcBlend: 1
|
||||
- _DistortionDepthTest: 1
|
||||
- _DistortionDstBlend: 1
|
||||
- _DistortionEnable: 0
|
||||
- _DistortionScale: 1
|
||||
- _DistortionSrcBlend: 1
|
||||
- _DistortionVectorBias: -1
|
||||
- _DistortionVectorScale: 2
|
||||
- _DoubleSidedEnable: 0
|
||||
- _DoubleSidedNormalMode: 1
|
||||
- _DstBlend: 10
|
||||
- _EmissiveColorMode: 1
|
||||
- _EmissiveExposureWeight: 1
|
||||
- _EmissiveIntensity: 1
|
||||
- _EmissiveIntensityUnit: 0
|
||||
- _EnableBlendModePreserveSpecularLighting: 1
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _EnableGeometricSpecularAA: 0
|
||||
- _EnergyConservingSpecularColor: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossinessSource: 0
|
||||
- _GlossyReflections: 1
|
||||
- _HeightAmplitude: 0.02
|
||||
- _HeightCenter: 0.5
|
||||
- _HeightMapParametrization: 0
|
||||
- _HeightMax: 1
|
||||
- _HeightMin: -1
|
||||
- _HeightOffset: 0
|
||||
- _HeightPoMAmplitude: 2
|
||||
- _HeightTessAmplitude: 2
|
||||
- _HeightTessCenter: 0.5
|
||||
- _InvTilingScale: 1
|
||||
- _Ior: 1.5
|
||||
- _IridescenceMask: 1
|
||||
- _IridescenceThickness: 1
|
||||
- _LinkDetailsWithBase: 1
|
||||
- _MaterialID: 1
|
||||
- _Metallic: 0
|
||||
- _MetallicRemapMax: 0
|
||||
- _MetallicRemapMin: 0
|
||||
- _Mode: 2
|
||||
- _NormalMapSpace: 0
|
||||
- _NormalScale: 1
|
||||
- _OcclusionStrength: 1
|
||||
- _OpaqueCullMode: 2
|
||||
- _PPDLodThreshold: 5
|
||||
- _PPDMaxSamples: 15
|
||||
- _PPDMinSamples: 5
|
||||
- _PPDPrimitiveLength: 1
|
||||
- _PPDPrimitiveWidth: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _RayTracing: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 0
|
||||
- _RefractionModel: 0
|
||||
- _SSRefractionProjectionModel: 0
|
||||
- _Shininess: 0
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessRemapMax: 1
|
||||
- _SmoothnessRemapMin: 0
|
||||
- _SmoothnessSource: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecSource: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 0
|
||||
- _SpecularOcclusionMode: 1
|
||||
- _SrcBlend: 5
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 8
|
||||
- _StencilRefDistortionVec: 4
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 8
|
||||
- _StencilWriteMaskDistortionVec: 4
|
||||
- _StencilWriteMaskGBuffer: 14
|
||||
- _StencilWriteMaskMV: 40
|
||||
- _SubsurfaceMask: 1
|
||||
- _SupportDecals: 1
|
||||
- _Surface: 0
|
||||
- _SurfaceType: 0
|
||||
- _TexWorldScale: 1
|
||||
- _TexWorldScaleEmissive: 1
|
||||
- _Thickness: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 0
|
||||
- _TransparentZWrite: 0
|
||||
- _UVBase: 0
|
||||
- _UVDetail: 0
|
||||
- _UVEmissive: 0
|
||||
- _UVSec: 0
|
||||
- _UseEmissiveIntensity: 0
|
||||
- _UseShadowThreshold: 0
|
||||
- _ZTestDepthEqualForOpaque: 3
|
||||
- _ZTestGBuffer: 4
|
||||
- _ZTestModeDistortion: 4
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.15686275}
|
||||
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999993, g: 0.19999993, b: 0.19999993, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -1,7 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc168544586b83f47a73568842170c14
|
||||
DefaultImporter:
|
||||
guid: 71d30c0ead4574a478dd27c3cb3dac4d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,78 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: prototype_512x512_yellow
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
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: ee12d2bc9f5c8554d97d5beb9dc4b275, 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}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -1 +1 @@
|
||||
{"count":1,"self":8.29834,"total":8.3840507,"children":{"InitializeActuators":{"count":2,"self":0.0015002,"total":0.0015002,"children":null},"InitializeSensors":{"count":2,"self":0.0020851999999999997,"total":0.0020851999999999997,"children":null},"AgentSendState":{"count":177,"self":0.0020038,"total":0.0305444,"children":{"CollectObservations":{"count":177,"self":0.027041899999999997,"total":0.027041899999999997,"children":null},"WriteActionMask":{"count":176,"self":0,"total":0,"children":null},"RequestDecision":{"count":176,"self":0.0014987,"total":0.0014987,"children":null}}},"DecideAction":{"count":176,"self":0.0015013,"total":0.0015013,"children":null},"AgentAct":{"count":176,"self":0.049079,"total":0.049079,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1666723865","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -createproject C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -cloneFromTemplate C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Data\\Resources\\PackageManager\\ProjectTemplates\\com.unity.template.3d-5.0.4.tgz -cloudOrganization -cloudEnvironment production -useHub -hubIPC -hubSessionId 208a5b10-5492-11ed-86d0-77f1dee37fca -accessToken jWLleZEe05t6Ag-hm9NYl5I5jN05osnA3bzkODLG62400ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"InGame","end_time_seconds":"1666723873"}}
|
||||
{"count":1,"self":31.442832,"total":32.9823634,"children":{"InitializeActuators":{"count":8,"self":0.0020017999999999998,"total":0.0020017999999999998,"children":null},"InitializeSensors":{"count":8,"self":0.0015046999999999999,"total":0.0015046999999999999,"children":null},"AgentSendState":{"count":1371,"self":0.0200275,"total":0.5900679,"children":{"CollectObservations":{"count":5481,"self":0.5604736,"total":0.5604736,"children":null},"WriteActionMask":{"count":5480,"self":0.0024996,"total":0.0024996,"children":null},"RequestDecision":{"count":5480,"self":0.0070672,"total":0.0070672,"children":null}}},"DecideAction":{"count":1370,"self":0.018549899999999998,"total":0.018549899999999998,"children":null},"AgentAct":{"count":1370,"self":0.92590529999999993,"total":0.92590529999999993,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":8,"max":-24.9999046,"min":-24.9999046,"runningAverage":-24.9999046,"value":-24.9999046,"weightedAverage":-24.9999046}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1666748001","unity_version":"2020.3.19f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Unity.exe -createproject C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -cloneFromTemplate C:\\Program Files\\Unity\\Hub\\Editor\\2020.3.19f1\\Editor\\Data\\Resources\\PackageManager\\ProjectTemplates\\com.unity.template.3d-5.0.4.tgz -cloudOrganization -cloudEnvironment production -useHub -hubIPC -hubSessionId 208a5b10-5492-11ed-86d0-77f1dee37fca -accessToken jWLleZEe05t6Ag-hm9NYl5I5jN05osnA3bzkODLG62400ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"InGame","end_time_seconds":"1666748034"}}
|
File diff suppressed because it is too large
Load Diff
@ -1,267 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 705507995}
|
||||
- component: {fileID: 705507994}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &705507994
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &705507995
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &963194225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 963194228}
|
||||
- component: {fileID: 963194227}
|
||||
- component: {fileID: 963194226}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &963194226
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &963194227
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_GateFitMode: 2
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &963194228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -11,17 +11,24 @@
|
||||
using Unity.MLAgents.Actuators;
|
||||
using XCharts;
|
||||
using XCharts.Runtime;
|
||||
using System.Linq;
|
||||
|
||||
/*主要ML-Agent控制*/
|
||||
|
||||
public class AgentWithGun : Agent
|
||||
{
|
||||
public GameObject EnviromentObj;
|
||||
public GameObject EnemyContainerObj;
|
||||
public GameObject thisAgentObj;
|
||||
public Transform thisAgent;
|
||||
public Camera thisCam;
|
||||
public CharacterController PlayerController;
|
||||
public GameObject enemyPrefab;
|
||||
public GameObject cameraChangerOBJ;
|
||||
public GameObject edgeUp;
|
||||
public GameObject edgeDown;
|
||||
public GameObject edgeLeft;
|
||||
public GameObject edgeRight;
|
||||
public GameObject edgeAgent_Enemy;
|
||||
|
||||
|
||||
[Header("Rewards")]
|
||||
@ -36,7 +43,7 @@ public class AgentWithGun : Agent
|
||||
[Tooltip("Episode Win reward")]
|
||||
public float winRewardDefault = 10.0f;
|
||||
[Tooltip("Episode Lose reward")]
|
||||
public float loseRewardDefault = -10.0f;
|
||||
public float loseRewardDefault = -0.05f;
|
||||
[Tooltip("Enemy down reward")]
|
||||
public float killRewardDefault = 5.0f;
|
||||
|
||||
@ -49,14 +56,6 @@ public class AgentWithGun : Agent
|
||||
public bool lockCameraX = false;
|
||||
public bool lockCameraY = true;
|
||||
//public Vector3 startPosition = new Vector3(9, 1, 18);
|
||||
public int minEnemyAreaX = -12;
|
||||
public int maxEnemyAreaX = 11;
|
||||
public int minEnemyAreaY = -20;
|
||||
public int maxEnemyAreaY = 20;
|
||||
public int minAgentAreaX = -12;
|
||||
public int maxAgentAreaX = 11;
|
||||
public int minAgentAreaY = -28;
|
||||
public int maxAgentAreaY = -22;
|
||||
|
||||
[Header("GetAxis() Simulate")]
|
||||
public float MoveSpeed = 2.0f;
|
||||
@ -74,18 +73,18 @@ public class AgentWithGun : Agent
|
||||
private int enemyKillCount = 0;
|
||||
private int step = 0;
|
||||
private int EP = 0;
|
||||
private string LoadDirDate;
|
||||
private string LoadDirTime;
|
||||
private float LoadDirDateF;
|
||||
private float loadDirTimeF;
|
||||
public bool defaultTPCamera = true;
|
||||
private bool gunReadyToggle = true;
|
||||
private StartSeneData DataTransfer;
|
||||
private UIController UICon;
|
||||
private HistoryRecorder HistoryRec;
|
||||
private RaySensors rayScript;
|
||||
private CameraChange camChanger;
|
||||
|
||||
[System.NonSerialized] public float minEnemyAreaX;
|
||||
[System.NonSerialized] public float maxEnemyAreaX;
|
||||
[System.NonSerialized] public float minEnemyAreaZ;
|
||||
[System.NonSerialized] public float maxEnemyAreaZ;
|
||||
[System.NonSerialized] public float minAgentAreaX;
|
||||
[System.NonSerialized] public float maxAgentAreaX;
|
||||
[System.NonSerialized] public float minAgentAreaZ;
|
||||
[System.NonSerialized] public float maxAgentAreaZ;
|
||||
|
||||
[System.NonSerialized] public float nonReward;
|
||||
[System.NonSerialized] public float shootReward;
|
||||
@ -94,98 +93,32 @@ public class AgentWithGun : Agent
|
||||
[System.NonSerialized] public float winReward;
|
||||
[System.NonSerialized] public float loseReward;
|
||||
[System.NonSerialized] public float killReward;
|
||||
[System.NonSerialized] public float saveNow = 0;
|
||||
[System.NonSerialized] public int remainTime;
|
||||
|
||||
|
||||
void Start()
|
||||
private void Start()
|
||||
{
|
||||
try
|
||||
{
|
||||
// get DataTranfer
|
||||
DataTransfer = GameObject.Find("StartSeneDataTransfer").GetComponent<StartSeneData>();
|
||||
// Enemy Num
|
||||
enemyNum = DataTransfer.EnemyNum;
|
||||
rayScript = GetComponent<RaySensors>();
|
||||
// give default Reward to Reward value will be used.
|
||||
nonReward = nonRewardDefault;
|
||||
shootReward = shootRewardDefault;
|
||||
shootWithoutReadyReward = shootWithoutReadyRewardDefault;
|
||||
hitReward = hitRewardDefault;
|
||||
winReward = winRewardDefault;
|
||||
loseReward = loseRewardDefault;
|
||||
killReward = killRewardDefault;
|
||||
//initialize remainTime
|
||||
remainTime = (int)(timeLimit - Time.time + startTime);
|
||||
|
||||
// Time Limit
|
||||
timeLimit = DataTransfer.Timelim;
|
||||
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;
|
||||
|
||||
// get load directory.
|
||||
LoadDirDate = DataTransfer.LoadDirDate;
|
||||
LoadDirTime = DataTransfer.LoadDirTime;
|
||||
LoadDirDateF = float.Parse(LoadDirDate);
|
||||
loadDirTimeF = float.Parse(LoadDirTime);
|
||||
|
||||
// get Default reward.
|
||||
nonRewardDefault = DataTransfer.nonReward;
|
||||
shootRewardDefault = DataTransfer.shootReward;
|
||||
shootWithoutReadyRewardDefault = DataTransfer.shootWithoutReadyReward;
|
||||
hitRewardDefault = DataTransfer.hitReward;
|
||||
killRewardDefault = DataTransfer.killReward;
|
||||
winRewardDefault = DataTransfer.winReward;
|
||||
loseRewardDefault = DataTransfer.loseReward;
|
||||
lockMouse = DataTransfer.lockMouse;
|
||||
defaultTPCamera = DataTransfer.defaultTPCamera;
|
||||
|
||||
// change Decision Period & Take Actions Between Decisions
|
||||
transform.GetComponent<DecisionRequester>().DecisionPeriod = DataTransfer.DecisionPeriod;
|
||||
transform.GetComponent<DecisionRequester>().TakeActionsBetweenDecisions = DataTransfer.ActionsBetweenDecisions;
|
||||
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
// Enemy Num
|
||||
enemyNum = 3;
|
||||
|
||||
// Time Limit
|
||||
timeLimit = 30;
|
||||
|
||||
// get load directory.
|
||||
LoadDirDate = "0";
|
||||
LoadDirTime = "0";
|
||||
LoadDirDateF = float.Parse(LoadDirDate);
|
||||
loadDirTimeF = float.Parse(LoadDirTime);
|
||||
|
||||
// get Default reward.
|
||||
nonRewardDefault = -0.05f;
|
||||
shootRewardDefault = -0.06f;
|
||||
shootWithoutReadyRewardDefault = -0.06f;
|
||||
hitRewardDefault = 5.0f;
|
||||
killRewardDefault = 10.0f;
|
||||
winRewardDefault = 20.0f;
|
||||
loseRewardDefault = -10.0f;
|
||||
|
||||
// change Decision Period & Take Actions Between Decisions
|
||||
transform.GetComponent<DecisionRequester>().DecisionPeriod = 1;
|
||||
transform.GetComponent<DecisionRequester>().TakeActionsBetweenDecisions = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
UICon = transform.GetComponent<UIController>();
|
||||
HistoryRec = transform.GetComponent<HistoryRecorder>();
|
||||
rayScript = GetComponent<RaySensors>();
|
||||
camChanger = cameraChangerOBJ.GetComponent<CameraChange>();
|
||||
|
||||
// give default Reward to Reward value will be used.
|
||||
nonReward = nonRewardDefault;
|
||||
shootReward = shootRewardDefault;
|
||||
shootWithoutReadyReward = shootWithoutReadyRewardDefault;
|
||||
hitReward = hitRewardDefault;
|
||||
winReward = winRewardDefault;
|
||||
loseReward = loseRewardDefault;
|
||||
killReward = killRewardDefault;
|
||||
//initialize remainTime
|
||||
remainTime = (int)(timeLimit - Time.time + startTime);
|
||||
// change default camera view
|
||||
if (defaultTPCamera)
|
||||
{
|
||||
camChanger.ShowTPSView();
|
||||
}
|
||||
else
|
||||
{
|
||||
camChanger.ShowFPSView();
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
/* ----------此Update用于debug,Build前删除或注释掉!----------*/
|
||||
@ -201,10 +134,10 @@ public void randomInitEnemys(int EnemyNum)
|
||||
{
|
||||
for (int i = 0; i < EnemyNum; i++)
|
||||
{
|
||||
int randX = UnityEngine.Random.Range(minEnemyAreaX, maxEnemyAreaX);
|
||||
int randZ = UnityEngine.Random.Range(minEnemyAreaY, maxEnemyAreaY);
|
||||
float randX = UnityEngine.Random.Range(minEnemyAreaX, maxEnemyAreaX);
|
||||
float randZ = UnityEngine.Random.Range(minEnemyAreaZ, maxEnemyAreaZ);
|
||||
int Y = 1;
|
||||
Instantiate(enemyPrefab, new Vector3(randX, Y, randZ), Quaternion.identity);
|
||||
Instantiate(enemyPrefab, new Vector3(randX, Y, randZ) + EnviromentObj.transform.position, Quaternion.identity, EnemyContainerObj.transform);
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,8 +145,8 @@ public void randomInitEnemys(int EnemyNum)
|
||||
// randomInitAgent随机位置初始化Agent
|
||||
public void randomInitAgent()
|
||||
{
|
||||
int randX = UnityEngine.Random.Range(minAgentAreaX, maxAgentAreaX);
|
||||
int randZ = UnityEngine.Random.Range(minAgentAreaY, maxAgentAreaY);
|
||||
float randX = UnityEngine.Random.Range(minAgentAreaX, maxAgentAreaX);
|
||||
float randZ = UnityEngine.Random.Range(minAgentAreaZ, maxAgentAreaZ);
|
||||
int Y = 1;
|
||||
Vector3 initAgentLoc = new Vector3(randX, Y, randZ);
|
||||
thisAgent.localPosition = initAgentLoc;
|
||||
@ -358,7 +291,6 @@ float ballistic()
|
||||
Ray ray = thisCam.ScreenPointToRay(point);
|
||||
RaycastHit hit;
|
||||
Debug.DrawRay(ray.origin, ray.direction * 100, Color.blue);
|
||||
UICon.updateShootKeyViewer(shoot, gunReadyToggle);
|
||||
//按下鼠标左键
|
||||
if (shoot != 0 && gunReadyToggle == true)
|
||||
{
|
||||
@ -389,26 +321,14 @@ float ballistic()
|
||||
}
|
||||
}
|
||||
|
||||
// destroyEnemy消除除了自己以外的所有Enemy
|
||||
// destroyEnemy消除EnemyContainer内所有Enemy
|
||||
public void destroyAllEnemys()
|
||||
{
|
||||
GameObject[] EnemyGameObjs;
|
||||
EnemyGameObjs = GameObject.FindGameObjectsWithTag("Enemy");
|
||||
//遍历所有Enemy
|
||||
foreach (GameObject EnemyObj in EnemyGameObjs)
|
||||
foreach(Transform childObj in EnemyContainerObj.transform)
|
||||
{
|
||||
Vector3 thisEnemyPosition = EnemyObj.transform.position;
|
||||
Vector3 thisEnemyScale = EnemyObj.transform.localScale;
|
||||
Vector3 MyselfPosition = thisAgent.position;
|
||||
|
||||
//探测到Agent为自己时的处理
|
||||
if (thisEnemyPosition == MyselfPosition)
|
||||
if(childObj.tag == "Enemy")
|
||||
{
|
||||
//Debug.Log("OH It's me");
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(EnemyObj);
|
||||
Destroy(childObj.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -417,9 +337,7 @@ public void destroyAllEnemys()
|
||||
// 1 = success,2 = overtime,0 = notover
|
||||
int checkFinish()
|
||||
{
|
||||
GameObject[] EnemyGameObjs;
|
||||
EnemyGameObjs = GameObject.FindGameObjectsWithTag("Enemy");
|
||||
if (EnemyGameObjs.Length <= 1)
|
||||
if (EnemyContainerObj.transform.childCount <= 0)
|
||||
{
|
||||
//成功击杀所有Enemy
|
||||
return 1;
|
||||
@ -444,9 +362,9 @@ int getEnemyNum()
|
||||
//遍历所有Enemy
|
||||
foreach (GameObject EnemyObj in EnemyGameObjs)
|
||||
{
|
||||
Vector3 thisEnemyPosition = EnemyObj.transform.position;
|
||||
Vector3 thisEnemyPosition = EnemyObj.transform.localPosition;
|
||||
Vector3 thisEnemyScale = EnemyObj.transform.localScale;
|
||||
Vector3 MyselfPosition = thisAgent.position;
|
||||
Vector3 MyselfPosition = thisAgent.localPosition;
|
||||
|
||||
//探测到Agent为自己时的处理
|
||||
if (thisEnemyPosition == MyselfPosition)
|
||||
@ -499,16 +417,12 @@ public float rewardCalculate()
|
||||
public override void OnEpisodeBegin()
|
||||
{
|
||||
step = 0;
|
||||
if (EP == 0)
|
||||
{
|
||||
UICon.iniChart();
|
||||
}
|
||||
if (lockMouse)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked; // hide and lock the mouse
|
||||
}
|
||||
//iniCharts();
|
||||
thisAgentObj.name = thisAgentObj.GetInstanceID().ToString();
|
||||
//thisAgentObj.name = thisAgentObj.GetInstanceID().ToString();
|
||||
destroyAllEnemys();
|
||||
startTime = Time.time;// Reset StartTime as now time
|
||||
randomInitAgent();
|
||||
@ -525,7 +439,7 @@ public override void CollectObservations(VectorSensor sensor)
|
||||
//List<float> enemyRDisList = RaySensors.enemyRDisList;// All Enemy Rside Distances
|
||||
|
||||
rayScript.updateRayInfo();
|
||||
float[] myObserve = { thisAgent.position.x, thisAgent.position.y, thisAgent.position.z, thisAgent.rotation.w };
|
||||
float[] myObserve = { thisAgent.localPosition.x, thisAgent.localPosition.y, thisAgent.localPosition.z, thisAgent.rotation.w };
|
||||
float[] rayTagResult = rayScript.rayTagResult;// 探测用RayTag结果 float[](raySensorNum,1)
|
||||
float[] rayDisResult = rayScript.rayDisResult; // 探测用RayDis结果 float[](raySensorNum,1)
|
||||
//float[] focusEnemyObserve = RaySensors.focusEnemyInfo;// 最近的Enemy情报 float[](3,1) MinEnemyIndex,x,z
|
||||
@ -538,10 +452,6 @@ public override void CollectObservations(VectorSensor sensor)
|
||||
//sensor.AddObservation(raySensorNum); // raySensor数量 int
|
||||
gunReadyToggle = gunReady();
|
||||
sensor.AddObservation(gunReadyToggle); // save gun is ready?
|
||||
sensor.AddObservation(LoadDirDateF); // 用于loadModel的第一级dir
|
||||
sensor.AddObservation(loadDirTimeF); // 用于loadModel的第二级dir
|
||||
sensor.AddObservation(saveNow); // sent saveNow Toggle to python let agent save weights
|
||||
saveNow = 0; // reset saveNow Toggle
|
||||
//sensor.AddObservation(remainTime); // RemainTime int
|
||||
}
|
||||
|
||||
@ -560,14 +470,6 @@ public override void OnActionReceived(ActionBuffers actionBuffers)
|
||||
|
||||
//应用输入
|
||||
shoot = mouseShoot;
|
||||
HistoryRec.realTimeKeyCounter(vertical, horizontal, shoot);
|
||||
(int kWCount, int kSCount, int kACount, int kDCount, int shootCount) = HistoryRec.getKeyCount();
|
||||
UICon.updateRemainTime(remainTime);
|
||||
UICon.updateRemainEnemy(enemyNum);
|
||||
UICon.updateWASDKeyViewer(vertical, horizontal);
|
||||
UICon.updateKeyCounterChart(kWCount, kSCount, kACount, kDCount, shootCount);
|
||||
UICon.updateMouseMovementViewer(Mouse_X);
|
||||
UICon.updateRewardViewer(nonReward, shootReward, shootWithoutReadyReward, hitReward, winReward, loseReward, killReward);
|
||||
cameraControl(Mouse_X, 0);
|
||||
moveAgent(vertical, horizontal);
|
||||
float thisRoundReward = rewardCalculate();
|
||||
@ -577,11 +479,6 @@ public override void OnActionReceived(ActionBuffers actionBuffers)
|
||||
if (finished == 1)
|
||||
{
|
||||
//Win Finished
|
||||
HistoryRec.addRealTimeReward(winReward);
|
||||
HistoryRec.EPTotalRewardsUpdate();
|
||||
UICon.epUpdateChart(EP, HistoryRec.getLastEPTotalReward());
|
||||
UICon.resetStepChart();
|
||||
UICon.resetCounterChat();
|
||||
EP += 1;
|
||||
SetReward(winReward);
|
||||
Debug.Log("reward = " + winReward);
|
||||
@ -590,11 +487,7 @@ public override void OnActionReceived(ActionBuffers actionBuffers)
|
||||
else if (finished == 2)
|
||||
{
|
||||
//Lose Finished
|
||||
HistoryRec.addRealTimeReward(loseReward);
|
||||
HistoryRec.EPTotalRewardsUpdate();
|
||||
UICon.epUpdateChart(EP, HistoryRec.getLastEPTotalReward());
|
||||
UICon.resetStepChart();
|
||||
UICon.resetCounterChat();
|
||||
|
||||
EP += 1;
|
||||
SetReward(loseReward);
|
||||
Debug.Log("reward = " + loseReward);
|
||||
@ -603,8 +496,6 @@ public override void OnActionReceived(ActionBuffers actionBuffers)
|
||||
else
|
||||
{
|
||||
// game not over yet
|
||||
HistoryRec.addRealTimeReward(thisRoundReward);
|
||||
UICon.stepUpdateChart(step, thisRoundReward);
|
||||
step += 1;
|
||||
SetReward(thisRoundReward);
|
||||
Debug.Log("reward = " + thisRoundReward);
|
||||
|
@ -1,38 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraChange : MonoBehaviour
|
||||
{
|
||||
public Camera FPSCamera;
|
||||
public Camera TPSCamera;
|
||||
public GameObject AgentOBJ;
|
||||
|
||||
public void switchCamera()
|
||||
{
|
||||
if (TPSCamera.enabled && !FPSCamera.enabled)
|
||||
{
|
||||
ShowFPSView();
|
||||
}else if(FPSCamera.enabled && !TPSCamera.enabled)
|
||||
{
|
||||
ShowTPSView();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowFPSView();
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowTPSView()
|
||||
{
|
||||
TPSCamera.enabled = true;
|
||||
FPSCamera.enabled = false;
|
||||
AgentOBJ.GetComponent<RaySensors>().showInGameRay = true;
|
||||
}
|
||||
public void ShowFPSView()
|
||||
{
|
||||
FPSCamera.enabled = true;
|
||||
TPSCamera.enabled = false;
|
||||
AgentOBJ.GetComponent<RaySensors>().showInGameRay = false;
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 136f4ef424a10ea47b5981794fff8a7c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,114 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
/*??????????????*/
|
||||
|
||||
public class HistoryRecorder : MonoBehaviour
|
||||
{
|
||||
private List<float> realTimeReward = new List<float> ();
|
||||
private List<float> EPTotalRewards = new List<float> ();
|
||||
private List<int> EPTotalShootCount = new List<int> ();
|
||||
|
||||
private int realTimeWKeyCount = 0;
|
||||
private int realTimeAKeyCount = 0;
|
||||
private int realTimeSKeyCount = 0;
|
||||
private int realTimeDKeyCount = 0;
|
||||
private int realTimeShootCount = 0;
|
||||
|
||||
|
||||
// add Record History -----------------------------
|
||||
public void addRealTimeReward(float reward)
|
||||
{
|
||||
realTimeReward.Add(reward);
|
||||
}
|
||||
public void addEPTotalRewards(float EPTotalReward)
|
||||
{
|
||||
EPTotalRewards.Add(EPTotalReward);
|
||||
}
|
||||
public void addEPTotalShootCount(int TotalShootCount)
|
||||
{
|
||||
EPTotalShootCount.Add(TotalShootCount);
|
||||
}
|
||||
public void realTimeKeyCounter(int vertical, int horizontal, int shoot)
|
||||
{
|
||||
if (vertical == 1)
|
||||
{
|
||||
realTimeWKeyCount += 1;
|
||||
}
|
||||
else if (vertical == -1)
|
||||
{
|
||||
realTimeSKeyCount += 1;
|
||||
}
|
||||
if (horizontal == 1)
|
||||
{
|
||||
realTimeDKeyCount += 1;
|
||||
}
|
||||
else if (horizontal == -1)
|
||||
{
|
||||
realTimeAKeyCount += 1;
|
||||
}
|
||||
if (shoot == 1)
|
||||
{
|
||||
realTimeShootCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// math job---------------------------------------
|
||||
// delete RealTimeReward item
|
||||
public void resetRealTimeReward()
|
||||
{
|
||||
realTimeReward.Clear();
|
||||
}
|
||||
// set all realTimeKeyCount to 0
|
||||
public void resetrealTimeKeyCounter()
|
||||
{
|
||||
realTimeAKeyCount = 0;
|
||||
realTimeDKeyCount = 0;
|
||||
realTimeWKeyCount = 0;
|
||||
realTimeSKeyCount = 0;
|
||||
realTimeShootCount = 0;
|
||||
}
|
||||
// calc RealTimeReward's Average and Add to EPTotalRewards
|
||||
public void EPTotalRewardsUpdate()
|
||||
{
|
||||
float EPSumRealTimeReward = getSumRealTimeReward();
|
||||
resetRealTimeReward();
|
||||
addEPTotalRewards(EPSumRealTimeReward);
|
||||
}
|
||||
|
||||
// get Record History -----------------------------
|
||||
// get EPTotalReward List
|
||||
public List<float> getEPTotalReward()
|
||||
{
|
||||
return (EPTotalRewards);
|
||||
}
|
||||
// get EPTotalShootCount List
|
||||
public List<int> getEPTotalShootCount()
|
||||
{
|
||||
return (EPTotalShootCount);
|
||||
}
|
||||
// get RealTimeReward's Mean
|
||||
public float getMeanRealTimeReward()
|
||||
{
|
||||
return (realTimeReward.Average());
|
||||
}
|
||||
// get RealTimeReward's Sum
|
||||
public float getSumRealTimeReward()
|
||||
{
|
||||
return realTimeReward.Sum();
|
||||
}
|
||||
// get LastEPTotalReward last item
|
||||
public float getLastEPTotalReward()
|
||||
{
|
||||
return (EPTotalRewards.Last());
|
||||
}
|
||||
//get KeyCount
|
||||
public (int w,int s,int a,int d,int shoot) getKeyCount()
|
||||
{
|
||||
return (realTimeWKeyCount, realTimeSKeyCount, realTimeAKeyCount, realTimeDKeyCount, realTimeShootCount);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class InGameMessages : MonoBehaviour
|
||||
{
|
||||
public GameObject MessageBox; // scrollView contents
|
||||
public GameObject TextPrefab; // TextPrefab
|
||||
public int maxMassages = 25;
|
||||
|
||||
public Color infoColor = Color.white;
|
||||
public Color successColor = Color.green;
|
||||
public Color errorColor = Color.red;
|
||||
public Color warningColor = Color.yellow;
|
||||
|
||||
[System.NonSerialized]List<Message> messageList = new List<Message>();
|
||||
|
||||
public void SendMessagetoBox(string text,Message.MessageType messageType = Message.MessageType.info)
|
||||
{
|
||||
if (messageList.Count > maxMassages)
|
||||
{
|
||||
// keep mesages under maxMassages
|
||||
Destroy(messageList[0].textOBJ.gameObject);
|
||||
messageList.Remove(messageList[0]);
|
||||
}
|
||||
// add timestamp
|
||||
string date = "[" + DateTime.Now.ToString("MMdd_hh:mm:ss") + "] ";
|
||||
text = date + text;
|
||||
|
||||
Message newMessage = new Message();
|
||||
newMessage.text = text;
|
||||
|
||||
GameObject newText = Instantiate(TextPrefab, MessageBox.transform);
|
||||
newMessage.textOBJ = newText.GetComponent<Text>();
|
||||
newMessage.textOBJ.text = newMessage.text;
|
||||
newMessage.textOBJ.color = MessageTypeColor(messageType);
|
||||
|
||||
messageList.Add(newMessage);
|
||||
}
|
||||
|
||||
// parse messageType to Color
|
||||
Color MessageTypeColor(Message.MessageType messageType)
|
||||
{
|
||||
Color thisColor = infoColor;
|
||||
switch (messageType)
|
||||
{
|
||||
case Message.MessageType.info:
|
||||
thisColor = infoColor;
|
||||
break;
|
||||
case Message.MessageType.success:
|
||||
thisColor = successColor;
|
||||
break;
|
||||
case Message.MessageType.error:
|
||||
thisColor = errorColor;
|
||||
break;
|
||||
case Message.MessageType.warnning:
|
||||
thisColor = warningColor;
|
||||
break;
|
||||
}
|
||||
return thisColor;
|
||||
}
|
||||
}
|
||||
|
||||
// Message Class
|
||||
[System.Serializable]
|
||||
public class Message
|
||||
{
|
||||
public string text;
|
||||
public Text textOBJ;
|
||||
public MessageType messageType;
|
||||
|
||||
public enum MessageType
|
||||
{
|
||||
info,
|
||||
success,
|
||||
error,
|
||||
warnning
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 414edca99b7a04940a0801ec06c99007
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RealTimeEnemyNumChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
|
||||
public InputField enemyNumInputField;
|
||||
public Text enemyNumPlaceholder;
|
||||
|
||||
public void EnemyChangeBTPresses()
|
||||
{
|
||||
AgentWithGun agentWithGun = Agent.GetComponent<AgentWithGun>();
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
int enemyNum = Math.Abs(int.Parse(enemyNumInputField.GetComponent<InputField>().text));
|
||||
|
||||
|
||||
if (enemyNumInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
enemyNumPlaceholder.color = Color.red;
|
||||
enemyNumPlaceholder.text = "Wrong Type!";
|
||||
enemyNumInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong enemyNum Type!", Message.MessageType.error);
|
||||
}
|
||||
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";
|
||||
agentWithGun.enemyNum = enemyNum;
|
||||
enemyNumInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox($"Enemy Num = {enemyNum} add Success. Valid in the next round.", Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 137cfd15c80550b4589b3dce99ff2d09
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,234 +0,0 @@
|
||||
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;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void nonRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (nonRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
nonRPlaceholder.color = Color.red;
|
||||
nonRPlaceholder.text = "Wrong Type!";
|
||||
nonRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
|
||||
}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 = "";
|
||||
messenger.SendMessagetoBox("Reward nonR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void shootRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (shootRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
shootRPlaceholder.color = Color.red;
|
||||
shootRPlaceholder.text = "Wrong Type!";
|
||||
shootRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward shootR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void shootWithoutReadyRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (shootWithoutReadyRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
shootWithoutReadyRPlaceholder.color = Color.red;
|
||||
shootWithoutReadyRPlaceholder.text = "Wrong Type!";
|
||||
shootWithoutReadyRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward SWORR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void hitRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (hitRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
hitRPlaceholder.color = Color.red;
|
||||
hitRPlaceholder.text = "Wrong Type!";
|
||||
hitRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward hitR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void killRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (killRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
killRPlaceholder.color = Color.red;
|
||||
killRPlaceholder.text = "Wrong Type!";
|
||||
killRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward killR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void winRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (winRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
winRPlaceholder.color = Color.red;
|
||||
winRPlaceholder.text = "Wrong Type!";
|
||||
winRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward winR change Success", Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
|
||||
public void loseRBTPresses()
|
||||
{
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
if (loseRInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
loseRPlaceholder.color = Color.red;
|
||||
loseRPlaceholder.text = "Wrong Type!";
|
||||
loseRInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong Reward Type!", Message.MessageType.error);
|
||||
}
|
||||
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 = "";
|
||||
messenger.SendMessagetoBox("Reward loseR change Success",Message.MessageType.success);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f31155528181e24438cf507311adf048
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,54 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RealTimeTimeLimitChanger : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
|
||||
public InputField TimeLimInputField;
|
||||
public Text TimeLimPlaceholder;
|
||||
|
||||
public void BTPressed()
|
||||
{
|
||||
AgentWithGun agentWithGun = Agent.GetComponent<AgentWithGun>();
|
||||
InGameMessages messenger = gameObject.GetComponent<InGameMessages>();
|
||||
int timeLimit = Math.Abs(int.Parse(TimeLimInputField.GetComponent<InputField>().text));
|
||||
|
||||
if (TimeLimInputField.GetComponent<InputField>().text == "-")
|
||||
{
|
||||
// input chara not illegal
|
||||
TimeLimPlaceholder.color = Color.red;
|
||||
TimeLimPlaceholder.text = "Wrong Type!";
|
||||
TimeLimInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox("Wrong timeLimit Type!", Message.MessageType.error);
|
||||
}
|
||||
else if (TimeLimInputField.GetComponent<InputField>().text == "")
|
||||
{
|
||||
// empty chara
|
||||
TimeLimPlaceholder.color = Color.gray;
|
||||
TimeLimPlaceholder.text = "TimeLim";
|
||||
}
|
||||
else
|
||||
{
|
||||
int remainTime = agentWithGun.remainTime;
|
||||
// make sure new timeLimit is greater than remainTime;
|
||||
if (timeLimit <= remainTime)
|
||||
{
|
||||
TimeLimPlaceholder.color = Color.red;
|
||||
TimeLimPlaceholder.text = "Error";
|
||||
messenger.SendMessagetoBox($"New time should greater than remainTime({remainTime})",Message.MessageType.error);
|
||||
}
|
||||
else
|
||||
{
|
||||
// good to go~
|
||||
TimeLimPlaceholder.color = Color.gray;
|
||||
TimeLimPlaceholder.text = "TimeLim";
|
||||
agentWithGun.timeLimit = timeLimit;
|
||||
TimeLimInputField.GetComponent<InputField>().text = "";
|
||||
messenger.SendMessagetoBox($"Time Limit changed to {timeLimit}",Message.MessageType.success);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 604d05168c977c04887a3add62ce34da
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,13 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SaveWeightsButton : MonoBehaviour
|
||||
{
|
||||
public GameObject Agent;
|
||||
public void onButtonClicked()
|
||||
{
|
||||
// set saveNow to active.
|
||||
Agent.GetComponent<AgentWithGun>().saveNow = 1;
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 065aae6979c750b4fa0a0be5dbd8d2c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,202 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
|
||||
/*????UI*/
|
||||
|
||||
public class UIController : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("Key Viewer")]
|
||||
public int updateStep = 600;
|
||||
public Text upText;
|
||||
public Text downText;
|
||||
public Text leftText;
|
||||
public Text rightText;
|
||||
public Text shootText;
|
||||
public Text MouseText;
|
||||
public Text remainTimeText;
|
||||
public Text remainEnemyText;
|
||||
public Image mouseVisualizationBG;
|
||||
public Image mouseVisualizationMeter;
|
||||
|
||||
[Header("Reward Viewer")]
|
||||
public Text nonRewardText;
|
||||
public Text shootRewardText;
|
||||
public Text shootWithoutReadyRewardText;
|
||||
public Text hitRewardText;
|
||||
public Text winRewardText;
|
||||
public Text loseRewardText;
|
||||
public Text killRewardText;
|
||||
|
||||
|
||||
[Header("X_Charts")]
|
||||
public GameObject realTimeRewardChartOBJ;
|
||||
public GameObject realTimeKeyCounterChartOBJ;
|
||||
public GameObject EPTotalRewardsChartOBJ;
|
||||
|
||||
[Header("Other Para")]
|
||||
public float mouseMaxMovement = 15;
|
||||
|
||||
private LineChart realTimeRewardChart;
|
||||
private BarChart realTimeKeyCounterChart;
|
||||
private LineChart EPTotalRewardsChart;
|
||||
|
||||
//-----------RewardViewer--------
|
||||
public void updateRewardViewer(float nonReward, float shootReward, float shootWithoutReadyReward, float hitReward, float winReward, float loseReward, float killReward)
|
||||
{
|
||||
nonRewardText.text = Convert.ToString(nonReward);
|
||||
shootRewardText.text = Convert.ToString(shootReward);
|
||||
shootWithoutReadyRewardText.text = Convert.ToString(shootWithoutReadyReward);
|
||||
hitRewardText.text = Convert.ToString(hitReward);
|
||||
winRewardText.text = Convert.ToString(winReward);
|
||||
loseRewardText.text = Convert.ToString(loseReward);
|
||||
killRewardText.text = Convert.ToString(killReward);
|
||||
}
|
||||
|
||||
//------------RemainTime----------
|
||||
public void updateRemainTime(int remainTime)
|
||||
{
|
||||
remainTimeText.text = Convert.ToString(remainTime);
|
||||
}
|
||||
//------------RemainEnemy---------
|
||||
public void updateRemainEnemy(int enemyNum)
|
||||
{
|
||||
remainEnemyText.text = Convert.ToString(enemyNum);
|
||||
}
|
||||
|
||||
//------------Key Viewer----------
|
||||
public void updateWASDKeyViewer(int vertical,int horizontal)
|
||||
{
|
||||
if (vertical == 1)
|
||||
{
|
||||
upText.color = Color.red;
|
||||
downText.color = Color.black;
|
||||
}
|
||||
else if (vertical == -1)
|
||||
{
|
||||
downText.color = Color.red;
|
||||
upText.color = Color.black;
|
||||
}
|
||||
else
|
||||
{
|
||||
downText.color = Color.black;
|
||||
upText.color = Color.black;
|
||||
}
|
||||
if (horizontal == 1)
|
||||
{
|
||||
rightText.color = Color.red;
|
||||
leftText.color = Color.black;
|
||||
}
|
||||
else if (horizontal == -1)
|
||||
{
|
||||
leftText.color = Color.red;
|
||||
rightText.color = Color.black;
|
||||
}
|
||||
else
|
||||
{
|
||||
downText.color = Color.black;
|
||||
upText.color = Color.black;
|
||||
}
|
||||
}
|
||||
public void updateShootKeyViewer(int shoot,bool isGunReady)
|
||||
{
|
||||
if(shoot != 0 && isGunReady == true)
|
||||
{
|
||||
shootText.color = Color.red;
|
||||
}
|
||||
else if(shoot != 0 && isGunReady == false)
|
||||
{
|
||||
shootText.color = Color.yellow;
|
||||
}
|
||||
else
|
||||
{
|
||||
shootText.color = Color.black;
|
||||
}
|
||||
}
|
||||
public void updateMouseMovementViewer(float Mouse_x)
|
||||
{
|
||||
MouseText.text = Mouse_x.ToString();
|
||||
float mouseBGWidth = mouseVisualizationBG.GetComponent<RectTransform>().sizeDelta.x;
|
||||
float mouseBGPosX = mouseVisualizationBG.GetComponent<RectTransform>().position.x;
|
||||
float mouseBGPosY = mouseVisualizationBG.GetComponent<RectTransform>().position.y;
|
||||
|
||||
float mouseMeterWidth = mouseBGWidth * Mouse_x / mouseMaxMovement;
|
||||
float mouseMeterPositionOffset = mouseMeterWidth / 2;
|
||||
mouseVisualizationMeter.rectTransform.sizeDelta = new Vector2(Math.Abs(mouseMeterWidth),mouseVisualizationMeter.GetComponent<RectTransform>().sizeDelta.y);
|
||||
mouseVisualizationMeter.rectTransform.position = new Vector3(mouseBGPosX + mouseMeterPositionOffset, mouseBGPosY, 0);
|
||||
}
|
||||
|
||||
// ------------X Chart------------
|
||||
// Initialize Chart UI
|
||||
public void iniChart()
|
||||
{
|
||||
realTimeRewardChart = realTimeRewardChartOBJ.GetComponent<LineChart>();
|
||||
resetStepChart();
|
||||
realTimeKeyCounterChart = realTimeKeyCounterChartOBJ.GetComponent<BarChart>();
|
||||
resetCounterChat();
|
||||
|
||||
EPTotalRewardsChart = EPTotalRewardsChartOBJ.GetComponent<LineChart>();
|
||||
resetEPChart();
|
||||
}
|
||||
|
||||
// Resert------------
|
||||
// reset setp by setp update Chart
|
||||
public void resetStepChart()
|
||||
{
|
||||
realTimeRewardChart.RemoveData();
|
||||
realTimeRewardChart.AddSerie<Line>("RealTimeRewardChart");
|
||||
}
|
||||
// reset keyCounter Chart
|
||||
public void resetCounterChat()
|
||||
{
|
||||
realTimeKeyCounterChart.RemoveData();
|
||||
realTimeKeyCounterChart.AddSerie<Bar>("RealTimeKeyCounterChart");
|
||||
realTimeKeyCounterChart.AddXAxisData("W");
|
||||
realTimeKeyCounterChart.AddXAxisData("S");
|
||||
realTimeKeyCounterChart.AddXAxisData("A");
|
||||
realTimeKeyCounterChart.AddXAxisData("D");
|
||||
realTimeKeyCounterChart.AddXAxisData("Pew");
|
||||
realTimeKeyCounterChart.AddData("RealTimeKeyCounterChart", 0, "W");
|
||||
realTimeKeyCounterChart.AddData("RealTimeKeyCounterChart", 0, "S");
|
||||
realTimeKeyCounterChart.AddData("RealTimeKeyCounterChart", 0, "A");
|
||||
realTimeKeyCounterChart.AddData("RealTimeKeyCounterChart", 0, "D");
|
||||
realTimeKeyCounterChart.AddData("RealTimeKeyCounterChart", 0, "Pew");
|
||||
}
|
||||
// reset EP by EP update Chart
|
||||
public void resetEPChart()
|
||||
{
|
||||
EPTotalRewardsChart.RemoveData();
|
||||
EPTotalRewardsChart.AddSerie<Line>("EPTotalRewardsChart");
|
||||
}
|
||||
|
||||
// Update------------
|
||||
// update setp by setp update Type Chart
|
||||
public void stepUpdateChart(int step, float reward)
|
||||
{
|
||||
if(step % updateStep == 0)
|
||||
{
|
||||
resetStepChart();
|
||||
}
|
||||
realTimeRewardChart.AddXAxisData(Convert.ToString(step));
|
||||
realTimeRewardChart.AddData(0,reward);
|
||||
}
|
||||
// update KeyCounter chart
|
||||
public void updateKeyCounterChart(int kWCount, int kSCount, int kACount, int kDCount,int shootCount)
|
||||
{
|
||||
realTimeKeyCounterChart.UpdateData(0, 0, kWCount);
|
||||
realTimeKeyCounterChart.UpdateData(0, 1, kSCount);
|
||||
realTimeKeyCounterChart.UpdateData(0, 2, kACount);
|
||||
realTimeKeyCounterChart.UpdateData(0, 3, kDCount);
|
||||
realTimeKeyCounterChart.UpdateData(0, 4, shootCount);
|
||||
}
|
||||
// update EP by EP update Type Chart
|
||||
public void epUpdateChart(int EP,float totalReward)
|
||||
{
|
||||
EPTotalRewardsChart.AddXAxisData(Convert.ToString(EP));
|
||||
EPTotalRewardsChart.AddData(0,totalReward);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89d83d123322a5c4ba6afb3c86403371
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
ProjectSettings/BurstAotSettings_StandaloneWindows.json
Normal file
17
ProjectSettings/BurstAotSettings_StandaloneWindows.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"MonoBehaviour": {
|
||||
"Version": 4,
|
||||
"EnableBurstCompilation": true,
|
||||
"EnableOptimisations": true,
|
||||
"EnableSafetyChecks": false,
|
||||
"EnableDebugInAllBuilds": false,
|
||||
"UsePlatformSDKLinker": false,
|
||||
"CpuMinTargetX32": 0,
|
||||
"CpuMaxTargetX32": 0,
|
||||
"CpuMinTargetX64": 0,
|
||||
"CpuMaxTargetX64": 0,
|
||||
"CpuTargetsX32": 6,
|
||||
"CpuTargetsX64": 72,
|
||||
"OptimizeFor": 0
|
||||
}
|
||||
}
|
6
ProjectSettings/CommonBurstAotSettings.json
Normal file
6
ProjectSettings/CommonBurstAotSettings.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"MonoBehaviour": {
|
||||
"Version": 4,
|
||||
"DisabledWarnings": ""
|
||||
}
|
||||
}
|
@ -99,7 +99,7 @@ PlayerSettings:
|
||||
xboxEnableFitness: 0
|
||||
visibleInBackground: 1
|
||||
allowFullscreenSwitch: 1
|
||||
fullscreenMode: 1
|
||||
fullscreenMode: 3
|
||||
xboxSpeechDB: 0
|
||||
xboxEnableHeadOrientation: 0
|
||||
xboxEnableGuest: 0
|
||||
@ -135,7 +135,9 @@ PlayerSettings:
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.1
|
||||
preloadedAssets: []
|
||||
preloadedAssets:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
167
ProjectSettings/SceneTemplateSettings.json
Normal file
167
ProjectSettings/SceneTemplateSettings.json
Normal file
@ -0,0 +1,167 @@
|
||||
{
|
||||
"templatePinStates": [],
|
||||
"dependencyTypeInfos": [
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.AnimationClip",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.Animations.AnimatorController",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.AnimatorOverrideController",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.Audio.AudioMixerController",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.ComputeShader",
|
||||
"ignore": true,
|
||||
"defaultInstantiationMode": 1,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Cubemap",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.GameObject",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.LightingDataAsset",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": false
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.LightingSettings",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Material",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.MonoScript",
|
||||
"ignore": true,
|
||||
"defaultInstantiationMode": 1,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.PhysicMaterial",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.PhysicsMaterial2D",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.VolumeProfile",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.SceneAsset",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": false
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Shader",
|
||||
"ignore": true,
|
||||
"defaultInstantiationMode": 1,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.ShaderVariantCollection",
|
||||
"ignore": true,
|
||||
"defaultInstantiationMode": 1,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Texture",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Texture2D",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Timeline.TimelineAsset",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 0,
|
||||
"supportsModification": true
|
||||
}
|
||||
],
|
||||
"defaultDependencyTypeInfo": {
|
||||
"userAdded": false,
|
||||
"type": "<default_scene_template_dependencies>",
|
||||
"ignore": false,
|
||||
"defaultInstantiationMode": 1,
|
||||
"supportsModification": true
|
||||
},
|
||||
"newSceneOverride": 0
|
||||
}
|
Loading…
Reference in New Issue
Block a user