测试代码提交
This commit is contained in:
@@ -1067,7 +1067,7 @@ GameObject:
|
||||
- component: {fileID: 909052972}
|
||||
- component: {fileID: 909052971}
|
||||
- component: {fileID: 909052970}
|
||||
m_Layer: 0
|
||||
m_Layer: 3
|
||||
m_Name: Terrain
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -1143,7 +1143,7 @@ Transform:
|
||||
m_GameObject: {fileID: 909052969}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -53, y: -1.75, z: -55.52}
|
||||
m_LocalPosition: {x: -53, y: -0.5, z: -55.52}
|
||||
m_LocalScale: {x: 100, y: 100, z: 100}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -2177,8 +2177,9 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Test.BobberTest
|
||||
rb: {fileID: 1518432885}
|
||||
line: {fileID: 6434087796225375415}
|
||||
lineLength: 3
|
||||
floatLength: 1
|
||||
Terrain: {fileID: 909052972}
|
||||
lineLength: 4
|
||||
floatLength: 1.5
|
||||
Tension: 0
|
||||
--- !u!1 &1529912227
|
||||
GameObject:
|
||||
@@ -5184,6 +5185,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: PostProcessing
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6079220456006713144, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
@@ -6102,6 +6107,8 @@ MonoBehaviour:
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
@@ -6154,6 +6161,8 @@ MonoBehaviour:
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
@@ -6814,7 +6823,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!222 &7490067230206654995
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7161,6 +7170,8 @@ MonoBehaviour:
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
@@ -7213,6 +7224,8 @@ MonoBehaviour:
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
|
||||
@@ -123,5 +123,11 @@ namespace NBF
|
||||
}
|
||||
fishingRope.SetTargetLength(value);
|
||||
}
|
||||
|
||||
public void SetLureLength(float value)
|
||||
{
|
||||
Log.Error($"SetObiRopeStretch={value}");
|
||||
bobberRope.SetTargetLength(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using NBF;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -9,10 +10,13 @@ namespace Test
|
||||
public Rigidbody rb;
|
||||
public FLine line;
|
||||
|
||||
public Transform Terrain;
|
||||
|
||||
public float lineLength = 1f;
|
||||
public float floatLength = 0.5f;
|
||||
|
||||
public float Tension = 0;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
line.InitTest(rb);
|
||||
@@ -20,8 +24,9 @@ namespace Test
|
||||
line.Lure.SetJointDistance(floatLength);
|
||||
line.Bobber.SetJointDistance(lineLength - floatLength);
|
||||
line.SetTargetLength(lineLength - floatLength);
|
||||
line.SetLureLength(floatLength);
|
||||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Alpha0))
|
||||
@@ -38,8 +43,18 @@ namespace Test
|
||||
lineLength -= 0.1f;
|
||||
SetLineLength(lineLength);
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.K))
|
||||
{
|
||||
var pos = Terrain.localPosition;
|
||||
Terrain.DOLocalMoveY(pos.y - 0.02f, 0.2f);
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.L))
|
||||
{
|
||||
var pos = Terrain.localPosition;
|
||||
Terrain.DOLocalMoveY(pos.y + 0.02f, 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetLineLength(float lineLength, bool stretchRope = true)
|
||||
{
|
||||
Debug.Log($"lineLength={lineLength}");
|
||||
@@ -64,6 +79,5 @@ namespace Test
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ Material:
|
||||
- _Crest_CausticsDepthOfField: 6
|
||||
- _Crest_CausticsDistortionScale: 250
|
||||
- _Crest_CausticsDistortionStrength: 0.16
|
||||
- _Crest_CausticsEnabled: 1
|
||||
- _Crest_CausticsEnabled: 0
|
||||
- _Crest_CausticsFocalDepth: 2
|
||||
- _Crest_CausticsMotionBlur: 1
|
||||
- _Crest_CausticsScrollSpeed: 1
|
||||
@@ -139,7 +139,7 @@ Material:
|
||||
- _Crest_CausticsTextureAverage: 0.07
|
||||
- _Crest_CausticsTextureScale: 50
|
||||
- _Crest_DirectTerm: 1
|
||||
- _Crest_FoamEnabled: 1
|
||||
- _Crest_FoamEnabled: 0
|
||||
- _Crest_FoamFeather: 0.75
|
||||
- _Crest_FoamIntensityAlbedo: 1
|
||||
- _Crest_FoamNormalStrength: 1
|
||||
@@ -147,7 +147,7 @@ Material:
|
||||
- _Crest_FoamScrollSpeed: 1
|
||||
- _Crest_FoamSmoothness: 0.7
|
||||
- _Crest_MinimumReflectionDirectionY: 0.03
|
||||
- _Crest_NormalMapEnabled: 1
|
||||
- _Crest_NormalMapEnabled: 0
|
||||
- _Crest_NormalMapScale: 3
|
||||
- _Crest_NormalMapScrollSpeed: 1
|
||||
- _Crest_NormalMapStrength: 0.15
|
||||
@@ -234,8 +234,8 @@ Material:
|
||||
- _ZWrite: 1
|
||||
- _ZWriteControl: 1
|
||||
m_Colors:
|
||||
- _Crest_Absorption: {r: 0.70086163, g: 0.236999, b: 0.106051564, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608}
|
||||
- _Crest_Absorption: {r: 6.0101995, g: 6.0101995, b: 6.0101995, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0, g: 0, b: 0, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
||||
@@ -56,7 +56,7 @@ Material:
|
||||
- _Crest_CausticsDepthOfField: 6
|
||||
- _Crest_CausticsDistortionScale: 250
|
||||
- _Crest_CausticsDistortionStrength: 0.16
|
||||
- _Crest_CausticsEnabled: 1
|
||||
- _Crest_CausticsEnabled: 0
|
||||
- _Crest_CausticsFocalDepth: 2
|
||||
- _Crest_CausticsMotionBlur: 1
|
||||
- _Crest_CausticsScrollSpeed: 1
|
||||
@@ -71,7 +71,7 @@ Material:
|
||||
- _Crest_ShadowsAffectsAmbientFactor: 0.5
|
||||
- _Crest_SunBoost: 2
|
||||
m_Colors:
|
||||
- _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608}
|
||||
- _Crest_AbsorptionColor: {r: 0, g: 0, b: 0, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
Reference in New Issue
Block a user