Mappp
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5316cf7562b473d9513878ea906a1b2
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 91a48705d8024711b1d912580a4c8bca
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e454536a6e36466c92a7cc8b5650d081
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 35ee36b62afb47cd817570f494b93eae
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -23,6 +23,7 @@ public sealed class MapCoordinateSystemEditor : Editor
|
|||||||
DrawCorners(coordinateSystem);
|
DrawCorners(coordinateSystem);
|
||||||
DrawCrosshairs(coordinateSystem);
|
DrawCrosshairs(coordinateSystem);
|
||||||
DrawTargets(coordinateSystem);
|
DrawTargets(coordinateSystem);
|
||||||
|
DrawPlayers(coordinateSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DrawGrid(MapCoordinateSystem 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<MapPlayer>(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)
|
private static GUIStyle CreateLabelStyle(Color color)
|
||||||
{
|
{
|
||||||
GUIStyle style = new(EditorStyles.boldLabel);
|
GUIStyle style = new(EditorStyles.boldLabel);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 09f50d05321d420f86622f0dc7a6fa14
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[UnityEngine.DisallowMultipleComponent]
|
||||||
|
public sealed class GroundTarget : MapTarget
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8be0d56377aa4082a276cfe31702e80c
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
public sealed class MapController : MonoBehaviour
|
public sealed class MapController : MonoBehaviour
|
||||||
@@ -6,15 +7,16 @@ public sealed class MapController : MonoBehaviour
|
|||||||
[Header("Main References")]
|
[Header("Main References")]
|
||||||
[SerializeField] private MapCrosshairController crosshair = null;
|
[SerializeField] private MapCrosshairController crosshair = null;
|
||||||
[SerializeField] private MapCoordinateSystem coordinateSystem = null;
|
[SerializeField] private MapCoordinateSystem coordinateSystem = null;
|
||||||
|
[SerializeField] private MapPlayer mapPlayer = null;
|
||||||
|
|
||||||
[Header("Target System")]
|
[Header("Target System")]
|
||||||
[SerializeField] private MapTargetController targetController = null;
|
[SerializeField] private MapTargetController targetController = null;
|
||||||
[SerializeField] private MapTarget targetPrefab = null;
|
|
||||||
[SerializeField] private Transform targetParent = null;
|
[SerializeField] private Transform targetParent = null;
|
||||||
[SerializeField] private bool createTargetsOnStart = true;
|
|
||||||
|
|
||||||
[Header("Radar System")]
|
[Header("Radar System")]
|
||||||
[SerializeField] private MapRadarController radarController = null;
|
[SerializeField] private MapRadarController radarController = null;
|
||||||
|
[FormerlySerializedAs("targetPrefab")]
|
||||||
|
[SerializeField] private MapTarget radarMarkPrefab = null;
|
||||||
|
|
||||||
[Header("Crosshair Objects")]
|
[Header("Crosshair Objects")]
|
||||||
[SerializeField] private Transform relayX = null;
|
[SerializeField] private Transform relayX = null;
|
||||||
@@ -30,19 +32,14 @@ public sealed class MapController : MonoBehaviour
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
if (targetController != null)
|
if (mapPlayer != null)
|
||||||
{
|
mapPlayer.Configure(coordinateSystem);
|
||||||
targetController.Configure(
|
|
||||||
coordinateSystem,
|
|
||||||
targetPrefab,
|
|
||||||
targetParent);
|
|
||||||
|
|
||||||
if (createTargetsOnStart)
|
if (targetController != null)
|
||||||
targetController.CreateAndPlaceTargets();
|
targetController.Configure(coordinateSystem, targetParent, mapPlayer);
|
||||||
}
|
|
||||||
|
|
||||||
if (radarController != null)
|
if (radarController != null)
|
||||||
radarController.Configure(coordinateSystem, targetController, targetPrefab);
|
radarController.Configure(coordinateSystem, targetController, radarMarkPrefab);
|
||||||
|
|
||||||
if (crosshair == null)
|
if (crosshair == null)
|
||||||
return;
|
return;
|
||||||
@@ -81,6 +78,11 @@ public sealed class MapController : MonoBehaviour
|
|||||||
targetController.CreateAndPlaceTargets();
|
targetController.CreateAndPlaceTargets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool StartNextWave()
|
||||||
|
{
|
||||||
|
return targetController != null && targetController.StartNextWave();
|
||||||
|
}
|
||||||
|
|
||||||
public bool TryGetNearestTarget(out MapTarget target, out float distance)
|
public bool TryGetNearestTarget(out MapTarget target, out float distance)
|
||||||
{
|
{
|
||||||
if (crosshair != null)
|
if (crosshair != null)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e8c0e4a1fa154b5ca06510a1443335bf
|
||||||
@@ -1,43 +1,57 @@
|
|||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[DisallowMultipleComponent]
|
[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 Vector2 mapCoordinates;
|
||||||
|
[SerializeField] private int currentHealth;
|
||||||
|
[SerializeField] private MissileType requiredMissileType;
|
||||||
|
[SerializeField] private bool isReadyToAttack;
|
||||||
|
|
||||||
private MapCoordinateSystem coordinateSystem;
|
private MapCoordinateSystem coordinateSystem;
|
||||||
private Vector2 movementDirection;
|
private MapPlayer player;
|
||||||
private float movementSpeed;
|
|
||||||
private bool isConfigured;
|
private bool isConfigured;
|
||||||
private Renderer[] targetRenderers;
|
private Renderer[] targetRenderers;
|
||||||
|
|
||||||
public Vector2 MapCoordinates => mapCoordinates;
|
public Vector2 MapCoordinates => mapCoordinates;
|
||||||
public MapCoordinateSystem CoordinateSystem => coordinateSystem;
|
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<MapTarget> AttackReady;
|
||||||
|
|
||||||
public void Configure(
|
public void Configure(
|
||||||
|
TargetConfig newConfig,
|
||||||
MapCoordinateSystem newCoordinateSystem,
|
MapCoordinateSystem newCoordinateSystem,
|
||||||
Vector2 startCoordinates,
|
Vector2 startCoordinates,
|
||||||
float newMovementSpeed,
|
MapPlayer newPlayer)
|
||||||
Vector2 initialDirection)
|
|
||||||
{
|
{
|
||||||
|
config = newConfig;
|
||||||
coordinateSystem = newCoordinateSystem;
|
coordinateSystem = newCoordinateSystem;
|
||||||
movementSpeed = Mathf.Max(0f, newMovementSpeed);
|
player = newPlayer;
|
||||||
movementDirection = initialDirection.sqrMagnitude > Mathf.Epsilon
|
timeUntilAttack = config != null ? config.TimeBeforeAttack : 0f;
|
||||||
? initialDirection.normalized
|
currentHealth = config != null ? config.Health : 1;
|
||||||
: Vector2.right;
|
requiredMissileType = config != null ? config.RequiredMissileType : MissileType.None;
|
||||||
|
isReadyToAttack = false;
|
||||||
isConfigured = coordinateSystem != null && coordinateSystem.HasValidCorners();
|
isConfigured = coordinateSystem != null && coordinateSystem.HasValidCorners();
|
||||||
SetMapCoordinates(startCoordinates);
|
SetMapCoordinates(startCoordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
protected virtual void Update()
|
||||||
{
|
{
|
||||||
if (!isConfigured || movementSpeed <= 0f)
|
if (!isConfigured)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vector2 nextCoordinates = mapCoordinates + movementDirection * (movementSpeed * Time.deltaTime);
|
TickAttackTimer(Time.deltaTime);
|
||||||
ReflectAtMapBounds(ref nextCoordinates);
|
TickMovement(Time.deltaTime);
|
||||||
SetMapCoordinates(nextCoordinates);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMapCoordinates(Vector2 coordinates)
|
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)
|
private void TickAttackTimer(float deltaTime)
|
||||||
{
|
{
|
||||||
movementDirection.x = -movementDirection.x;
|
if (isReadyToAttack)
|
||||||
coordinates.x = Mathf.Clamp(coordinates.x, 0f, maximum);
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (coordinates.y < 0f || coordinates.y > maximum)
|
timeUntilAttack = Mathf.Max(0f, timeUntilAttack - deltaTime);
|
||||||
{
|
if (timeUntilAttack > 0f)
|
||||||
movementDirection.y = -movementDirection.y;
|
return;
|
||||||
coordinates.y = Mathf.Clamp(coordinates.y, 0f, maximum);
|
|
||||||
}
|
isReadyToAttack = true;
|
||||||
|
AttackReady?.Invoke(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,84 +4,94 @@ using UnityEngine;
|
|||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
public sealed class MapTargetController : MonoBehaviour
|
public sealed class MapTargetController : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("Target Settings")]
|
[Header("Random Wave Settings")]
|
||||||
[SerializeField, Min(0)] private int targetCount = 5;
|
[SerializeField, Min(0)] private int targetsPerWave = 5;
|
||||||
[SerializeField, Min(0f)] private float targetMovementSpeed = 1f;
|
[SerializeField] private TargetConfig[] randomTargetConfigs = System.Array.Empty<TargetConfig>();
|
||||||
|
|
||||||
private readonly List<MapTarget> targets = new();
|
[Header("Current Wave (Runtime)")]
|
||||||
|
[SerializeField, Min(0)] private int currentWave;
|
||||||
|
[SerializeField] private List<MapTarget> currentWaveTargets = new();
|
||||||
|
|
||||||
|
private readonly List<MapTarget> pooledTargets = new();
|
||||||
private MapCoordinateSystem coordinateSystem;
|
private MapCoordinateSystem coordinateSystem;
|
||||||
private MapTarget targetPrefab;
|
|
||||||
private Transform targetParent;
|
private Transform targetParent;
|
||||||
|
private MapPlayer player;
|
||||||
private bool isConfigured;
|
private bool isConfigured;
|
||||||
|
|
||||||
public IReadOnlyList<MapTarget> Targets => targets;
|
public IReadOnlyList<MapTarget> Targets => currentWaveTargets;
|
||||||
public int TargetCount => targetCount;
|
public int CurrentWave => currentWave;
|
||||||
public float TargetMovementSpeed => targetMovementSpeed;
|
public int TargetsPerWave => targetsPerWave;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
if (currentWave == 0)
|
||||||
|
StartNextWave();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
{
|
{
|
||||||
targetCount = Mathf.Max(0, targetCount);
|
targetsPerWave = Mathf.Max(0, targetsPerWave);
|
||||||
targetMovementSpeed = Mathf.Max(0f, targetMovementSpeed);
|
currentWave = Mathf.Max(0, currentWave);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(
|
public void Configure(
|
||||||
MapCoordinateSystem newCoordinateSystem,
|
MapCoordinateSystem newCoordinateSystem,
|
||||||
MapTarget newTargetPrefab,
|
Transform newTargetParent,
|
||||||
Transform newTargetParent)
|
MapPlayer newPlayer)
|
||||||
{
|
{
|
||||||
coordinateSystem = newCoordinateSystem;
|
coordinateSystem = newCoordinateSystem;
|
||||||
targetPrefab = newTargetPrefab;
|
|
||||||
targetParent = newTargetParent != null ? newTargetParent : transform;
|
targetParent = newTargetParent != null ? newTargetParent : transform;
|
||||||
isConfigured = coordinateSystem != null &&
|
player = newPlayer;
|
||||||
coordinateSystem.HasValidCorners() &&
|
isConfigured = coordinateSystem != null && coordinateSystem.HasValidCorners();
|
||||||
targetPrefab != null;
|
|
||||||
|
pooledTargets.Clear();
|
||||||
|
foreach (MapTarget existingTarget in targetParent.GetComponentsInChildren<MapTarget>(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()
|
public void CreateAndPlaceTargets()
|
||||||
{
|
{
|
||||||
if (!isConfigured)
|
StartNextWave();
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTargetVisualsVisible(bool isVisible)
|
public void SetTargetVisualsVisible(bool isVisible)
|
||||||
{
|
{
|
||||||
foreach (MapTarget target in targets)
|
foreach (MapTarget target in currentWaveTargets)
|
||||||
{
|
{
|
||||||
if (target != null)
|
if (target != null)
|
||||||
target.SetVisualsVisible(isVisible);
|
target.SetVisualsVisible(isVisible);
|
||||||
@@ -90,19 +100,68 @@ public sealed class MapTargetController : MonoBehaviour
|
|||||||
|
|
||||||
public MapTarget GetTarget(int index)
|
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();
|
foreach (MapTarget target in currentWaveTargets)
|
||||||
MapTarget[] existingTargets = targetParent.GetComponentsInChildren<MapTarget>(true);
|
|
||||||
|
|
||||||
foreach (MapTarget target in existingTargets)
|
|
||||||
{
|
{
|
||||||
if (target != null && !targets.Contains(target))
|
if (target == null)
|
||||||
targets.Add(target);
|
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()
|
private static Vector2 GetRandomCoordinates()
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
public enum MissileType
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Standard = 1,
|
||||||
|
AntiAir = 2,
|
||||||
|
AntiGround = 3
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7c284b720e314585add2b38671f83ccf
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7ef28d9e428a4b94ab7ea4f36fd44d9c
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -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}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 87ea05b44a3faf5489e6266f985c5324
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -118,7 +118,12 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 4012125527390687084}
|
m_GameObject: {fileID: 4012125527390687084}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 2ae53f81d9ed4a0fb8d3496feac79ca1, type: 3}
|
m_Script: {fileID: 11500000, guid: 8be0d56377aa4082a276cfe31702e80c, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::MapTarget
|
m_EditorClassIdentifier: Assembly-CSharp::GroundTarget
|
||||||
|
config: {fileID: 0}
|
||||||
|
timeUntilAttack: 0
|
||||||
mapCoordinates: {x: 0, y: 0}
|
mapCoordinates: {x: 0, y: 0}
|
||||||
|
currentHealth: 0
|
||||||
|
requiredMissileType: 0
|
||||||
|
isReadyToAttack: 0
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c4e7ec8e55a847eaa5c7914bf08d1f98
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b27d30c59586fb4499180239a9bd64f1
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+142
-119
@@ -11521,12 +11521,11 @@ Transform:
|
|||||||
m_GameObject: {fileID: 234250881}
|
m_GameObject: {fileID: 234250881}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children: []
|
||||||
- {fileID: 1380956140}
|
m_Father: {fileID: 1170400902}
|
||||||
m_Father: {fileID: 1023903076}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &249301305
|
--- !u!1 &249301305
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -49299,8 +49298,8 @@ Transform:
|
|||||||
- {fileID: 765942005}
|
- {fileID: 765942005}
|
||||||
- {fileID: 1979767274}
|
- {fileID: 1979767274}
|
||||||
- {fileID: 2100000001}
|
- {fileID: 2100000001}
|
||||||
|
- {fileID: 3273208810517680420}
|
||||||
- {fileID: 1170400902}
|
- {fileID: 1170400902}
|
||||||
- {fileID: 234250882}
|
|
||||||
- {fileID: 1568403066}
|
- {fileID: 1568403066}
|
||||||
- {fileID: 2100000101}
|
- {fileID: 2100000101}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@@ -54557,7 +54556,8 @@ Transform:
|
|||||||
m_LocalPosition: {x: -10.919558, y: 2.1109595, z: 5.498604}
|
m_LocalPosition: {x: -10.919558, y: 2.1109595, z: 5.498604}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 234250882}
|
||||||
m_Father: {fileID: 1023903076}
|
m_Father: {fileID: 1023903076}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &1170400903
|
--- !u!114 &1170400903
|
||||||
@@ -54572,8 +54572,12 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 06d2f3ff739a4a4ca04d749ccf14fd9c, type: 3}
|
m_Script: {fileID: 11500000, guid: 06d2f3ff739a4a4ca04d749ccf14fd9c, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::MapTargetController
|
m_EditorClassIdentifier: Assembly-CSharp::MapTargetController
|
||||||
targetCount: 5
|
targetsPerWave: 5
|
||||||
targetMovementSpeed: 1
|
randomTargetConfigs:
|
||||||
|
- {fileID: 11400000, guid: 35ee36b62afb47cd817570f494b93eae, type: 2}
|
||||||
|
- {fileID: 11400000, guid: e454536a6e36466c92a7cc8b5650d081, type: 2}
|
||||||
|
currentWave: 0
|
||||||
|
currentWaveTargets: []
|
||||||
--- !u!1 &1173964211
|
--- !u!1 &1173964211
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -76401,11 +76405,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 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
|
--- !u!43 &1394027827
|
||||||
Mesh:
|
Mesh:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -83324,11 +83323,11 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Assembly-CSharp::MapController
|
m_EditorClassIdentifier: Assembly-CSharp::MapController
|
||||||
crosshair: {fileID: 1568403067}
|
crosshair: {fileID: 1568403067}
|
||||||
coordinateSystem: {fileID: 2100000002}
|
coordinateSystem: {fileID: 2100000002}
|
||||||
|
mapPlayer: {fileID: 2477721892431383766}
|
||||||
targetController: {fileID: 1170400903}
|
targetController: {fileID: 1170400903}
|
||||||
targetPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3}
|
|
||||||
targetParent: {fileID: 234250882}
|
targetParent: {fileID: 234250882}
|
||||||
createTargetsOnStart: 1
|
|
||||||
radarController: {fileID: 2100000102}
|
radarController: {fileID: 2100000102}
|
||||||
|
radarMarkPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3}
|
||||||
relayX: {fileID: 1833728127}
|
relayX: {fileID: 1833728127}
|
||||||
relayY: {fileID: 495285245}
|
relayY: {fileID: 495285245}
|
||||||
crosshairVisual: {fileID: 1818350634}
|
crosshairVisual: {fileID: 1818350634}
|
||||||
@@ -110105,53 +110104,6 @@ MonoBehaviour:
|
|||||||
boundaryColor: {r: 1, g: 1, b: 1, a: 1}
|
boundaryColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
gridColor: {r: 1, g: 1, b: 1, a: 0.3}
|
gridColor: {r: 1, g: 1, b: 1, a: 0.3}
|
||||||
markerSize: 0.06
|
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
|
--- !u!1 &2100000010
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -110276,6 +110228,53 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 2100000001}
|
m_Father: {fileID: 2100000001}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
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
|
--- !u!43 &2100866914
|
||||||
Mesh:
|
Mesh:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -111550,63 +111549,6 @@ Mesh:
|
|||||||
offset: 0
|
offset: 0
|
||||||
size: 0
|
size: 0
|
||||||
path:
|
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
|
--- !u!1001 &2335897005086694582
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -111753,6 +111695,82 @@ PrefabInstance:
|
|||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 04a6d9d9e28782a4a9f8f71ce4438fc0, type: 3}
|
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
|
--- !u!1001 &2589992063474871117
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -111834,6 +111852,11 @@ PrefabInstance:
|
|||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 9712e2459410a6d43b55ea9d3847e29a, type: 3}
|
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
|
--- !u!1001 &3678782071432778941
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user