Skip to content

Commit

Permalink
Add player light
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPio committed Sep 6, 2024
1 parent 86ae2ee commit 9edb026
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 5 deletions.
125 changes: 122 additions & 3 deletions Assets/Resources/Prefabs/Player.prefab
Original file line number Diff line number Diff line change
@@ -1,5 +1,123 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2348291984738782865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3966304269219385497}
- component: {fileID: 581412215422325114}
- component: {fileID: 1849749894422984390}
m_Layer: 7
m_Name: PlayerLight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3966304269219385497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2348291984738782865}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: -0.19999999, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2007317451230954279}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!108 &581412215422325114
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2348291984738782865}
m_Enabled: 1
serializedVersion: 10
m_Type: 0
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1.65
m_Range: 20
m_SpotAngle: 179
m_InnerSpotAngle: 0
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 576
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 0
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!114 &1849749894422984390
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2348291984738782865}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0
--- !u!1 &3093968576730735090
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -138,7 +256,7 @@ AudioSource:
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
MaxDistance: 300
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
Expand Down Expand Up @@ -474,7 +592,7 @@ AudioSource:
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 250
MaxDistance: 300
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
Expand Down Expand Up @@ -642,7 +760,7 @@ AudioSource:
Priority: 128
DopplerLevel: 1
MinDistance: 10
MaxDistance: 200
MaxDistance: 250
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
Expand Down Expand Up @@ -1194,6 +1312,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 880347435875506566}
- {fileID: 3966304269219385497}
m_Father: {fileID: 1263851460940361170}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &3434581067932685962
Expand Down
2 changes: 2 additions & 0 deletions Assets/Resources/Prefabs/ui/NewLobbyMessageBox.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,8 @@ MonoBehaviour:
m_Options:
- m_Text: Harbor
m_Image: {fileID: 0}
- m_Text: City
m_Image: {fileID: 0}
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/Voxel.unity
Original file line number Diff line number Diff line change
Expand Up @@ -7235,7 +7235,7 @@ MonoBehaviour:
- {r: 1, g: 1, b: 1, a: 0}
- {r: 0.7529412, g: 0.7764706, b: 0.68235296, a: 0}
- {r: 0.57254905, g: 0.44705883, b: 0.34509805, a: 0}
- {r: 0.827451, g: 0.7921569, b: 0.6156863, a: 0}
- {r: 0.7058824, g: 0.65882355, b: 0.42352942, a: 0}
directionalLight: {fileID: 1611321447}
worldCanvas: {fileID: 1658400691}
uiCanvas: {fileID: 1611964765}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/VoxelEngine/WorldManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public async Task RenderMap(string mapName)

IEnumerator ActivatePrefabs()
{
yield return new WaitForSeconds(5f);
yield return new WaitForSeconds(4f);
foreach (var prop in SpawnedProps)
prop.Initialize();
}
Expand Down

0 comments on commit 9edb026

Please sign in to comment.