Merge branch 'krazerleo/core/1' of https://gitea.gavt45.ru/gav/real-shooter into krazerleo/core/1
This commit is contained in:
@ -1 +0,0 @@
|
||||
{"count":1,"self":5.2745576,"total":5.3091238,"children":{"InitializeActuators":{"count":2,"self":0.0019998999999999998,"total":0.0019998999999999998,"children":null},"InitializeSensors":{"count":2,"self":0.0030009999999999998,"total":0.0030009999999999998,"children":null},"AgentSendState":{"count":18,"self":0.0019986,"total":0.0175794,"children":{"CollectObservations":{"count":36,"self":0.0009994,"total":0.0009994,"children":null},"WriteActionMask":{"count":36,"self":0.0005783,"total":0.0005783,"children":null},"RequestDecision":{"count":36,"self":0.0140031,"total":0.0140031,"children":null}}},"DecideAction":{"count":18,"self":0.0089876,"total":0.0089876,"children":null},"AgentAct":{"count":18,"self":0.0009983,"total":0.0009983,"children":null}},"gauges":{"My Behavior.CumulativeReward":{"count":2,"max":0,"min":0,"runningAverage":0,"value":0,"weightedAverage":0}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1651670021","unity_version":"2019.4.35f1","command_line_arguments":"C:\\Program Files\\unityeditorfolder\\2019.4.35f1\\Editor\\Unity.exe -projectpath F:\\SigmaRiskManagment\\real shooter Git Version -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-9THNgaHTf51SEKo5URf9r -hubSessionId bf0b1ec0-c926-11ec-9066-7725c5249b8e -accessToken pLNs79-R0y77otVjQKfPq_jck-T6ncSnk21wIQRhdZw009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Greatest_map_ever","end_time_seconds":"1651670026"}}
|
12
Assets/Prefabs/Bot.prefab
generated
12
Assets/Prefabs/Bot.prefab
generated
@ -143,19 +143,23 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_BrainParameters:
|
||||
<<<<<<< HEAD
|
||||
VectorObservationSize: 9
|
||||
=======
|
||||
VectorObservationSize: 4
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
NumStackedVectorObservations: 1
|
||||
m_ActionSpec:
|
||||
m_NumContinuousActions: 0
|
||||
BranchSizes: 01000000
|
||||
VectorActionSize: 01000000
|
||||
BranchSizes: 0200000002000000
|
||||
VectorActionSize: 0200000002000000
|
||||
VectorActionDescriptions: []
|
||||
VectorActionSpaceType: 0
|
||||
hasUpgradedBrainParametersWithActionSpec: 1
|
||||
m_Model: {fileID: 0}
|
||||
m_InferenceDevice: 0
|
||||
m_BehaviorType: 0
|
||||
m_BehaviorName: My Behavior
|
||||
m_BehaviorName: npc
|
||||
TeamId: 0
|
||||
m_UseChildSensors: 1
|
||||
m_UseChildActuators: 1
|
||||
@ -210,4 +214,4 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_SensorName: BufferSensor
|
||||
m_ObservableSize: 5
|
||||
m_MaxNumObservables: 512
|
||||
m_MaxNumObservables: 5
|
||||
|
210
Assets/Scenes/Greatest_map_ever/Greatest_map_ever.unity
generated
210
Assets/Scenes/Greatest_map_ever/Greatest_map_ever.unity
generated
@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@ -259,7 +259,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -355,7 +358,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -1124,7 +1130,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 77.5, y: 55.2, z: -5.9}
|
||||
m_LocalPosition: {x: 81.2, y: 64.1, z: -12.4}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
@ -1255,6 +1261,12 @@ Transform:
|
||||
m_Father: {fileID: 671439045}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!4 &868386701 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1809549197}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &884498019
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1288,6 +1300,80 @@ Transform:
|
||||
m_Father: {fileID: 782729761}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1061293905
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 868386701}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2836004473841745626, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_Controller
|
||||
value:
|
||||
objectReference: {fileID: 9100000, guid: 95a44e56d04c7d248ba723eda9611c51, type: 2}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591197023, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2836004475591695743, guid: f432554f564e69242897607d34218939,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: DragonFucker
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f432554f564e69242897607d34218939, type: 3}
|
||||
--- !u!1 &1116745543
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1319,7 +1405,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -1751,7 +1840,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1345085340}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 47.446796, y: -5.782543, z: -25.400002}
|
||||
m_LocalPosition: {x: 21.51, y: -5.782543, z: -10.46}
|
||||
m_LocalScale: {x: 1.4367, y: 1.4367, z: 1.4367}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2060099472}
|
||||
@ -1769,7 +1858,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -1865,7 +1957,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -2087,7 +2182,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -2138,6 +2236,105 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1663305221}
|
||||
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1001 &1809549197
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: -4942972567661207728, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 42.23
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -15.91
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763689, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763699, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763700, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: playerStance
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763700, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: playerCrouchStance.CameraHeight
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203470625763703, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203471293941515, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4528203471293941515, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -2.417
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 99bb17a23a489624baeaf337f91a4f84, type: 3}
|
||||
--- !u!1 &1858987083
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2264,7 +2461,7 @@ MonoBehaviour:
|
||||
- {fileID: 2004854094}
|
||||
AIPrefab: {fileID: 2988578997639256874, guid: b016874eb34cc084aa4359f0bbec50e1,
|
||||
type: 3}
|
||||
PlayerPrefab: {fileID: 5245491127989480125, guid: 80f6c1c85e5daed4c96c70205ed5503d,
|
||||
PlayerPrefab: {fileID: 5245491127989480125, guid: 99bb17a23a489624baeaf337f91a4f84,
|
||||
type: 3}
|
||||
--- !u!114 &1858987091
|
||||
MonoBehaviour:
|
||||
@ -2531,7 +2728,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6a2d29bfc31a8cf4e831e3bb80720414, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
navType: 1
|
||||
=======
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
PointId: 0
|
||||
DeathAttr: 0
|
||||
EnemiesSeen: []
|
||||
@ -2620,7 +2820,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2060099471}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 19.553204, y: 7.782543, z: -15}
|
||||
m_LocalPosition: {x: 27.79, y: 7.782543, z: -15}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1345085341}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,12 +9,22 @@ public class CharacterCondition
|
||||
public event Action<int> OnChangeAmmunitionEvent;
|
||||
|
||||
private int health;
|
||||
<<<<<<< HEAD
|
||||
public int HealthPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return health;
|
||||
}
|
||||
=======
|
||||
|
||||
public int HealthPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return health;
|
||||
}
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
private set
|
||||
{
|
||||
health = value;
|
||||
|
@ -6,11 +6,18 @@ using UnityEngine.AI;
|
||||
[RequireComponent(typeof(NavMeshAgent))]
|
||||
public class MovementController : MonoBehaviour
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
public int PointStartID { get; set; }
|
||||
public int PointEndID { get; private set; }
|
||||
public float FlagDistance { get; private set; }
|
||||
private const float updateFlagPositionDelay = 5;
|
||||
private const float updateReachedDestinationDelay = 5;
|
||||
=======
|
||||
public NavPoint currentPosition { get; set; }
|
||||
private Dictionary<int, NavPoint> navPoints = new Dictionary<int, NavPoint>();
|
||||
|
||||
[SerializeField] private NavMeshAgent navMeshAgent;
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
|
||||
[SerializeField] private NavMeshAgent navMeshAgent;
|
||||
[SerializeField] private GameObject flag;
|
||||
@ -21,6 +28,7 @@ public class MovementController : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
navMeshAgent.speed = SettingsReader.Instance.GetSettings.MovementSpeed;
|
||||
idNavPointDict = MapManager.IDToNavPoint;
|
||||
InvokeRepeating(nameof(UpdateFlagPosition), 0, updateFlagPositionDelay);
|
||||
@ -35,19 +43,46 @@ public class MovementController : MonoBehaviour
|
||||
private void UpdateFlagPosition()
|
||||
{
|
||||
FlagDistance = (flag.transform.position - gameObject.transform.position).magnitude;
|
||||
=======
|
||||
navMeshAgent.speed = SettingsReader.Instance.GetSettings.movementSpeed;
|
||||
foreach (var np in MapManager.navPoints) {
|
||||
navPoints[np.PointId] = np;
|
||||
}
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
}
|
||||
|
||||
public void MoveToPointById(int id)
|
||||
{
|
||||
if (!navPoints.ContainsKey(id))
|
||||
{
|
||||
Debug.LogWarning("PIDOR");
|
||||
return;
|
||||
}
|
||||
goToNextNavPoint(navPoints[id]);
|
||||
}
|
||||
|
||||
public void MoveToRandomPoint()
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
Debug.Log(MapManager.NavPoints == null);
|
||||
GoToNextNavPoint(MapManager.NavPoints[Random.Range(0, MapManager.NavPoints.Count)]);
|
||||
=======
|
||||
{
|
||||
// Debug.Log(MapManager.navPoints == null);
|
||||
goToNextNavPoint(MapManager.navPoints[Random.Range(0, MapManager.navPoints.Count)]);
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
}
|
||||
|
||||
public List<NavPoint> GetPointsCandidate()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
return MapManager.NavPoints
|
||||
.Where(point =>
|
||||
(idNavPointDict[PointStartID].Position - point.Position).magnitude < SettingsReader.Instance.GetSettings.MovementDistance)
|
||||
=======
|
||||
return MapManager.navPoints
|
||||
.Where(point => (currentPosition.position - point.position).magnitude < SettingsReader.Instance.GetSettings.movementDistance)
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,14 @@ public class NPC : Agent, ICharacter
|
||||
|
||||
public override void CollectObservations(VectorSensor sensor)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
var candidates = moveController.GetPointsCandidate();
|
||||
=======
|
||||
sensor.AddObservation(Condition.HealthPoints);
|
||||
sensor.AddObservation(Condition.ArmourPoints);
|
||||
sensor.AddObservation(Condition.Ammunition);
|
||||
sensor.AddObservation((int) NPC_State.State);
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
|
||||
//common sensors
|
||||
sensor.AddObservation(GameManager.IsHaveSeenByEnemy(AgentCharacter.Team.GetOppositeTeam(),
|
||||
@ -93,6 +100,7 @@ public class NPC : Agent, ICharacter
|
||||
//point sensors
|
||||
foreach (var point in candidates)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
bufferSensor.AppendObservation(new float[] {
|
||||
point.DeathAttr,
|
||||
(int)point.navType,
|
||||
@ -104,6 +112,35 @@ public class NPC : Agent, ICharacter
|
||||
GameManager.IsHaveSeenByEnemy(AgentCharacter.Team.GetOppositeTeam(),
|
||||
point.Position).ToInt()
|
||||
});
|
||||
=======
|
||||
var parray = new float[]
|
||||
{
|
||||
//1 position in navpointId
|
||||
(float) moveController.currentPosition.PointId,
|
||||
//2 distance to flag
|
||||
moveController.currentPosition.FlagDistance,
|
||||
//3 death count in point
|
||||
moveController.currentPosition.DeathAttr,
|
||||
//4 flagEnemyDistance
|
||||
GameManager.IsCloserToFlagFromNextNavPoint(point, transform.position) == true ? 1 : 0,
|
||||
//5 EnemyVsNavPointDistance
|
||||
GameManager.IsCloserToEnemyThanToNextNavPoint(point, transform.position, AgentCharacter.Team) == true
|
||||
? 1
|
||||
: 0
|
||||
};
|
||||
// var _parray = string.Join(" ", parray);
|
||||
// Debug.Log("OBS: " + _parray);
|
||||
bufferSensor.AppendObservation(parray);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Heuristic(in ActionBuffers actionsOut)
|
||||
{
|
||||
var discreteActionsOut = actionsOut.DiscreteActions;
|
||||
if (Input.GetKeyDown(KeyCode.W))
|
||||
{
|
||||
discreteActionsOut[0] = 1;
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,6 +149,7 @@ public class NPC : Agent, ICharacter
|
||||
var result = actions.DiscreteActions;
|
||||
if (result[0] == 0)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
if (navPointIdDict[moveController.PointStartID].navType != NavPointType.Cover)
|
||||
return;
|
||||
NpcState = CoverState;
|
||||
@ -147,6 +185,13 @@ public class NPC : Agent, ICharacter
|
||||
case 1: moveController.ReturnToStartPoint(); NpcState = RunningState; break;
|
||||
default: throw new ArgumentException("Undefined Action recieved");
|
||||
}
|
||||
=======
|
||||
moveController.MoveToRandomPoint();
|
||||
NPC_State = RunningState;
|
||||
} else if (actions.DiscreteActions[0] == 2)
|
||||
{
|
||||
moveController.MoveToPointById(actions.DiscreteActions[1]);
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -121,9 +121,11 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
case Team.Attackers:
|
||||
Debug.Log("Attackers Win");
|
||||
ResetScene();
|
||||
break;
|
||||
case Team.Defenders:
|
||||
Debug.Log("Defenders Win");
|
||||
ResetScene();
|
||||
break;
|
||||
}
|
||||
ResetScene();
|
||||
|
@ -17,12 +17,21 @@ public class NavPoint : MonoBehaviour
|
||||
public NavPointType navType = NavPointType.Direction;
|
||||
|
||||
[HideInInspector]
|
||||
<<<<<<< HEAD
|
||||
public int PointId = 0;
|
||||
=======
|
||||
public int PointId;
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
public float DeathAttr = 0;
|
||||
public List<Vector3> EnemiesSeen = new List<Vector3>();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
FlagDistance = (GameObject.FindGameObjectWithTag("Flag").transform.position - Position).magnitude;
|
||||
=======
|
||||
PointId = GetInstanceID();
|
||||
FlagDistance = (GameObject.FindGameObjectWithTag("Flag").transform.position - position).magnitude;
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
}
|
||||
}
|
||||
|
27
Assets/Settings/Game Settings.asset
generated
27
Assets/Settings/Game Settings.asset
generated
@ -12,6 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e2c47233b9062c84482336b145c6891b, type: 3}
|
||||
m_Name: Game Settings
|
||||
m_EditorClassIdentifier:
|
||||
<<<<<<< HEAD
|
||||
IsTesting: 0
|
||||
TimeToWin: 15
|
||||
TimeOut: 3600
|
||||
@ -38,3 +39,29 @@ MonoBehaviour:
|
||||
DoDamageChanceInRunning: 30
|
||||
DoDamageChanceInCover: 25
|
||||
CrouchingCoefficient: 1.4
|
||||
=======
|
||||
isTesting: 1
|
||||
timeToWin: 5
|
||||
timeOut: 1600
|
||||
movementDistance: 50
|
||||
movementSpeed: 3
|
||||
defTeamAI: 0
|
||||
atcTeamAI: 0
|
||||
numOfDefenders: 1
|
||||
numOfAttackers: 1
|
||||
hasHumanDefender: 1
|
||||
hasHumanAttacker: 0
|
||||
healthPickupAmount: 50
|
||||
armourPickupAmount: 50
|
||||
ammunitionPickupAmount: 120
|
||||
pickupsAmount: 2
|
||||
maxHealth: 100
|
||||
maxArmour: 100
|
||||
maxAmmo: 31337
|
||||
GetHitChanceInDirectPoint: 0
|
||||
GetHitChanceInRunning: 0
|
||||
GetHitChanceInCover: 0
|
||||
DoDamageChanceInDirectPoint: 0
|
||||
DoDamageChanceInRunning: 0
|
||||
DoDamageChanceInCover: 0
|
||||
>>>>>>> 351fa8ee12c499a0374be71a192a5f288611f467
|
||||
|
Reference in New Issue
Block a user