Skip to content

Commit 84f8f6f

Browse files
committed
Add selection outline to buildings and update scenes
Added outline and selection color components to EnergyTower, Hangar, and MainStation prefabs for improved selection feedback. Reduced tree prefab scales for better visual fit. Updated InputController to support building rotation with Ctrl+R and fixed HUD controller references. Modified BluePlanetArea scene: replaced SampleScene assets, added NavMesh Surface, adjusted camera and object layers, and updated GameManager setup. Updated material sun direction vectors and improved camera movement parameters. Cleaned up obsolete SampleScene files.
1 parent 87050ea commit 84f8f6f

File tree

19 files changed

+345
-263
lines changed

19 files changed

+345
-263
lines changed

Red Strike/Assets/BuildingPlacement/Buildings/EnergyTower/EnergyTower.prefab

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ GameObject:
1414
- component: {fileID: 3418134255132300912}
1515
- component: {fileID: -4322946230525120543}
1616
- component: {fileID: 5647536224997323072}
17+
- component: {fileID: -872241184533086861}
18+
- component: {fileID: -7001656233245260738}
1719
m_Layer: 6
1820
m_Name: EnergyTower
1921
m_TagString: Build
@@ -159,6 +161,37 @@ BoxCollider:
159161
serializedVersion: 3
160162
m_Size: {x: 4.9999995, y: 6.974897, z: 4.9999995}
161163
m_Center: {x: 0, y: 3.4874485, z: 0}
164+
--- !u!114 &-872241184533086861
165+
MonoBehaviour:
166+
m_ObjectHideFlags: 0
167+
m_CorrespondingSourceObject: {fileID: 0}
168+
m_PrefabInstance: {fileID: 0}
169+
m_PrefabAsset: {fileID: 0}
170+
m_GameObject: {fileID: 4083171081778293073}
171+
m_Enabled: 1
172+
m_EditorHideFlags: 0
173+
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
174+
m_Name:
175+
m_EditorClassIdentifier:
176+
outlineMode: 0
177+
outlineColor: {r: 0, g: 0.681592, b: 1, a: 1}
178+
outlineWidth: 10
179+
precomputeOutline: 0
180+
bakeKeys: []
181+
bakeValues: []
182+
--- !u!114 &-7001656233245260738
183+
MonoBehaviour:
184+
m_ObjectHideFlags: 0
185+
m_CorrespondingSourceObject: {fileID: 0}
186+
m_PrefabInstance: {fileID: 0}
187+
m_PrefabAsset: {fileID: 0}
188+
m_GameObject: {fileID: 4083171081778293073}
189+
m_Enabled: 1
190+
m_EditorHideFlags: 0
191+
m_Script: {fileID: 11500000, guid: d3e01160669f82e499d3f5c9fdb4eebc, type: 3}
192+
m_Name:
193+
m_EditorClassIdentifier:
194+
selectionColor: {r: 0, g: 0, b: 0, a: 0}
162195
--- !u!1001 &1993968208826293375
163196
PrefabInstance:
164197
m_ObjectHideFlags: 0

Red Strike/Assets/BuildingPlacement/Buildings/Hangar/Hangar.prefab

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ GameObject:
101101
- component: {fileID: 5575137657921929340}
102102
- component: {fileID: 5840819227562748720}
103103
- component: {fileID: 7209396890379076767}
104+
- component: {fileID: 4972683189584550802}
105+
- component: {fileID: 2074529663016842200}
104106
m_Layer: 6
105107
m_Name: Hangar
106108
m_TagString: Build
@@ -247,6 +249,37 @@ BoxCollider:
247249
serializedVersion: 3
248250
m_Size: {x: 10.000004, y: 10.84212, z: 15.000002}
249251
m_Center: {x: 0, y: 5.421059, z: 0}
252+
--- !u!114 &4972683189584550802
253+
MonoBehaviour:
254+
m_ObjectHideFlags: 0
255+
m_CorrespondingSourceObject: {fileID: 0}
256+
m_PrefabInstance: {fileID: 0}
257+
m_PrefabAsset: {fileID: 0}
258+
m_GameObject: {fileID: 2490931318532185407}
259+
m_Enabled: 1
260+
m_EditorHideFlags: 0
261+
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
262+
m_Name:
263+
m_EditorClassIdentifier:
264+
outlineMode: 0
265+
outlineColor: {r: 1, g: 1, b: 1, a: 1}
266+
outlineWidth: 10
267+
precomputeOutline: 0
268+
bakeKeys: []
269+
bakeValues: []
270+
--- !u!114 &2074529663016842200
271+
MonoBehaviour:
272+
m_ObjectHideFlags: 0
273+
m_CorrespondingSourceObject: {fileID: 0}
274+
m_PrefabInstance: {fileID: 0}
275+
m_PrefabAsset: {fileID: 0}
276+
m_GameObject: {fileID: 2490931318532185407}
277+
m_Enabled: 1
278+
m_EditorHideFlags: 0
279+
m_Script: {fileID: 11500000, guid: d3e01160669f82e499d3f5c9fdb4eebc, type: 3}
280+
m_Name:
281+
m_EditorClassIdentifier:
282+
selectionColor: {r: 0, g: 0.681592, b: 1, a: 1}
250283
--- !u!1 &4485302380233545425
251284
GameObject:
252285
m_ObjectHideFlags: 0

Red Strike/Assets/BuildingPlacement/Buildings/MainStation/MainStation.prefab

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ GameObject:
1414
- component: {fileID: 5269824642355325504}
1515
- component: {fileID: 9197393951426874775}
1616
- component: {fileID: 8693801915148640960}
17+
- component: {fileID: 5126050239305511073}
18+
- component: {fileID: 5994895244335871503}
1719
m_Layer: 6
1820
m_Name: MainStation
1921
m_TagString: Build
@@ -157,6 +159,37 @@ BoxCollider:
157159
serializedVersion: 3
158160
m_Size: {x: 10, y: 7.0085044, z: 10}
159161
m_Center: {x: 0, y: 3.5042522, z: 0}
162+
--- !u!114 &5126050239305511073
163+
MonoBehaviour:
164+
m_ObjectHideFlags: 0
165+
m_CorrespondingSourceObject: {fileID: 0}
166+
m_PrefabInstance: {fileID: 0}
167+
m_PrefabAsset: {fileID: 0}
168+
m_GameObject: {fileID: 8096343076459658438}
169+
m_Enabled: 1
170+
m_EditorHideFlags: 0
171+
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
172+
m_Name:
173+
m_EditorClassIdentifier:
174+
outlineMode: 0
175+
outlineColor: {r: 1, g: 1, b: 1, a: 1}
176+
outlineWidth: 3.7
177+
precomputeOutline: 0
178+
bakeKeys: []
179+
bakeValues: []
180+
--- !u!114 &5994895244335871503
181+
MonoBehaviour:
182+
m_ObjectHideFlags: 0
183+
m_CorrespondingSourceObject: {fileID: 0}
184+
m_PrefabInstance: {fileID: 0}
185+
m_PrefabAsset: {fileID: 0}
186+
m_GameObject: {fileID: 8096343076459658438}
187+
m_Enabled: 1
188+
m_EditorHideFlags: 0
189+
m_Script: {fileID: 11500000, guid: d3e01160669f82e499d3f5c9fdb4eebc, type: 3}
190+
m_Name:
191+
m_EditorClassIdentifier:
192+
selectionColor: {r: 0, g: 0.681592, b: 1, a: 1}
160193
--- !u!1 &8342596905262714567
161194
GameObject:
162195
m_ObjectHideFlags: 0

Red Strike/Assets/Free Demo of Low Poly Space Alien Worlds 3D Asset Pack/Prefabs/Space Forest/SP_Trees/SP_Tree01.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Transform:
2828
serializedVersion: 2
2929
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
3030
m_LocalPosition: {x: 0, y: 0, z: 0}
31-
m_LocalScale: {x: 3, y: 3, z: 3}
31+
m_LocalScale: {x: 2, y: 2, z: 2}
3232
m_ConstrainProportionsScale: 1
3333
m_Children: []
3434
m_Father: {fileID: 0}

Red Strike/Assets/Free Demo of Low Poly Space Alien Worlds 3D Asset Pack/Prefabs/Space Forest/SP_Trees/SP_Tree02.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Transform:
2828
serializedVersion: 2
2929
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
3030
m_LocalPosition: {x: 0, y: 0, z: 0}
31-
m_LocalScale: {x: 3, y: 3, z: 3}
31+
m_LocalScale: {x: 2, y: 2, z: 2}
3232
m_ConstrainProportionsScale: 1
3333
m_Children: []
3434
m_Father: {fileID: 0}

Red Strike/Assets/Free Demo of Low Poly Space Alien Worlds 3D Asset Pack/Prefabs/Space Forest/SP_Trees/SP_Tree03.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Transform:
2828
serializedVersion: 2
2929
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
3030
m_LocalPosition: {x: 0, y: 0, z: 0}
31-
m_LocalScale: {x: 3, y: 3, z: 3}
31+
m_LocalScale: {x: 2, y: 2, z: 2}
3232
m_ConstrainProportionsScale: 1
3333
m_Children: []
3434
m_Father: {fileID: 0}

Red Strike/Assets/Free Demo of Low Poly Space Alien Worlds 3D Asset Pack/Prefabs/Space Forest/SP_Trees/SP_Tree04.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Transform:
2828
serializedVersion: 2
2929
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
3030
m_LocalPosition: {x: 0, y: 0, z: 0}
31-
m_LocalScale: {x: 3, y: 3, z: 3}
31+
m_LocalScale: {x: 2, y: 2, z: 2}
3232
m_ConstrainProportionsScale: 1
3333
m_Children: []
3434
m_Father: {fileID: 0}

Red Strike/Assets/InputController/InputController.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using BuildingPlacement;
55
using UISystem;
66
using System.Linq;
7-
using UnityEngine.EventSystems;
87
using UnityEngine.UIElements;
98

109
namespace InputController
@@ -22,8 +21,8 @@ public class InputController : MonoBehaviour
2221
private Vehicle currentSelectedVehicle;
2322
private List<GameObject> placedObjects = new List<GameObject>();
2423
public float minDistanceBetweenObjects = 5f;
25-
public VehiclesHUDController vehiclesHUDController;
26-
public BuildingHUDController buildingHUDController;
24+
private VehiclesHUDController vehiclesHUDController;
25+
private BuildingHUDController buildingHUDController;
2726

2827
private SelectionHighlighter vehicleHighlighter;
2928
private SelectionHighlighter targetHighlighter;
@@ -35,6 +34,9 @@ public class InputController : MonoBehaviour
3534
private void Start()
3635
{
3736
mainCamera = Camera.main;
37+
38+
vehiclesHUDController = GetComponent<VehiclesHUDController>();
39+
buildingHUDController = GetComponent<BuildingHUDController>();
3840
}
3941

4042
private void Update()
@@ -45,6 +47,14 @@ private void Update()
4547
return;
4648
}
4749

50+
if (tempBuildingHighlighter != null)
51+
{
52+
if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) && Input.GetKeyDown(KeyCode.R))
53+
{
54+
tempBuildingHighlighter.transform.Rotate(0, 90, 0);
55+
}
56+
}
57+
4858
if (Input.GetMouseButtonDown(0))
4959
{
5060
if (IsPointerOverUI())
@@ -95,6 +105,7 @@ private void PlaceBuilding()
95105
Debug.Log(currentSelectedBuilding.buildingName + " için maksimum yerleştirme limitine ulaşıldı.");
96106
return;
97107
}
108+
98109
GameObject placedObject = Instantiate(currentSelectedBuilding.buildingPrefab, spawnPosition, Quaternion.identity);
99110

100111
if (placedObject.GetComponent<SelectionHighlighter>() == null)
@@ -108,6 +119,9 @@ private void PlaceBuilding()
108119
buildingCounts[currentSelectedBuilding.buildingName] = 1;
109120

110121
currentSelectedBuilding = null;
122+
// Bir bina koyduktan sonra rotasyonu sıfırlamak isterseniz bu satırı açın:
123+
// currentRotation = Quaternion.identity;
124+
111125
Debug.Log(placedObject.name + " yerleştirildi.");
112126
}
113127
else

Red Strike/Assets/PlanetAtmosphereSystem/AtmosphereMaterial.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Material:
4747
- _GunesYonu: {r: -0.91, g: 0.4, b: 3.24, a: 0}
4848
- _RenkUzak: {r: 0, g: 0.10166844, b: 2.152374, a: 1}
4949
- _RenkYakin: {r: 0, g: 5.670685, b: 8, a: 1}
50-
- _SunDirection: {r: 0.27422887, g: -0.6066828, b: 0.7461465, a: 0}
50+
- _SunDirection: {r: -0, g: 0.4099231, b: -0.9121201, a: 0}
5151
m_BuildTextureStacks: []
5252
m_AllowLocking: 1
5353
--- !u!114 &1522106816477559216

Red Strike/Assets/PlanetAtmosphereSystem/CloudMaterial.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Material:
4242
- _QueueOffset: 0
4343
m_Colors:
4444
- _GunesYonu: {r: -1, g: 0, b: 0, a: 0}
45-
- _SunDirection: {r: 0.27422887, g: -0.6066828, b: 0.7461465, a: 0}
45+
- _SunDirection: {r: -0, g: 0.4099231, b: -0.9121201, a: 0}
4646
m_BuildTextureStacks: []
4747
m_AllowLocking: 1
4848
--- !u!114 &8499732345945835446

0 commit comments

Comments
 (0)