Skip to content

Commit 6ffe4dc

Browse files
committed
Add Air and Ground Vehicle base classes and OrnithopterA
Introduced AirVehicle and GroundVehicle base classes to the VehicleSystem, refactored Infantry to inherit from GroundVehicle, and added OrnithopterA as a new air vehicle with associated prefab, asset, and script. Updated SampleScene to include OrnithopterA, improved UI styles for HUD panels and unit buttons, and cleaned up the Ornithopter_Light_A prefab by removing unused components.
1 parent 52bc41b commit 6ffe4dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+8811
-188
lines changed

Red Strike/Assets/GameObject/prefabs_yup/unit_Ornithopter_Light_A_yup.prefab

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ GameObject:
9898
- component: {fileID: 5521458500478363074}
9999
- component: {fileID: 8867573191533259367}
100100
- component: {fileID: 6695451439647235757}
101-
- component: {fileID: 5637155014865986248}
102-
- component: {fileID: 8769629592880005954}
103-
- component: {fileID: 2370504145268915779}
104-
- component: {fileID: 851328236751033198}
105101
m_Layer: 0
106102
m_Name: unit_Ornithopter_Light_A_yup
107103
m_TagString: Untagged
@@ -180,93 +176,6 @@ MeshRenderer:
180176
m_SortingLayer: 0
181177
m_SortingOrder: 0
182178
m_AdditionalVertexStreams: {fileID: 0}
183-
--- !u!65 &5637155014865986248
184-
BoxCollider:
185-
m_ObjectHideFlags: 0
186-
m_CorrespondingSourceObject: {fileID: 0}
187-
m_PrefabInstance: {fileID: 0}
188-
m_PrefabAsset: {fileID: 0}
189-
m_GameObject: {fileID: 5182510588389146488}
190-
m_Material: {fileID: 0}
191-
m_IncludeLayers:
192-
serializedVersion: 2
193-
m_Bits: 0
194-
m_ExcludeLayers:
195-
serializedVersion: 2
196-
m_Bits: 0
197-
m_LayerOverridePriority: 0
198-
m_IsTrigger: 0
199-
m_ProvidesContacts: 0
200-
m_Enabled: 1
201-
serializedVersion: 3
202-
m_Size: {x: 8.071474, y: 2.0406804, z: 5.727791}
203-
m_Center: {x: -0.0013628006, y: 1.0203402, z: -1.5562091}
204-
--- !u!114 &8769629592880005954
205-
MonoBehaviour:
206-
m_ObjectHideFlags: 0
207-
m_CorrespondingSourceObject: {fileID: 0}
208-
m_PrefabInstance: {fileID: 0}
209-
m_PrefabAsset: {fileID: 0}
210-
m_GameObject: {fileID: 5182510588389146488}
211-
m_Enabled: 1
212-
m_EditorHideFlags: 0
213-
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
214-
m_Name:
215-
m_EditorClassIdentifier:
216-
outlineMode: 0
217-
outlineColor: {r: 1, g: 1, b: 1, a: 1}
218-
outlineWidth: 2
219-
precomputeOutline: 0
220-
bakeKeys: []
221-
bakeValues: []
222-
--- !u!114 &2370504145268915779
223-
MonoBehaviour:
224-
m_ObjectHideFlags: 0
225-
m_CorrespondingSourceObject: {fileID: 0}
226-
m_PrefabInstance: {fileID: 0}
227-
m_PrefabAsset: {fileID: 0}
228-
m_GameObject: {fileID: 5182510588389146488}
229-
m_Enabled: 1
230-
m_EditorHideFlags: 0
231-
m_Script: {fileID: 11500000, guid: 5dd8524bc905ef447b2cf4967d9c2aa8, type: 3}
232-
m_Name:
233-
m_EditorClassIdentifier:
234-
currentState: 0
235-
ornithopterType: 0
236-
resilience: 0.8
237-
speed: 5
238-
takeoffSpeed: 10
239-
attackRange: 35
240-
fireDistance: 30
241-
attackAltitude: 10
242-
cruiseAltitude: 25
243-
fireRate: 7
244-
rotationSpeed: 4
245-
pitchAngle: 15
246-
rollAngle: 30
247-
lookAheadWeight: 0.5
248-
targets:
249-
- {fileID: 0}
250-
- {fileID: 0}
251-
- {fileID: 0}
252-
BarrelTransform: {fileID: 3515409906739383745}
253-
bulletPrefab: {fileID: 8699837864222786616, guid: beb6ea4d225a14c4184713da1d56a3e3, type: 3}
254-
bulletSpeed: 50
255-
maxBarrelAngleX: 180
256-
inaccuracyRadius: 1
257-
--- !u!114 &851328236751033198
258-
MonoBehaviour:
259-
m_ObjectHideFlags: 0
260-
m_CorrespondingSourceObject: {fileID: 0}
261-
m_PrefabInstance: {fileID: 0}
262-
m_PrefabAsset: {fileID: 0}
263-
m_GameObject: {fileID: 5182510588389146488}
264-
m_Enabled: 1
265-
m_EditorHideFlags: 0
266-
m_Script: {fileID: 11500000, guid: a6f8716286822ed4db451c22933417a9, type: 3}
267-
m_Name:
268-
m_EditorClassIdentifier:
269-
vehicleControlUI: {fileID: 0}
270179
--- !u!1 &5457191916141336451
271180
GameObject:
272181
m_ObjectHideFlags: 0

Red Strike/Assets/Scenes/SampleScene.unity

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ Transform:
12431243
m_GameObject: {fileID: 460729958}
12441244
serializedVersion: 2
12451245
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1246-
m_LocalPosition: {x: -6.13, y: 1.5262477, z: -5.33}
1246+
m_LocalPosition: {x: -6.13, y: 1.5262477, z: 70.1}
12471247
m_LocalScale: {x: 1, y: 1, z: 1}
12481248
m_ConstrainProportionsScale: 0
12491249
m_Children: []
@@ -4823,6 +4823,10 @@ PrefabInstance:
48234823
propertyPath: m_Layer
48244824
value: 6
48254825
objectReference: {fileID: 0}
4826+
- target: {fileID: 224654450759790032, guid: 652e336fe8416d44694bb7c08b2b9f16, type: 3}
4827+
propertyPath: m_IsActive
4828+
value: 0
4829+
objectReference: {fileID: 0}
48264830
- target: {fileID: 3693194386570448113, guid: 652e336fe8416d44694bb7c08b2b9f16, type: 3}
48274831
propertyPath: targetObject
48284832
value:
@@ -4833,7 +4837,7 @@ PrefabInstance:
48334837
objectReference: {fileID: 0}
48344838
- target: {fileID: 6013372402639038236, guid: 652e336fe8416d44694bb7c08b2b9f16, type: 3}
48354839
propertyPath: m_LocalPosition.x
4836-
value: 4.1739273
4840+
value: 2.12
48374841
objectReference: {fileID: 0}
48384842
- target: {fileID: 6013372402639038236, guid: 652e336fe8416d44694bb7c08b2b9f16, type: 3}
48394843
propertyPath: m_LocalPosition.y
@@ -4887,6 +4891,83 @@ PrefabInstance:
48874891
addedObject: {fileID: 776273729}
48884892
m_AddedComponents: []
48894893
m_SourcePrefab: {fileID: 100100000, guid: 652e336fe8416d44694bb7c08b2b9f16, type: 3}
4894+
--- !u!1001 &8869919511360913589
4895+
PrefabInstance:
4896+
m_ObjectHideFlags: 0
4897+
serializedVersion: 2
4898+
m_Modification:
4899+
serializedVersion: 3
4900+
m_TransformParent: {fileID: 0}
4901+
m_Modifications:
4902+
- target: {fileID: -2782345837604721076, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4903+
propertyPath: bankSpeed
4904+
value: 30
4905+
objectReference: {fileID: 0}
4906+
- target: {fileID: -2782345837604721076, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4907+
propertyPath: maxBankAngle
4908+
value: 100
4909+
objectReference: {fileID: 0}
4910+
- target: {fileID: -2782345837604721076, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4911+
propertyPath: targetObject
4912+
value:
4913+
objectReference: {fileID: 460729958}
4914+
- target: {fileID: -2782345837604721076, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4915+
propertyPath: attackAltitude
4916+
value: 7
4917+
objectReference: {fileID: 0}
4918+
- target: {fileID: -2782345837604721076, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4919+
propertyPath: attackLobeRadius
4920+
value: 50
4921+
objectReference: {fileID: 0}
4922+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4923+
propertyPath: m_LocalPosition.x
4924+
value: 14.97344
4925+
objectReference: {fileID: 0}
4926+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4927+
propertyPath: m_LocalPosition.y
4928+
value: 4
4929+
objectReference: {fileID: 0}
4930+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4931+
propertyPath: m_LocalPosition.z
4932+
value: -48.2345
4933+
objectReference: {fileID: 0}
4934+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4935+
propertyPath: m_LocalRotation.w
4936+
value: 1
4937+
objectReference: {fileID: 0}
4938+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4939+
propertyPath: m_LocalRotation.x
4940+
value: 0
4941+
objectReference: {fileID: 0}
4942+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4943+
propertyPath: m_LocalRotation.y
4944+
value: 0
4945+
objectReference: {fileID: 0}
4946+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4947+
propertyPath: m_LocalRotation.z
4948+
value: 0
4949+
objectReference: {fileID: 0}
4950+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4951+
propertyPath: m_LocalEulerAnglesHint.x
4952+
value: 0
4953+
objectReference: {fileID: 0}
4954+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4955+
propertyPath: m_LocalEulerAnglesHint.y
4956+
value: 0
4957+
objectReference: {fileID: 0}
4958+
- target: {fileID: 4442516632743243454, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4959+
propertyPath: m_LocalEulerAnglesHint.z
4960+
value: 0
4961+
objectReference: {fileID: 0}
4962+
- target: {fileID: 5287324194948881211, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
4963+
propertyPath: m_Name
4964+
value: OrnithopterA
4965+
objectReference: {fileID: 0}
4966+
m_RemovedComponents: []
4967+
m_RemovedGameObjects: []
4968+
m_AddedGameObjects: []
4969+
m_AddedComponents: []
4970+
m_SourcePrefab: {fileID: 100100000, guid: a35a82b670e35ac4aa3594152075595d, type: 3}
48904971
--- !u!1660057539 &9223372036854775807
48914972
SceneRoots:
48924973
m_ObjectHideFlags: 0
@@ -4903,3 +4984,4 @@ SceneRoots:
49034984
- {fileID: 1556403731}
49044985
- {fileID: 1560688345}
49054986
- {fileID: 422005012}
4987+
- {fileID: 8869919511360913589}
Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.side-panel {
22
position: absolute;
3-
left: 12px;
4-
top: 46px;
3+
left: 20px;
4+
top: 50px;
55
flex-direction: column;
66
}
77

88
.info-panel {
99
position: absolute;
10-
right: 10px;
10+
right: 20px;
1111
top: 50px;
1212
background-color: rgba(45, 45, 45, 0.85);
1313
padding: 15px;
@@ -17,9 +17,9 @@
1717

1818
.unit-panel {
1919
position: absolute;
20-
bottom: 10px;
21-
left: 10px;
22-
transform: ;
20+
bottom: 20px;
21+
left: 50%;
22+
transform: translateX(-50%);
2323
flex-direction: row;
2424
}
2525

@@ -46,35 +46,12 @@
4646
white-space: normal;
4747
}
4848

49-
.unit-button--large {
50-
width: 130px;
51-
font-size: 18px;
52-
}
53-
54-
.unit-button--medium {
55-
width: 100px;
56-
}
57-
58-
.unit-button--small {
59-
width: 80px;
60-
font-size: 12px;
61-
}
62-
63-
.build-button:hover {
64-
background-color: rgba(90, 90, 90, 0.95);
65-
}
66-
67-
.unit-button:hover {
68-
background-color: rgba(90, 90, 90, 0.95);
69-
}
49+
.unit-button--large { width: 130px; font-size: 18px; }
50+
.unit-button--medium { width: 100px; }
51+
.unit-button--small { width: 80px; font-size: 12px; }
7052

71-
.build-button:active {
72-
background-color: rgb(120, 120, 120);
73-
}
74-
75-
.unit-button:active {
76-
background-color: rgb(120, 120, 120);
77-
}
53+
.build-button:hover, .unit-button:hover { background-color: rgba(90, 90, 90, 0.95); }
54+
.build-button:active, .unit-button:active { background-color: rgba(120, 120, 120, 1); }
7855

7956
.details-title {
8057
color: white;
@@ -87,4 +64,4 @@
8764
color: rgb(220, 220, 220);
8865
font-size: 14px;
8966
margin-bottom: 5px;
90-
}
67+
}

0 commit comments

Comments
 (0)