Skip to content

Commit

Permalink
Road added to the level setup system
Browse files Browse the repository at this point in the history
  • Loading branch information
arifemrebulut committed Sep 23, 2022
1 parent 4515063 commit 50dc391
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 135 deletions.
66 changes: 1 addition & 65 deletions Assets/Prefabs/Environment/LevelBase.prefab
Original file line number Diff line number Diff line change
@@ -1,67 +1,5 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &546593751778868018
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 546593751778868019}
m_Layer: 0
m_Name: NumberCubes
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &546593751778868019
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546593751778868018}
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: 546593753614098562}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &546593752953435870
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 546593752953435871}
m_Layer: 0
m_Name: Walls
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &546593752953435871
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546593752953435870}
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: 546593753614098562}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &546593753614098565
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -89,9 +27,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 546593752953435871}
- {fileID: 546593751778868019}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
63 changes: 0 additions & 63 deletions Assets/Prefabs/Environment/Levels.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -92,69 +92,6 @@ Transform:
m_Children:
- {fileID: 7116179399827610293}
- {fileID: 888156194509449408}
- {fileID: 1665731609572529560}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &8351519512899394258
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 9025097603850047240}
m_Modifications:
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7276498328561995595, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
propertyPath: m_Name
value: BottomPlane
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
--- !u!4 &1665731609572529560 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7276498328561995594, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
m_PrefabInstance: {fileID: 8351519512899394258}
m_PrefabAsset: {fileID: 0}
2 changes: 1 addition & 1 deletion Assets/Prefabs/Environment/RoadTile.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7276498327276042049}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.1, z: 15}
m_LocalPosition: {x: 0, y: 0.1, z: 0}
m_LocalScale: {x: 1, y: 0.2, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1246718367
RectTransform:
m_ObjectHideFlags: 0
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scriptables/ColorPrefabPairs.asset
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ MonoBehaviour:
prefab: {fileID: 2721616853752187161, guid: 37363700a0e98ed4d8de961f65eed9e1, type: 3}
- color: {r: 1, g: 1, b: 1, a: 0}
prefab: {fileID: 6970115088225149969, guid: b5cc39b2695165f438e01a3853cec940, type: 3}
- color: {r: 0, g: 0, b: 0, a: 0}
prefab: {fileID: 7276498328561995595, guid: 59c74d76621356944a62f7eaf07b2133, type: 3}
- color: {r: 0.6, g: 0.7411765, b: 0.8980392, a: 0}
prefab: {fileID: 7324695267098842583, guid: d2956bdaf7606e547a1a852d550a050e, type: 3}
- color: {r: 0.5372549, g: 0.69803923, b: 0.88235295, a: 0}
Expand Down
5 changes: 0 additions & 5 deletions Assets/Scripts/LevelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ private void CreateCurrentLevel()
{
Color pixelColor = levelTexture.GetPixel(x, y);

if (CompareColors(pixelColor, Color.black))
{
continue;
}

GameObject prefab = GetPrefabFromColor(pixelColor);
GameObject tile = Instantiate(prefab);

Expand Down

0 comments on commit 50dc391

Please sign in to comment.