diff --git a/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs b/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs new file mode 100644 index 0000000..0bad5ae --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +[DisallowMultipleComponent] +public sealed class AirTarget : MapTarget +{ + protected override void TickMovement(float deltaTime) + { + if (Player == null || Config == null || Config.MovementSpeed <= 0f) + return; + + Vector2 playerCoordinates = Player.MapCoordinates; + if (Vector2.Distance(MapCoordinates, playerCoordinates) <= Config.StoppingDistance) + return; + + Vector2 nextCoordinates = Vector2.MoveTowards( + MapCoordinates, + playerCoordinates, + Config.MovementSpeed * deltaTime); + SetMapCoordinates(nextCoordinates); + } +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs.meta new file mode 100644 index 0000000..e952ac6 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/AirTarget.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d5316cf7562b473d9513878ea906a1b2 diff --git a/Assets/CONTENT/FEATURES/MapRadar/Configs.meta b/Assets/CONTENT/FEATURES/MapRadar/Configs.meta new file mode 100644 index 0000000..505f7a6 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Configs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 91a48705d8024711b1d912580a4c8bca +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset b/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset new file mode 100644 index 0000000..068bb5d --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4e7ec8e55a847eaa5c7914bf08d1f98, type: 3} + m_Name: AirTargetConfig + m_EditorClassIdentifier: Assembly-CSharp::TargetConfig + targetPrefab: {fileID: 878491239745611204, guid: 7ef28d9e428a4b94ab7ea4f36fd44d9c, type: 3} + timeBeforeAttack: 30 + health: 2 + requiredMissileType: 2 + movementSpeed: 0.05 + stoppingDistance: 0.25 diff --git a/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset.meta b/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset.meta new file mode 100644 index 0000000..90d45c3 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Configs/AirTargetConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e454536a6e36466c92a7cc8b5650d081 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset b/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset new file mode 100644 index 0000000..d9c5f38 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4e7ec8e55a847eaa5c7914bf08d1f98, type: 3} + m_Name: GroundTargetConfig + m_EditorClassIdentifier: Assembly-CSharp::TargetConfig + targetPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} + timeBeforeAttack: 50 + health: 5 + requiredMissileType: 3 + movementSpeed: 0 + stoppingDistance: 0.25 diff --git a/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset.meta b/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset.meta new file mode 100644 index 0000000..a638a7d --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Configs/GroundTargetConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35ee36b62afb47cd817570f494b93eae +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/FEATURES/MapRadar/Editor/MapCoordinateSystemEditor.cs b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapCoordinateSystemEditor.cs index a435ee2..715166f 100644 --- a/Assets/CONTENT/FEATURES/MapRadar/Editor/MapCoordinateSystemEditor.cs +++ b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapCoordinateSystemEditor.cs @@ -23,6 +23,7 @@ public sealed class MapCoordinateSystemEditor : Editor DrawCorners(coordinateSystem); DrawCrosshairs(coordinateSystem); DrawTargets(coordinateSystem); + DrawPlayers(coordinateSystem); } private static void DrawGrid(MapCoordinateSystem coordinateSystem) @@ -140,6 +141,23 @@ public sealed class MapCoordinateSystemEditor : Editor } } + private static void DrawPlayers(MapCoordinateSystem coordinateSystem) + { + MapPlayer[] players = Object.FindObjectsByType(FindObjectsSortMode.None); + foreach (MapPlayer mapPlayer in players) + { + if (mapPlayer.CoordinateSystem != null && mapPlayer.CoordinateSystem != coordinateSystem) + continue; + + Vector3 position = mapPlayer.transform.position; + Vector2 coordinates = coordinateSystem.WorldPositionToCoordinates(position); + Handles.Label( + position, + $"MapPlayer ({coordinates.x:0.00}, {coordinates.y:0.00})", + CreateLabelStyle(Color.green)); + } + } + private static GUIStyle CreateLabelStyle(Color color) { GUIStyle style = new(EditorStyles.boldLabel); diff --git a/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs new file mode 100644 index 0000000..a5dd276 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs @@ -0,0 +1,25 @@ +using UnityEditor; +using UnityEngine; + +[CustomEditor(typeof(MapTargetController))] +public sealed class MapTargetControllerEditor : Editor +{ + public override void OnInspectorGUI() + { + DrawDefaultInspector(); + EditorGUILayout.Space(); + + using (new EditorGUI.DisabledScope(!Application.isPlaying)) + { + if (GUILayout.Button("Start Next Wave")) + ((MapTargetController)target).StartNextWave(); + } + + if (!Application.isPlaying) + { + EditorGUILayout.HelpBox( + "Start Next Wave becomes available in Play Mode.", + MessageType.Info); + } + } +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs.meta new file mode 100644 index 0000000..b1cf93d --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Editor/MapTargetControllerEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 09f50d05321d420f86622f0dc7a6fa14 diff --git a/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs b/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs new file mode 100644 index 0000000..85d6a48 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs @@ -0,0 +1,4 @@ +[UnityEngine.DisallowMultipleComponent] +public sealed class GroundTarget : MapTarget +{ +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs.meta new file mode 100644 index 0000000..9a7bd9e --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/GroundTarget.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 8be0d56377aa4082a276cfe31702e80c diff --git a/Assets/CONTENT/FEATURES/MapRadar/MapController.cs b/Assets/CONTENT/FEATURES/MapRadar/MapController.cs index e7f9362..cb08857 100644 --- a/Assets/CONTENT/FEATURES/MapRadar/MapController.cs +++ b/Assets/CONTENT/FEATURES/MapRadar/MapController.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.Serialization; [DisallowMultipleComponent] public sealed class MapController : MonoBehaviour @@ -6,15 +7,16 @@ public sealed class MapController : MonoBehaviour [Header("Main References")] [SerializeField] private MapCrosshairController crosshair = null; [SerializeField] private MapCoordinateSystem coordinateSystem = null; + [SerializeField] private MapPlayer mapPlayer = null; [Header("Target System")] [SerializeField] private MapTargetController targetController = null; - [SerializeField] private MapTarget targetPrefab = null; [SerializeField] private Transform targetParent = null; - [SerializeField] private bool createTargetsOnStart = true; [Header("Radar System")] [SerializeField] private MapRadarController radarController = null; + [FormerlySerializedAs("targetPrefab")] + [SerializeField] private MapTarget radarMarkPrefab = null; [Header("Crosshair Objects")] [SerializeField] private Transform relayX = null; @@ -30,19 +32,14 @@ public sealed class MapController : MonoBehaviour private void Awake() { - if (targetController != null) - { - targetController.Configure( - coordinateSystem, - targetPrefab, - targetParent); + if (mapPlayer != null) + mapPlayer.Configure(coordinateSystem); - if (createTargetsOnStart) - targetController.CreateAndPlaceTargets(); - } + if (targetController != null) + targetController.Configure(coordinateSystem, targetParent, mapPlayer); if (radarController != null) - radarController.Configure(coordinateSystem, targetController, targetPrefab); + radarController.Configure(coordinateSystem, targetController, radarMarkPrefab); if (crosshair == null) return; @@ -81,6 +78,11 @@ public sealed class MapController : MonoBehaviour targetController.CreateAndPlaceTargets(); } + public bool StartNextWave() + { + return targetController != null && targetController.StartNextWave(); + } + public bool TryGetNearestTarget(out MapTarget target, out float distance) { if (crosshair != null) diff --git a/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs b/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs new file mode 100644 index 0000000..e25ffe6 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs @@ -0,0 +1,36 @@ +using UnityEngine; + +[DisallowMultipleComponent] +public sealed class MapPlayer : MonoBehaviour +{ + [Header("Map Position")] + [SerializeField] private Vector2 mapCoordinates = new(5f, 5f); + + private MapCoordinateSystem coordinateSystem; + + public Vector2 MapCoordinates => mapCoordinates; + public MapCoordinateSystem CoordinateSystem => coordinateSystem; + + public void Configure(MapCoordinateSystem newCoordinateSystem) + { + coordinateSystem = newCoordinateSystem; + SetMapCoordinates(mapCoordinates); + } + + public void SetMapCoordinates(Vector2 coordinates) + { + mapCoordinates = coordinateSystem != null + ? coordinateSystem.ClampCoordinates(coordinates) + : new Vector2( + Mathf.Clamp(coordinates.x, 0f, MapCoordinateSystem.CoordinateMaximum), + Mathf.Clamp(coordinates.y, 0f, MapCoordinateSystem.CoordinateMaximum)); + + if (coordinateSystem != null && coordinateSystem.HasValidCorners()) + transform.position = coordinateSystem.CoordinatesToWorldPosition(mapCoordinates); + } + + public Vector2 GetMapCoordinates() + { + return mapCoordinates; + } +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs.meta new file mode 100644 index 0000000..28440e8 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/MapPlayer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e8c0e4a1fa154b5ca06510a1443335bf diff --git a/Assets/CONTENT/FEATURES/MapRadar/MapTarget.cs b/Assets/CONTENT/FEATURES/MapRadar/MapTarget.cs index 398c183..0229fce 100644 --- a/Assets/CONTENT/FEATURES/MapRadar/MapTarget.cs +++ b/Assets/CONTENT/FEATURES/MapRadar/MapTarget.cs @@ -1,43 +1,57 @@ +using System; using UnityEngine; [DisallowMultipleComponent] -public sealed class MapTarget : MonoBehaviour +public class MapTarget : MonoBehaviour { - [Header("Map Position (Runtime)")] + [Header("Target State (Runtime)")] + [SerializeField] private TargetConfig config; + [SerializeField] private float timeUntilAttack; [SerializeField] private Vector2 mapCoordinates; + [SerializeField] private int currentHealth; + [SerializeField] private MissileType requiredMissileType; + [SerializeField] private bool isReadyToAttack; private MapCoordinateSystem coordinateSystem; - private Vector2 movementDirection; - private float movementSpeed; + private MapPlayer player; private bool isConfigured; private Renderer[] targetRenderers; public Vector2 MapCoordinates => mapCoordinates; public MapCoordinateSystem CoordinateSystem => coordinateSystem; + public TargetConfig Config => config; + public MapPlayer Player => player; + public float TimeUntilAttack => timeUntilAttack; + public int CurrentHealth => currentHealth; + public MissileType RequiredMissileType => requiredMissileType; + public bool IsReadyToAttack => isReadyToAttack; + + public event Action AttackReady; public void Configure( + TargetConfig newConfig, MapCoordinateSystem newCoordinateSystem, Vector2 startCoordinates, - float newMovementSpeed, - Vector2 initialDirection) + MapPlayer newPlayer) { + config = newConfig; coordinateSystem = newCoordinateSystem; - movementSpeed = Mathf.Max(0f, newMovementSpeed); - movementDirection = initialDirection.sqrMagnitude > Mathf.Epsilon - ? initialDirection.normalized - : Vector2.right; + player = newPlayer; + timeUntilAttack = config != null ? config.TimeBeforeAttack : 0f; + currentHealth = config != null ? config.Health : 1; + requiredMissileType = config != null ? config.RequiredMissileType : MissileType.None; + isReadyToAttack = false; isConfigured = coordinateSystem != null && coordinateSystem.HasValidCorners(); SetMapCoordinates(startCoordinates); } - private void Update() + protected virtual void Update() { - if (!isConfigured || movementSpeed <= 0f) + if (!isConfigured) return; - Vector2 nextCoordinates = mapCoordinates + movementDirection * (movementSpeed * Time.deltaTime); - ReflectAtMapBounds(ref nextCoordinates); - SetMapCoordinates(nextCoordinates); + TickAttackTimer(Time.deltaTime); + TickMovement(Time.deltaTime); } public void SetMapCoordinates(Vector2 coordinates) @@ -69,20 +83,20 @@ public sealed class MapTarget : MonoBehaviour } } - private void ReflectAtMapBounds(ref Vector2 coordinates) + protected virtual void TickMovement(float deltaTime) { - float maximum = MapCoordinateSystem.CoordinateMaximum; + } - if (coordinates.x < 0f || coordinates.x > maximum) - { - movementDirection.x = -movementDirection.x; - coordinates.x = Mathf.Clamp(coordinates.x, 0f, maximum); - } + private void TickAttackTimer(float deltaTime) + { + if (isReadyToAttack) + return; - if (coordinates.y < 0f || coordinates.y > maximum) - { - movementDirection.y = -movementDirection.y; - coordinates.y = Mathf.Clamp(coordinates.y, 0f, maximum); - } + timeUntilAttack = Mathf.Max(0f, timeUntilAttack - deltaTime); + if (timeUntilAttack > 0f) + return; + + isReadyToAttack = true; + AttackReady?.Invoke(this); } } diff --git a/Assets/CONTENT/FEATURES/MapRadar/MapTargetController.cs b/Assets/CONTENT/FEATURES/MapRadar/MapTargetController.cs index e1c173e..d5d4a68 100644 --- a/Assets/CONTENT/FEATURES/MapRadar/MapTargetController.cs +++ b/Assets/CONTENT/FEATURES/MapRadar/MapTargetController.cs @@ -4,84 +4,94 @@ using UnityEngine; [DisallowMultipleComponent] public sealed class MapTargetController : MonoBehaviour { - [Header("Target Settings")] - [SerializeField, Min(0)] private int targetCount = 5; - [SerializeField, Min(0f)] private float targetMovementSpeed = 1f; + [Header("Random Wave Settings")] + [SerializeField, Min(0)] private int targetsPerWave = 5; + [SerializeField] private TargetConfig[] randomTargetConfigs = System.Array.Empty(); - private readonly List targets = new(); + [Header("Current Wave (Runtime)")] + [SerializeField, Min(0)] private int currentWave; + [SerializeField] private List currentWaveTargets = new(); + + private readonly List pooledTargets = new(); private MapCoordinateSystem coordinateSystem; - private MapTarget targetPrefab; private Transform targetParent; + private MapPlayer player; private bool isConfigured; - public IReadOnlyList Targets => targets; - public int TargetCount => targetCount; - public float TargetMovementSpeed => targetMovementSpeed; + public IReadOnlyList Targets => currentWaveTargets; + public int CurrentWave => currentWave; + public int TargetsPerWave => targetsPerWave; + + private void Start() + { + if (currentWave == 0) + StartNextWave(); + } private void OnValidate() { - targetCount = Mathf.Max(0, targetCount); - targetMovementSpeed = Mathf.Max(0f, targetMovementSpeed); + targetsPerWave = Mathf.Max(0, targetsPerWave); + currentWave = Mathf.Max(0, currentWave); } public void Configure( MapCoordinateSystem newCoordinateSystem, - MapTarget newTargetPrefab, - Transform newTargetParent) + Transform newTargetParent, + MapPlayer newPlayer) { coordinateSystem = newCoordinateSystem; - targetPrefab = newTargetPrefab; targetParent = newTargetParent != null ? newTargetParent : transform; - isConfigured = coordinateSystem != null && - coordinateSystem.HasValidCorners() && - targetPrefab != null; + player = newPlayer; + isConfigured = coordinateSystem != null && coordinateSystem.HasValidCorners(); + + pooledTargets.Clear(); + foreach (MapTarget existingTarget in targetParent.GetComponentsInChildren(true)) + { + existingTarget.SetVisualsVisible(false); + existingTarget.gameObject.SetActive(false); + pooledTargets.Add(existingTarget); + } + } + + public bool StartNextWave() + { + if (!isConfigured || !HasValidTargetConfig()) + { + Debug.LogWarning("Target controller has no coordinate system or valid TargetConfig.", this); + return false; + } + + RetireCurrentWave(); + currentWave++; + + for (int index = 0; index < targetsPerWave; index++) + { + TargetConfig config = GetRandomValidConfig(); + if (config == null) + break; + + MapTarget target = GetPooledTarget(config); + if (target == null) + target = Instantiate(config.TargetPrefab, targetParent); + + target.name = $"Wave {currentWave} - {config.name} - {index + 1}"; + target.Configure(config, coordinateSystem, GetRandomCoordinates(), player); + target.SetVisualsVisible(false); + target.gameObject.SetActive(true); + currentWaveTargets.Add(target); + } + + return currentWaveTargets.Count > 0 || targetsPerWave == 0; } public void CreateAndPlaceTargets() { - if (!isConfigured) - { - Debug.LogWarning("Target system is not configured.", this); - return; - } - - RegisterExistingTargets(); - - while (targets.Count < targetCount) - { - MapTarget target = Instantiate(targetPrefab, targetParent); - target.name = $"Target_{targets.Count + 1}"; - targets.Add(target); - } - - while (targets.Count > targetCount) - { - int lastIndex = targets.Count - 1; - MapTarget target = targets[lastIndex]; - targets.RemoveAt(lastIndex); - - if (target != null) - Destroy(target.gameObject); - } - - for (int index = 0; index < targets.Count; index++) - { - MapTarget target = targets[index]; - if (target == null) - continue; - - target.Configure( - coordinateSystem, - GetRandomCoordinates(), - targetMovementSpeed, - Random.insideUnitCircle.normalized); - target.SetVisualsVisible(false); - } + StartNextWave(); } public void SetTargetVisualsVisible(bool isVisible) { - foreach (MapTarget target in targets) + foreach (MapTarget target in currentWaveTargets) { if (target != null) target.SetVisualsVisible(isVisible); @@ -90,19 +100,68 @@ public sealed class MapTargetController : MonoBehaviour public MapTarget GetTarget(int index) { - return index >= 0 && index < targets.Count ? targets[index] : null; + return index >= 0 && index < currentWaveTargets.Count + ? currentWaveTargets[index] + : null; } - private void RegisterExistingTargets() + private void RetireCurrentWave() { - targets.Clear(); - MapTarget[] existingTargets = targetParent.GetComponentsInChildren(true); - - foreach (MapTarget target in existingTargets) + foreach (MapTarget target in currentWaveTargets) { - if (target != null && !targets.Contains(target)) - targets.Add(target); + if (target == null) + continue; + + target.SetVisualsVisible(false); + target.gameObject.SetActive(false); + + if (!pooledTargets.Contains(target)) + pooledTargets.Add(target); } + + currentWaveTargets.Clear(); + } + + private MapTarget GetPooledTarget(TargetConfig config) + { + for (int index = pooledTargets.Count - 1; index >= 0; index--) + { + MapTarget candidate = pooledTargets[index]; + if (candidate == null) + { + pooledTargets.RemoveAt(index); + continue; + } + + if (candidate.GetType() != config.TargetPrefab.GetType()) + continue; + + pooledTargets.RemoveAt(index); + return candidate; + } + + return null; + } + + private bool HasValidTargetConfig() + { + return GetRandomValidConfig() != null; + } + + private TargetConfig GetRandomValidConfig() + { + if (randomTargetConfigs == null || randomTargetConfigs.Length == 0) + return null; + + int startIndex = Random.Range(0, randomTargetConfigs.Length); + for (int offset = 0; offset < randomTargetConfigs.Length; offset++) + { + TargetConfig config = randomTargetConfigs[(startIndex + offset) % randomTargetConfigs.Length]; + if (config != null && config.TargetPrefab != null) + return config; + } + + return null; } private static Vector2 GetRandomCoordinates() diff --git a/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs b/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs new file mode 100644 index 0000000..ba5b656 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs @@ -0,0 +1,7 @@ +public enum MissileType +{ + None = 0, + Standard = 1, + AntiAir = 2, + AntiGround = 3 +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs.meta new file mode 100644 index 0000000..476156c --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/MissileType.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7c284b720e314585add2b38671f83ccf diff --git a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab new file mode 100644 index 0000000..e2e0006 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab @@ -0,0 +1,129 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4012125527390687084 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2929517388927179322} + - component: {fileID: 1898238889115289471} + - component: {fileID: 5321613745555827914} + - component: {fileID: 212733908007784450} + - component: {fileID: 878491239745611204} + m_Layer: 0 + m_Name: AirTargetTest + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2929517388927179322 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4012125527390687084} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.39, y: 0.39, z: 0.39} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1898238889115289471 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4012125527390687084} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5321613745555827914 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4012125527390687084} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c57515654cf43eb4995ae19964d2ca0b, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &212733908007784450 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4012125527390687084} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &878491239745611204 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4012125527390687084} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d5316cf7562b473d9513878ea906a1b2, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AirTarget + config: {fileID: 0} + timeUntilAttack: 0 + mapCoordinates: {x: 0, y: 0} + currentHealth: 0 + requiredMissileType: 0 + isReadyToAttack: 0 diff --git a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab.meta b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab.meta new file mode 100644 index 0000000..b83d6c7 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/AirTargetTest.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7ef28d9e428a4b94ab7ea4f36fd44d9c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab new file mode 100644 index 0000000..549fab8 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab @@ -0,0 +1,124 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2177866398127073846 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8348844199957468506} + - component: {fileID: 272982991980855488} + - component: {fileID: 2419606774366489511} + - component: {fileID: 7430463338199182122} + - component: {fileID: 3288838730342684678} + m_Layer: 0 + m_Name: MapPlayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8348844199957468506 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2177866398127073846} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -11.339558, y: -0.48904037, z: 8.11739} + m_LocalScale: {x: 0.39, y: 0.39, z: 0.39} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &272982991980855488 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2177866398127073846} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2419606774366489511 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2177866398127073846} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b27d30c59586fb4499180239a9bd64f1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &7430463338199182122 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2177866398127073846} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &3288838730342684678 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2177866398127073846} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8c0e4a1fa154b5ca06510a1443335bf, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::MapPlayer + mapCoordinates: {x: 5, y: 5} diff --git a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab.meta b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab.meta new file mode 100644 index 0000000..794c8ca --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/MapPlayer.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 87ea05b44a3faf5489e6266f985c5324 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/TargetTest.prefab b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/TargetTest.prefab index af8d7e1..f049022 100644 --- a/Assets/CONTENT/FEATURES/MapRadar/Prefabs/TargetTest.prefab +++ b/Assets/CONTENT/FEATURES/MapRadar/Prefabs/TargetTest.prefab @@ -118,7 +118,12 @@ MonoBehaviour: m_GameObject: {fileID: 4012125527390687084} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2ae53f81d9ed4a0fb8d3496feac79ca1, type: 3} + m_Script: {fileID: 11500000, guid: 8be0d56377aa4082a276cfe31702e80c, type: 3} m_Name: - m_EditorClassIdentifier: Assembly-CSharp::MapTarget + m_EditorClassIdentifier: Assembly-CSharp::GroundTarget + config: {fileID: 0} + timeUntilAttack: 0 mapCoordinates: {x: 0, y: 0} + currentHealth: 0 + requiredMissileType: 0 + isReadyToAttack: 0 diff --git a/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs b/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs new file mode 100644 index 0000000..2477f6d --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs @@ -0,0 +1,32 @@ +using UnityEngine; + +[CreateAssetMenu(fileName = "TargetConfig", menuName = "Map Radar/Target Config")] +public sealed class TargetConfig : ScriptableObject +{ + [Header("Target Prefab")] + [SerializeField] private MapTarget targetPrefab = null; + + [Header("Target Stats")] + [SerializeField, Min(0f)] private float timeBeforeAttack = 5f; + [SerializeField, Min(1)] private int health = 100; + [SerializeField] private MissileType requiredMissileType = MissileType.Standard; + + [Header("Air Target Movement")] + [SerializeField, Min(0f)] private float movementSpeed = 1f; + [SerializeField, Min(0f)] private float stoppingDistance = 0.25f; + + public MapTarget TargetPrefab => targetPrefab; + public float TimeBeforeAttack => timeBeforeAttack; + public int Health => health; + public MissileType RequiredMissileType => requiredMissileType; + public float MovementSpeed => movementSpeed; + public float StoppingDistance => stoppingDistance; + + private void OnValidate() + { + timeBeforeAttack = Mathf.Max(0f, timeBeforeAttack); + health = Mathf.Max(1, health); + movementSpeed = Mathf.Max(0f, movementSpeed); + stoppingDistance = Mathf.Max(0f, stoppingDistance); + } +} diff --git a/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs.meta b/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs.meta new file mode 100644 index 0000000..32d7ac2 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/TargetConfig.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c4e7ec8e55a847eaa5c7914bf08d1f98 diff --git a/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat b/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat new file mode 100644 index 0000000..b3e1484 --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat @@ -0,0 +1,137 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MapPlayer + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _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: 2800000, guid: 2b2440b1910ed4bb6a835e2d074a9865, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + 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} + - _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} + - 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_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0.632 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.106 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.0816164, b: 1, a: 1} + - _Color: {r: 0, g: 0.08161638, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0.23383103, b: 2.7913604, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &3289058871599513036 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 diff --git a/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat.meta b/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat.meta new file mode 100644 index 0000000..8bf5b7a --- /dev/null +++ b/Assets/CONTENT/FEATURES/MapRadar/TestMaterial/MapPlayer.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b27d30c59586fb4499180239a9bd64f1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CONTENT/Scenes/Factory.unity b/Assets/CONTENT/Scenes/Factory.unity index bd925cc..a7f655b 100644 --- a/Assets/CONTENT/Scenes/Factory.unity +++ b/Assets/CONTENT/Scenes/Factory.unity @@ -11521,12 +11521,11 @@ Transform: m_GameObject: {fileID: 234250881} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -10.919558, y: 2.1109595, z: 5.498604} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1380956140} - m_Father: {fileID: 1023903076} + m_Children: [] + m_Father: {fileID: 1170400902} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &249301305 GameObject: @@ -49299,8 +49298,8 @@ Transform: - {fileID: 765942005} - {fileID: 1979767274} - {fileID: 2100000001} + - {fileID: 3273208810517680420} - {fileID: 1170400902} - - {fileID: 234250882} - {fileID: 1568403066} - {fileID: 2100000101} m_Father: {fileID: 0} @@ -54557,7 +54556,8 @@ Transform: m_LocalPosition: {x: -10.919558, y: 2.1109595, z: 5.498604} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 234250882} m_Father: {fileID: 1023903076} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1170400903 @@ -54570,10 +54570,14 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 06d2f3ff739a4a4ca04d749ccf14fd9c, type: 3} - m_Name: + m_Name: m_EditorClassIdentifier: Assembly-CSharp::MapTargetController - targetCount: 5 - targetMovementSpeed: 1 + targetsPerWave: 5 + randomTargetConfigs: + - {fileID: 11400000, guid: 35ee36b62afb47cd817570f494b93eae, type: 2} + - {fileID: 11400000, guid: e454536a6e36466c92a7cc8b5650d081, type: 2} + currentWave: 0 + currentWaveTargets: [] --- !u!1 &1173964211 GameObject: m_ObjectHideFlags: 0 @@ -76401,11 +76405,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &1380956140 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - m_PrefabInstance: {fileID: 417562189767920414} - m_PrefabAsset: {fileID: 0} --- !u!43 &1394027827 Mesh: m_ObjectHideFlags: 0 @@ -83306,7 +83305,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f1eaeed1aba94e03b8f4b98a580444de, type: 3} - m_Name: + m_Name: m_EditorClassIdentifier: Assembly-CSharp::MapCrosshairController nearestTarget: {fileID: 0} distanceToNearestTarget: -1 @@ -83320,15 +83319,15 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5a5f18d44c314323a2550f92ba7d988a, type: 3} - m_Name: + m_Name: m_EditorClassIdentifier: Assembly-CSharp::MapController crosshair: {fileID: 1568403067} coordinateSystem: {fileID: 2100000002} + mapPlayer: {fileID: 2477721892431383766} targetController: {fileID: 1170400903} - targetPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} targetParent: {fileID: 234250882} - createTargetsOnStart: 1 radarController: {fileID: 2100000102} + radarMarkPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} relayX: {fileID: 1833728127} relayY: {fileID: 495285245} crosshairVisual: {fileID: 1818350634} @@ -110092,7 +110091,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7206111709094332bdc9b4c7c44695b4, type: 3} - m_Name: + m_Name: m_EditorClassIdentifier: Assembly-CSharp::MapCoordinateSystem bottomLeft: {fileID: 2100000011} bottomRight: {fileID: 2100000021} @@ -110105,53 +110104,6 @@ MonoBehaviour: boundaryColor: {r: 1, g: 1, b: 1, a: 1} gridColor: {r: 1, g: 1, b: 1, a: 0.3} markerSize: 0.06 ---- !u!1 &2100000100 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2100000101} - - component: {fileID: 2100000102} - m_Layer: 0 - m_Name: Radar - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2100000101 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2100000100} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1023903076} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2100000102 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2100000100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 168bf77c50d14e44a54a3a2e6717d012, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::MapRadarController - cooldown: 5 - useKeyboardInput: 1 - cooldownRemaining: 0 --- !u!1 &2100000010 GameObject: m_ObjectHideFlags: 0 @@ -110276,6 +110228,53 @@ Transform: m_Children: [] m_Father: {fileID: 2100000001} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2100000100 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2100000101} + - component: {fileID: 2100000102} + m_Layer: 0 + m_Name: Radar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2100000101 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2100000100} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1023903076} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2100000102 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2100000100} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 168bf77c50d14e44a54a3a2e6717d012, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::MapRadarController + cooldown: 5 + useKeyboardInput: 1 + cooldownRemaining: 0 --- !u!43 &2100866914 Mesh: m_ObjectHideFlags: 0 @@ -111550,63 +111549,6 @@ Mesh: offset: 0 size: 0 path: ---- !u!1001 &417562189767920414 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 234250882} - m_Modifications: - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalPosition.x - value: -0.42 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalPosition.y - value: 3.280054 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalPosition.z - value: 2.6187859 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2929517388927179322, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4012125527390687084, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} - propertyPath: m_Name - value: TargetTest - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3} --- !u!1001 &2335897005086694582 PrefabInstance: m_ObjectHideFlags: 0 @@ -111753,6 +111695,82 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 04a6d9d9e28782a4a9f8f71ce4438fc0, type: 3} +--- !u!1001 &2477721892431383765 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1023903076} + m_Modifications: + - target: {fileID: 2177866398127073846, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_Name + value: MapPlayer + objectReference: {fileID: 0} + - target: {fileID: 3288838730342684678, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: mapCoordinates.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3288838730342684678, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: mapCoordinates.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalPosition.x + value: -11.339558 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalPosition.y + value: -0.48904037 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalPosition.z + value: 8.11739 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} +--- !u!114 &2477721892431383766 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3288838730342684678, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + m_PrefabInstance: {fileID: 2477721892431383765} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8c0e4a1fa154b5ca06510a1443335bf, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::MapPlayer --- !u!1001 &2589992063474871117 PrefabInstance: m_ObjectHideFlags: 0 @@ -111834,6 +111852,11 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9712e2459410a6d43b55ea9d3847e29a, type: 3} +--- !u!4 &3273208810517680420 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8348844199957468506, guid: 87ea05b44a3faf5489e6266f985c5324, type: 3} + m_PrefabInstance: {fileID: 2477721892431383765} + m_PrefabAsset: {fileID: 0} --- !u!1001 &3678782071432778941 PrefabInstance: m_ObjectHideFlags: 0