This commit is contained in:
2025-05-22 10:16:04 +08:00
parent b0abc1c30a
commit fa586fccac
115 changed files with 3440 additions and 19 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f81249cd36222584abd0759a96c54ca4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: afc5808f3fe379248a9ac9a4ff85ec4a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 24f1f6d6c75330443b604c7d62e8889d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1bec4163aaf7d4b4198d279c801609e0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7fd0585f74b572c4ca830b37141de9b3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -48,7 +48,7 @@ namespace NBF
{
Type = UIDef.InteractiveType.Oven,
Name = "烤箱",
Icon = "op-use",
Icon = "op-oven",
Use1 = "1,1",
Use1Title = "使用"
},
@@ -114,7 +114,7 @@ namespace NBF
{
Type = UIDef.InteractiveType.VendingMachine,
Name = "自动贩卖机",
Icon = "op-use",
Icon = "op-vending",
Use1 = "1,1",
Use1Title = "进入",
},
@@ -122,7 +122,7 @@ namespace NBF
{
Type = UIDef.InteractiveType.Wharf,
Name = "码头",
Icon = "op-use",
Icon = "op-wharf",
Use1 = "1,1",
Use1Title = "进入",
},

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8ce6ddcc06025e84c8f118c9af703263
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2684716fa91d0e444a710242e2db2f9b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,198 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace PhysicsTools
{
public class Bezier
{
private Vector3[] knots;
private Vector3[] firstControlPts;
private Vector3[] secondControlPts;
private int lastIndex = 1;
private float lengthCovered;
private float indexedLength;
private float totalLength;
public Bezier(List<PosOri> points)
{
Vector3[] array = new Vector3[points.Count];
for (int i = 0; i < points.Count; i++)
{
array[i] = points[i].pos;
}
init(array);
}
public Bezier(Vector3[] points)
{
init(points);
}
private void init(Vector3[] points)
{
knots = new Vector3[points.Length];
for (int i = 0; i < points.Length; i++)
{
knots[i] = points[i];
if (i != 0)
{
totalLength += (knots[i] - knots[i - 1]).magnitude;
}
}
GetCurveControlPoints(knots, out firstControlPts, out secondControlPts);
indexedLength = (knots[1] - knots[0]).magnitude;
}
public float TotalLength()
{
return totalLength;
}
public PosOri getNext(float deltaLen)
{
return new PosOri(getNextPos(deltaLen), Quaternion.identity);
}
public Vector3 getNextPos(float deltaLen)
{
bool flag = false;
float num = indexedLength;
float num2 = indexedLength;
while (!flag)
{
num = indexedLength;
num2 = indexedLength - (knots[lastIndex] - knots[lastIndex - 1]).magnitude;
if (lengthCovered + deltaLen > num)
{
lastIndex++;
if (lastIndex == knots.Length)
{
flag = true;
deltaLen = num - lengthCovered;
lastIndex = knots.Length - 1;
}
else
{
indexedLength += (knots[lastIndex] - knots[lastIndex - 1]).magnitude;
}
continue;
}
break;
}
float num3 = (lengthCovered + deltaLen - num2) / (num - num2);
Vector3 result = (float)Math.Pow(1f - num3, 3.0) * knots[lastIndex - 1] +
3f * (float)Math.Pow(1f - num3, 2.0) * num3 * firstControlPts[lastIndex - 1] +
3f * (1f - num3) * num3 * num3 * secondControlPts[lastIndex - 1] +
num3 * num3 * num3 * knots[lastIndex];
lengthCovered += deltaLen;
return result;
}
private void GetCurveControlPoints(Vector3[] knots, out Vector3[] firstControlPoints,
out Vector3[] secondControlPoints)
{
if (knots == null)
{
throw new ArgumentNullException(nameof(knots));
}
int num = knots.Length - 1;
if (num < 1)
{
throw new ArgumentException("至少需要两个结点", nameof(knots));
}
if (num == 1)
{
firstControlPoints = new Vector3[1];
firstControlPoints[0].x = (2f * knots[0].x + knots[1].x) / 3f;
firstControlPoints[0].y = (2f * knots[0].y + knots[1].y) / 3f;
firstControlPoints[0].z = (2f * knots[0].z + knots[1].z) / 3f;
secondControlPoints = new Vector3[1];
secondControlPoints[0].x = 2f * firstControlPoints[0].x - knots[0].x;
secondControlPoints[0].y = 2f * firstControlPoints[0].y - knots[0].y;
secondControlPoints[0].z = 2f * firstControlPoints[0].z - knots[0].z;
return;
}
float[] array = new float[num];
for (int i = 1; i < num - 1; i++)
{
array[i] = 4f * knots[i].x + 2f * knots[i + 1].x;
}
array[0] = knots[0].x + 2f * knots[1].x;
array[num - 1] = (8f * knots[num - 1].x + knots[num].x) / 2f;
float[] firstControlPoints2 = GetFirstControlPoints(array);
for (int j = 1; j < num - 1; j++)
{
array[j] = 4f * knots[j].y + 2f * knots[j + 1].y;
}
array[0] = knots[0].y + 2f * knots[1].y;
array[num - 1] = (8f * knots[num - 1].y + knots[num].y) / 2f;
float[] firstControlPoints3 = GetFirstControlPoints(array);
for (int k = 1; k < num - 1; k++)
{
array[k] = 4f * knots[k].z + 2f * knots[k + 1].z;
}
array[0] = knots[0].z + 2f * knots[1].z;
array[num - 1] = (8f * knots[num - 1].z + knots[num].z) / 2f;
float[] firstControlPoints4 = GetFirstControlPoints(array);
firstControlPoints = new Vector3[num];
secondControlPoints = new Vector3[num];
for (int l = 0; l < num; l++)
{
firstControlPoints[l] =
new Vector3(firstControlPoints2[l], firstControlPoints3[l], firstControlPoints4[l]);
if (l < num - 1)
{
secondControlPoints[l] = new Vector3(2f * knots[l + 1].x - firstControlPoints2[l + 1],
2f * knots[l + 1].y - firstControlPoints3[l + 1],
2f * knots[l + 1].z - firstControlPoints4[l + 1]);
}
else
{
secondControlPoints[l] = new Vector3((knots[num].x + firstControlPoints2[num - 1]) / 2f,
(knots[num].y + firstControlPoints3[num - 1]) / 2f,
(knots[num].z + firstControlPoints4[num - 1]) / 2f);
}
}
}
private float[] GetFirstControlPoints(float[] rhs)
{
int num = rhs.Length;
float[] array = new float[num];
float[] array2 = new float[num];
float num2 = 2f;
array[0] = rhs[0] / num2;
for (int i = 1; i < num; i++)
{
array2[i] = 1f / num2;
num2 = ((i >= num - 1) ? 3.5f : 4f) - array2[i];
array[i] = (rhs[i] - array[i - 1]) / num2;
}
for (int j = 1; j < num; j++)
{
array[num - j - 1] -= array2[num - j] * array[num - j];
}
return array;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0cc4d18ef4a8ff6439959ca335b42593
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,62 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class ControlPoint
{
[Tooltip("Optional: Object")]
public GameObject obj;
[Tooltip("Position through which rope will pass... If Object is specified then it is the local to the object otherwise it is global position")]
public Vector3 localPos;
[Range(1f, 5f)]
[Tooltip("SlackFraction: How much of the rope length should be created between two control points... If it is more than 1 then a catenary is formed between the control points")]
public float slackFraction;
[Tooltip("Specify whether it is attached to the control point or not")]
public bool attached;
public ControlPoint()
{
obj = null;
slackFraction = 1f;
attached = true;
}
public override string ToString()
{
return ((!(obj != null)) ? "Object: null" : ("Object:" + obj.ToString())) + ", Position: " + localPos.ToString() + ", SlackFraction: " + slackFraction + ", Attached: " + attached;
}
public bool compare(ControlPoint rhs)
{
if (obj != rhs.obj || localPos != rhs.localPos || slackFraction != rhs.slackFraction || attached != rhs.attached)
{
return false;
}
return true;
}
public ControlPoint clone()
{
ControlPoint controlPoint = new ControlPoint();
controlPoint.obj = obj;
controlPoint.localPos = localPos;
controlPoint.slackFraction = slackFraction;
controlPoint.attached = attached;
return controlPoint;
}
public Vector3 globalPos(Rope rope)
{
if (obj != null)
{
return obj.transform.TransformPoint(localPos);
}
return rope.transform.TransformPoint(localPos);
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 4c3919bd67247ecf47ac8b5970b70372
timeCreated: 1747788126
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,152 @@
using UnityEngine;
namespace PhysicsTools
{
public class Joint
{
public UnityEngine.Joint joint;
public Joint(Segment seg1, Segment seg2, JointProperties prop, SegmentPropertiesBase segProperties,
Quaternion twistOffset)
{
if (seg2 == null)
{
}
seg2.seg.transform.rotation *= twistOffset;
switch (prop.type)
{
case JointProperties.Type.HINGE_JOINT:
{
HingeJoint hingeJoint = seg1.seg.AddComponent<HingeJoint>();
hingeJoint.autoConfigureConnectedAnchor = false;
joint = hingeJoint;
JointLimits limits = new JointLimits
{
min = 0f - prop.swingLimitDeg,
max = prop.swingLimitDeg
};
joint.axis = new Vector3(0f, 0f, 1f);
hingeJoint.limits = limits;
break;
}
case JointProperties.Type.CONFIGURABLE_JOINT:
{
ConfigurableJoint configurableJoint = seg1.seg.AddComponent<ConfigurableJoint>();
configurableJoint.enableCollision = false;
configurableJoint.xMotion = ConfigurableJointMotion.Locked;
configurableJoint.yMotion = ConfigurableJointMotion.Locked;
configurableJoint.zMotion = ConfigurableJointMotion.Locked;
configurableJoint.angularXMotion = ConfigurableJointMotion.Limited;
configurableJoint.angularYMotion = ConfigurableJointMotion.Limited;
configurableJoint.angularZMotion = ConfigurableJointMotion.Limited;
configurableJoint.autoConfigureConnectedAnchor = false;
configurableJoint.lowAngularXLimit = new SoftJointLimit
{
limit = 0f - prop.twistLimitDeg
};
configurableJoint.highAngularXLimit = new SoftJointLimit
{
limit = prop.twistLimitDeg
};
configurableJoint.projectionMode = JointProjectionMode.PositionAndRotation;
configurableJoint.projectionDistance = prop.projectionDistance;
SoftJointLimit softJointLimit = new SoftJointLimit
{
limit = prop.swingLimitDeg
};
configurableJoint.angularYLimit = softJointLimit;
configurableJoint.angularZLimit = softJointLimit;
joint = configurableJoint;
joint.axis = new Vector3(0f, 1f, 0f);
if (prop.breakingForce != 0f)
{
configurableJoint.breakForce = prop.breakingForce;
}
configurableJoint.enablePreprocessing = false;
break;
}
}
if (segProperties is SegmentPropertiesCylinder)
{
joint.anchor = new Vector3(0f, 1f - prop.offsetScale, 0f);
joint.connectedAnchor = new Vector3(0f, -1f + prop.offsetScale, 0f);
}
else
{
joint.anchor = new Vector3(0f, (1f - prop.offsetScale) / 2f, 0f);
joint.connectedAnchor = new Vector3(0f, (-1f + prop.offsetScale) / 2f, 0f);
}
joint.connectedBody = seg2.seg.GetComponent<Rigidbody>();
}
public Joint(GameObject seg1, GameObject seg2, Vector3 vGlobalAnchor, Vector3 vGlobalAxis, JointProperties prop,
Rope r, int jtPos)
{
ConfigurableJoint configurableJoint = seg1.AddComponent<ConfigurableJoint>();
configurableJoint.enableCollision = false;
configurableJoint.xMotion = ConfigurableJointMotion.Limited;
configurableJoint.yMotion = ConfigurableJointMotion.Limited;
configurableJoint.zMotion = ConfigurableJointMotion.Limited;
configurableJoint.angularXMotion = ConfigurableJointMotion.Limited;
configurableJoint.angularYMotion = ConfigurableJointMotion.Free;
configurableJoint.angularZMotion = ConfigurableJointMotion.Free;
configurableJoint.anchor = seg1.transform.InverseTransformPoint(vGlobalAnchor);
configurableJoint.axis = seg1.transform.InverseTransformDirection(vGlobalAxis);
if (seg2 != null)
{
configurableJoint.connectedBody = seg2.GetComponent<Rigidbody>();
}
SoftJointLimit linearLimit = new SoftJointLimit
{
limit = 0.01f
};
SoftJointLimitSpring linearLimitSpring = default(SoftJointLimitSpring);
switch (jtPos)
{
case 0:
linearLimitSpring = r.getStartJtSpring();
break;
case 1:
linearLimitSpring = r.getEndJtSpring();
break;
default:
{
float damper = (linearLimitSpring.spring = 0f);
linearLimitSpring.damper = damper;
break;
}
}
if (linearLimitSpring.spring == 0f)
{
linearLimit.limit = 0f;
}
configurableJoint.linearLimitSpring = linearLimitSpring;
configurableJoint.linearLimit = linearLimit;
configurableJoint.projectionMode = JointProjectionMode.PositionAndRotation;
configurableJoint.projectionDistance = prop.projectionDistanceFirst;
configurableJoint.lowAngularXLimit = new SoftJointLimit
{
limit = 0f - prop.twistLimitDeg
};
configurableJoint.highAngularXLimit = new SoftJointLimit
{
limit = prop.twistLimitDeg
};
if (prop.breakingForce != 0f)
{
configurableJoint.breakForce = prop.breakingForce;
}
joint = configurableJoint;
configurableJoint.autoConfigureConnectedAnchor = false;
configurableJoint.enablePreprocessing = false;
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 3e680fa725d3066a2472a42dc6f1ba88
timeCreated: 1747788127
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class JointProperties
{
[Serializable]
public enum Type
{
CONFIGURABLE_JOINT = 0,
HINGE_JOINT = 1
}
public Type type;
[Range(0f, 180f)]
public float twistLimitDeg;
[Range(0f, 180f)]
public float swingLimitDeg;
[Range(0f, 0.5f)]
public float offsetScale;
[Range(0f, 90f)]
public float twistOffsetDeg;
public float breakingForce;
public float projectionDistance;
public float projectionDistanceFirst;
public JointProperties()
{
type = Type.CONFIGURABLE_JOINT;
twistLimitDeg = 10f;
swingLimitDeg = 50f;
offsetScale = 0f;
twistOffsetDeg = 0f;
breakingForce = 0f;
projectionDistance = 0.1f;
projectionDistanceFirst = 0.001f;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 09ae8cd9a6c1c324b8c2a2a78ac60d7d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,89 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class LinkMesh
{
[HideInInspector]
public Mesh modifiedMesh;
[HideInInspector]
public Matrix4x4 transform;
[HideInInspector]
public Mesh defaultMesh;
[HideInInspector]
public Material defaultMeshMaterial;
[HideInInspector]
public Matrix4x4 defaultTransform;
public Mesh mesh;
public Material meshMaterial;
public Vector3 position;
public Vector3 rotation;
public Vector3 scale;
public LinkMesh()
{
mesh = null;
position = new Vector3(0f, 0f, 0f);
rotation = new Vector3(0f, 0f, 0f);
scale = new Vector3(1f, 1f, 1f);
defaultTransform = default(Matrix4x4);
defaultTransform.SetTRS(position, Quaternion.Euler(rotation), scale);
transform = default(Matrix4x4);
transform.SetTRS(position, Quaternion.Euler(rotation), scale);
}
public void update()
{
if (mesh == null)
{
mesh = defaultMesh;
transform = defaultTransform;
Quaternion rot;
Utility.MatrixToTRS(transform, out position, out rot, out scale);
rotation = rot.eulerAngles;
}
if (mesh != null)
{
modifiedMesh = UnityEngine.Object.Instantiate(mesh);
}
if (modifiedMesh != null)
{
transform.SetTRS(position, Quaternion.Euler(rotation), scale);
ScaleMesh();
}
}
public void ScaleMesh()
{
Vector3[] vertices = modifiedMesh.vertices;
for (int i = 0; i < vertices.Length; i++)
{
Vector3 point = vertices[i];
point = transform.MultiplyPoint(point);
vertices[i] = point;
}
modifiedMesh.vertices = vertices;
}
public Mesh getMesh()
{
return modifiedMesh;
}
public Material getMaterial()
{
return null;
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 88218b6dac3a1d87d3867523046c804d
timeCreated: 1747788125
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class PosOri
{
public Vector3 pos;
public Quaternion rot;
public PosOri(Vector3 p, Quaternion q)
{
pos = p;
rot = q;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b2e47173d3a5c346a9528bef13473eb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 8d8b3d7293da4ed8736330164944ddd3
timeCreated: 1747788125
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine;
namespace PhysicsTools
{
internal class SCapsulePos
{
public Vector3 vPos;
public Vector3 vDir;
public Vector3 vPrevPos;
public Vector3 vPrevDir;
public float fLen;
public SCapsulePos()
{
vPos = new Vector3(0f, 0f, 0f);
vDir = new Vector3(0f, 0f, 0f);
vPrevPos = new Vector3(0f, 0f, 0f);
vPrevDir = new Vector3(0f, 0f, 0f);
fLen = 0f;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 089e242339d5f784baf45339b1f072ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
using UnityEngine;
namespace PhysicsTools
{
public class Segment
{
public GameObject seg;
public Rigidbody body;
public Joint prev;
public Joint next;
public CapsuleCollider capsuleCollider;
public MeshFilter meshFilter;
public MeshRenderer meshRenderer;
// public WaterInteractive waterInteractive;
public Segment(string name, float len, Vector3 pos, Quaternion q, SegmentPropertiesBase segProperties, Rope r)
{
SegmentPropertiesCylinder segmentPropertiesCylinder = (SegmentPropertiesCylinder)segProperties;
float radius = segmentPropertiesCylinder.radius;
seg = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
capsuleCollider = seg.GetComponent<CapsuleCollider>();
meshFilter = seg.GetComponent<MeshFilter>();
meshRenderer = seg.GetComponent<MeshRenderer>();
body = seg.AddComponent<Rigidbody>();
capsuleCollider.sharedMaterial = r.ropeMaterial;
capsuleCollider.enabled = r.useColliders;
r.lstComponentsCreated.Add(seg);
seg.hideFlags = (r.HideChildren ? HideFlags.HideInHierarchy : HideFlags.None);
meshRenderer.enabled = true;
r.linkMesh.defaultMesh = meshFilter.sharedMesh;
r.linkMesh.defaultMeshMaterial = meshRenderer.sharedMaterial;
r.linkMesh.defaultTransform = Matrix4x4.identity;
if (r.linkMesh.getMesh() != null)
{
meshFilter.sharedMesh = r.linkMesh.getMesh();
meshRenderer.sharedMaterial = r.linkMesh.meshMaterial;
}
seg.name = name;
seg.transform.localScale = new Vector3(radius * 2f, len / 2f, radius * 2f);
seg.transform.localPosition = pos;
seg.transform.localRotation = q;
body.maxAngularVelocity = 1f;
body.angularDamping = segmentPropertiesCylinder.angularDamping;
body.linearDamping = segmentPropertiesCylinder.linearDamping;
body.mass = segmentPropertiesCylinder.massPerUnitLength * segmentPropertiesCylinder.length;
body.solverIterations = segmentPropertiesCylinder.solverCount;
body.isKinematic = r.kinematic;
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: b876b665f2164469858aa78787017d4d
timeCreated: 1747788127
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,39 @@
using System;
namespace PhysicsTools
{
[Serializable]
public class SegmentProperties
{
[Serializable]
public enum Type
{
CYLINDER = 0,
BOX = 1
}
public Type type;
public SegmentPropertiesBase properties;
public SegmentProperties()
{
properties = new SegmentPropertiesCylinder();
type = Type.CYLINDER;
}
public void setType(Type t)
{
switch (t)
{
case Type.BOX:
properties = new SegmentPropertiesBox();
break;
case Type.CYLINDER:
properties = new SegmentPropertiesCylinder();
break;
}
type = t;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4bbc2d7df2b1ead41bf1846c6e06b77d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
using System;
namespace PhysicsTools
{
[Serializable]
public class SegmentPropertiesBase
{
public float massPerUnitLength;
public int solverCount;
public float length;
public float linearDamping;
public float angularDamping;
public SegmentPropertiesBase()
{
massPerUnitLength = 10f;
solverCount = 255;
length = 1f;
linearDamping = 0.01f;
angularDamping = 0.01f;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9090fbf5485508f41b83439d2c44e9b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System;
namespace PhysicsTools
{
[Serializable]
public class SegmentPropertiesBox : SegmentPropertiesBase
{
public float width;
public float height;
public SegmentPropertiesBox()
{
length = 1f;
width = 0.05f;
height = 0.2f;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dd4b78dfa69ad534c94ee6f13133b5e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
using System;
namespace PhysicsTools
{
[Serializable]
public class SegmentPropertiesCylinder : SegmentPropertiesBase
{
public float radius;
public SegmentPropertiesCylinder()
{
length = 1f;
radius = 0.1f;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c06432f1a93c1694e97f31bf3112ceb0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class SerializedSoftJointLimitSpring
{
public float spring = 30000f;
public float damper = 30000f;
public SerializedSoftJointLimitSpring()
{
spring = 30000f;
damper = 30000f;
}
private SerializedSoftJointLimitSpring(SoftJointLimitSpring c)
{
damper = c.damper;
spring = c.spring;
}
public static implicit operator SoftJointLimitSpring(SerializedSoftJointLimitSpring c)
{
SoftJointLimitSpring result = default(SoftJointLimitSpring);
result.spring = c.spring;
result.damper = c.damper;
return result;
}
public static explicit operator SerializedSoftJointLimitSpring(SoftJointLimitSpring c)
{
return new SerializedSoftJointLimitSpring(c);
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: e9f687b18e562c31f90c28822c0f641d
timeCreated: 1747788125
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,270 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
namespace PhysicsTools
{
public class Utility
{
public class Calc
{
private float r_length;
private float h;
private float d;
public Calc(float r_, float h_, float d_)
{
r_length = r_;
h = h_;
d = d_;
}
public float g(float s)
{
return (float)(2.0 * Math.Sinh(s * d / 2f) / s - Math.Sqrt(r_length * r_length - h * h));
}
public float dg(float s)
{
return (float)(2.0 * Math.Cosh(s * d / 2f) * d / (2f * s) - 2.0 * Math.Sinh(s * d / 2f) / (s * s));
}
}
private const float DEG_2_RAD = 0.017453277f;
private const float RAD_2_DEG = 57.29583f;
public static void MatrixToTRS(Matrix4x4 mat, out Vector3 pos, out Quaternion rot, out Vector3 scale)
{
pos = mat.GetColumn(3);
rot = Quaternion.LookRotation(mat.GetColumn(2), mat.GetColumn(1));
scale = new Vector3(mat.GetColumn(0).magnitude, mat.GetColumn(1).magnitude, mat.GetColumn(2).magnitude);
}
private static void Swap<T>(ref T lhs, ref T rhs)
{
(lhs, rhs) = (rhs, lhs);
}
public static List<Vector3> getCatenaryPts(Vector3 vStart, Vector3 vEnd, float r_length, int N)
{
bool flag = false;
int num = 100;
float num2 = 1E-10f;
float num3 = 1E-08f;
float num4 = 0.5f;
float num5 = 1E-09f;
float num6 = 0.001f;
if (vStart.y > vEnd.y)
{
Swap(ref vStart, ref vEnd);
flag = true;
}
Vector3 vector = vEnd - vStart;
float y = vector.y;
vector.y = 0f;
Vector3 vector2 = vector / (N - 1);
float magnitude = vector.magnitude;
vector.Normalize();
float num7 = ((magnitude == 0f) ? 1f : (1f / magnitude));
List<Vector3> list = new List<Vector3>(new Vector3[N]);
if (Math.Abs(magnitude) < num6)
{
Vector3 vector3 = new Vector3((vStart.x + vEnd.x) / 2f, 0f, (vStart.z + vEnd.z) / 2f);
if (r_length < Math.Abs(y))
{
for (int i = 0; i < N; i++)
{
list[i] = vector3 + new Vector3(0f, vStart.y + y * (i * 1f / (N - 1)), 0f);
}
}
else
{
num7 = (r_length - Math.Abs(y)) / 2f;
int num8 = (int)Math.Ceiling(N * num7 / r_length);
float num9 = Math.Max(vStart.y, vEnd.y);
float num10 = Math.Min(vStart.y, vEnd.y);
for (int j = 0; j < N; j++)
{
if (j < N - num8)
{
float num11 = num10 - num7 - num9;
float num12 = num11 * (j * 1f / (N - num8 - 1f));
list[j] = vector3 + new Vector3(0f, num9 + num12, 0f);
}
else
{
float num13 = num7;
float num14 = num13 * (j * 1f / (num8 - 1f));
vector3 = (list[j] = vector3 + new Vector3(0f, num10 - num7 + num14, 0f));
}
}
}
}
else if (r_length <= Math.Sqrt(magnitude * magnitude + y * y))
{
for (int k = 0; k < N; k++)
{
Vector3 value = vStart + k * vector2;
float num15 = k * (vEnd.y - vStart.y) / (N - 1);
value.y = vStart.y + num15;
list[k] = value;
}
}
else
{
Calc calc = new Calc(r_length, y, magnitude);
for (int l = 0; l < num; l++)
{
float value2 = calc.g(num7);
float value3 = calc.dg(num7);
if (Math.Abs(value2) < num3 || Math.Abs(value3) < num2)
{
break;
}
float num16 = (0f - calc.g(num7)) / calc.dg(num7);
float num17 = 1f;
float num18 = num7 + num17 * num16;
while (num18 < 0f || Math.Abs(calc.g(num18)) > Math.Abs(value2))
{
num17 = num4 * num17;
if (num17 < num5)
{
break;
}
num18 = num7 + num17 * num16;
}
num7 = num18;
}
float num19 = (float)(0.5 * (Math.Log((r_length + y) / (r_length - y)) / num7 - magnitude));
vector.y = 0f;
vector.Normalize();
Vector3 vector5 = vStart - num19 * vector;
vector5.y = 0f;
float num20 = (float)(vStart.y - Math.Cosh(num19 * num7) / num7);
for (int m = 0; m < N; m++)
{
Vector3 vector6 = vStart + m * vector2;
Vector3 vector7 = vector6;
vector6.y = 0f;
vector6.y = (float)(Math.Cosh((vector6 - vector5).magnitude * num7) / num7 + num20);
list[m] = vector6;
}
}
if (flag)
{
list.Reverse();
}
return list;
}
public static Quaternion createOrientation(Vector3 v)
{
if (v.x == 0f && v.y == 0f && v.z == 0f)
{
return Quaternion.identity;
}
Vector3 vector = new Vector3(0f, 1f, 0f);
Vector3 vector2 = Vector3.Cross(v, vector);
vector2.Normalize();
float num = Vector3.Dot(vector, v);
if (num > 1f)
{
num = 1f;
}
else if (num < -1f)
{
num = -1f;
}
float num2 = (float)Math.Acos(num);
return Quaternion.AngleAxis(num2 * 180f / 3.14159f, -vector2);
}
public static T DeepClone<T>(T a)
{
using (MemoryStream memoryStream = new MemoryStream())
{
BinaryFormatter binaryFormatter = new BinaryFormatter();
binaryFormatter.Serialize(memoryStream, a);
memoryStream.Position = 0L;
return (T)binaryFormatter.Deserialize(memoryStream);
}
}
private static Dictionary<Rigidbody, List<UnityEngine.Joint>> buildMapOfJoints()
{
Dictionary<Rigidbody, List<UnityEngine.Joint>> dictionary = new Dictionary<Rigidbody, List<UnityEngine.Joint>>();
UnityEngine.Joint[] array = UnityEngine.Object.FindObjectsOfType<UnityEngine.Joint>();
UnityEngine.Joint[] array2 = array;
foreach (UnityEngine.Joint joint in array2)
{
Rigidbody component = joint.gameObject.GetComponent<Rigidbody>();
if (component != null)
{
if (!dictionary.ContainsKey(component))
{
dictionary.Add(component, new List<UnityEngine.Joint>());
}
dictionary[component].Add(joint);
}
Rigidbody connectedBody = joint.connectedBody;
if (connectedBody != null)
{
if (!dictionary.ContainsKey(connectedBody))
{
dictionary.Add(connectedBody, new List<UnityEngine.Joint>());
}
dictionary[connectedBody].Add(joint);
}
}
return dictionary;
}
private static void getConnectedBodies(ref Dictionary<Rigidbody, List<UnityEngine.Joint>> dic, Rigidbody body, ref HashSet<Rigidbody> bodies)
{
bodies.Add(body);
if (!dic.ContainsKey(body))
{
return;
}
List<UnityEngine.Joint> list = dic[body];
foreach (UnityEngine.Joint item in list)
{
if (item.connectedBody != null && !bodies.Contains(item.connectedBody))
{
getConnectedBodies(ref dic, item.connectedBody, ref bodies);
}
Rigidbody component = item.gameObject.GetComponent<Rigidbody>();
if (component != null && !bodies.Contains(component))
{
getConnectedBodies(ref dic, component, ref bodies);
}
}
}
public static void moveConnectedBodies(Rigidbody start, Matrix4x4 newPose)
{
Dictionary<Rigidbody, List<UnityEngine.Joint>> dic = buildMapOfJoints();
HashSet<Rigidbody> bodies = new HashSet<Rigidbody>();
getConnectedBodies(ref dic, start, ref bodies);
Matrix4x4 matrix4x = Matrix4x4.TRS(start.transform.position, start.transform.rotation, new Vector3(1f, 1f, 1f));
foreach (Rigidbody item in bodies)
{
Matrix4x4 matrix4x2 = Matrix4x4.TRS(item.transform.position, item.transform.rotation, new Vector3(1f, 1f, 1f));
Matrix4x4 inverse = matrix4x.inverse;
matrix4x2 = inverse * matrix4x2;
matrix4x2 = newPose * matrix4x2;
Vector3 pos;
Quaternion rot;
Vector3 scale;
MatrixToTRS(matrix4x2, out pos, out rot, out scale);
item.transform.position = pos;
item.transform.rotation = rot;
}
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 93c19397aa18981aebed2e7aba8ca270
timeCreated: 1747788122
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,107 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
public class Winch : MonoBehaviour
{
public float brakeForce;
public float heaveTorque;
public float tensionTorque;
public float radius;
public float length;
public float inertia;
public float maxRopeLength;
public float minRopeLength;
public float rpm;
public float maxRPM;
private float omega;
public Rope rope;
public Winch()
{
radius = 1f;
length = 1f;
maxRPM = 1f;
omega = 0f;
}
private void FixedUpdate()
{
float fixedDeltaTime = Time.fixedDeltaTime;
float num = tensionTorqueValue() - heaveTorque;
float num2 = num / inertia;
float num3 = brakeForce * radius / inertia;
float num4 = omega + num2 * fixedDeltaTime;
if ((num2 < 0f && rope.getLength() > minRopeLength) ||
(num2 > 0f && num2 > num3 && rope.getLength() < maxRopeLength))
{
if (num4 > 0f && num4 - num3 * fixedDeltaTime < 0f)
{
num4 = 0f;
}
else if (num4 < 0f && num4 + num3 * fixedDeltaTime > 0f)
{
num4 = 0f;
}
else if (num4 > 0f)
{
num4 -= num3 * fixedDeltaTime;
}
else if (num4 < 0f)
{
num4 += num3 * fixedDeltaTime;
}
omega = num4;
rope.changeLength(getLinearSpeed() * fixedDeltaTime);
}
else
{
omega = 0f;
}
rpm = omega / 6.28318f * 60f;
if (Math.Abs(rpm) > maxRPM)
{
if (rpm < 0f)
{
rpm = 0f - maxRPM;
}
else
{
rpm = maxRPM;
}
}
omega = rpm / 60f * 6.28318f;
}
private float tensionTorqueValue()
{
tensionTorque = radius * getTension();
return tensionTorque;
}
private float getLinearSpeed()
{
return omega * radius;
}
private float getTension()
{
return rope.getTension();
}
}
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: fac89f9401be21c56be128e602bbd1cd
timeCreated: 1747788127
licenseType: Free
MonoImporter:
serializedVersion: 2
name:
externalObjects: {}
defaultReferences: []
executionOrder: 0
icon: {fileID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,6 +8,7 @@
CommonBinder.BindAll();
FishingBinder.BindAll();
MainBinder.BindAll();
ShopBinder.BindAll();
}
}
}

View File

@@ -0,0 +1,13 @@
/**注册组件绑定关系。本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
namespace NBF
{
public class ShopBinder
{
public static void BindAll()
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f579b85674067d740ba424bcc5da406d

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
@@ -48,11 +49,14 @@ namespace NBF
public void Use1()
{
if (string.IsNullOrEmpty(_interactiveData.Use1)) return;
Debug.Log(_interactiveData.Use1);
UI.Inst.OpenUI<FishingShop>();
}
public void Use2()
{
if (string.IsNullOrEmpty(_interactiveData.Use2)) return;
Debug.Log(_interactiveData.Use2);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2bcd18877a1d471b97572c04d7e5e02a
timeCreated: 1747753015

View File

@@ -0,0 +1,22 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
using System.Collections.Generic;
namespace NBF
{
/// <summary> </summary>
public partial class FishingShop
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
[AutoFind(Name = "Banner")]
public GLabel Banner;
[AutoFind(Name = "BtnClose")]
public GButton BtnClose;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 77b9a0646693d344b8dd031f4537c3c8

View File

@@ -0,0 +1,44 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using FairyGUI;
using UnityEngine;
using NBC;
using UIPanel = NBC.UIPanel;
namespace NBF
{
public partial class FishingShop : UIPanel
{
public override string UIPackName => "Shop";
public override string UIResName => "FishingShop";
protected override void OnInit()
{
base.OnInit();
this.AutoAddClick(OnClick);
}
protected override void OnShow()
{
base.OnShow();
}
private void OnClick(GComponent btn)
{
if (btn == BtnClose)
{
Hide();
}
}
protected override void OnHide()
{
base.OnHide();
}
protected override void OnDestroy()
{
base.OnDestroy();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b9c7e605b14059445a8598c3cc8d3997

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="28,28" pivot="0.5,0.5" extention="Button">
<displayList>
<loader id="n10_fcfg" name="icon" xy="0,0" size="28,28" url="ui://6hgkvlaufcfgg1" fill="scale" color="#7888a0">
<relation target="" sidePair="width-width,height-height"/>
</loader>
</displayList>
<Button downEffect="scale" downEffectValue=".95"/>
</component>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="28,28" pivot="0.5,0.5" extention="Button">
<displayList>
<loader id="n10_fcfg" name="icon" xy="0,0" size="28,28" url="ui://6hgkvlaufcfgg1" fill="scale">
<relation target="" sidePair="width-width,height-height"/>
</loader>
</displayList>
<Button downEffect="scale" downEffectValue=".95"/>
</component>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="30,30" pivot="0.5,0.5" extention="Button">
<displayList>
<image id="n19_fcfg" name="n19" src="kryob" fileName="Images/Square.png" xy="0,0" size="30,30" alpha="0.3" color="#181c35">
<relation target="" sidePair="width-width,height-height"/>
</image>
<loader id="n20_fcfg" name="icon" xy="5,5" size="20,20" url="ui://6hgkvlaufcfgg1" fill="scale">
<relation target="" sidePair="width-width,height-height"/>
</loader>
</displayList>
<Button downEffect="scale" downEffectValue=".95"/>
</component>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="100,46" extention="Button">
<controller name="button" pages="2,up,3,down" selected="0"/>
<displayList>
<text id="n3_fcfg" name="title" xy="22,0" size="55,36" fontSize="26" color="#7888a0" align="center" text="标题">
<gearColor controller="button" pages="2,3" values="#7888a0,#000000|#ffffff,#000000"/>
</text>
<image id="n4_fcfg" name="n4" src="kryob" fileName="Images/Square.png" xy="33,44" size="33,2">
<gearDisplay controller="button" pages="3"/>
</image>
</displayList>
<Button mode="Radio"/>
</component>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="199,31">
<displayList>
<component id="n13_fcfg" name="n13" src="fcfggh" fileName="Com/CurrencyTag1.xml" xy="0,1"/>
<component id="n18_fcfg" name="n18" src="fcfggi" fileName="Com/CurrencyTag2.xml" xy="86,0"/>
<component id="n19_fcfg" name="BtnBuy" src="fcfggj" fileName="Com/Buttons/BtnIcon2.xml" xy="169,0">
<Button icon="ui://6hgkvlaufcfgfz"/>
</component>
</displayList>
</component>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="22,22">
<controller name="type" exported="true" pages="0,银币,1,金币" selected="1"/>
<displayList>
<image id="n15_fcfg" name="n15" src="fcfgge" fileName="Images/icon_store_4.png" xy="0,0" size="22,22" color="#f2d442">
<gearColor controller="type" pages="0,1" values="#e2dddd|#f2d442"/>
</image>
</displayList>
</component>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="79,30" extention="Label">
<displayList>
<image id="n13_fcfg" name="n13" src="kryob" fileName="Images/Square.png" xy="0,0" size="79,30" alpha="0.2" color="#000000"/>
<component id="n15_fcfg" name="icon" src="fcfggf" fileName="Com/CurrencyIcon.xml" xy="4,4"/>
<text id="n17_fcfg" name="title" xy="29,2" size="48,26" fontSize="16" color="#ffffff" autoSize="none" text="58.02"/>
</displayList>
</component>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="79,30" extention="Label">
<controller name="c1" pages="0,银币,1,金币" selected="0"/>
<displayList>
<image id="n13_fcfg" name="n13" src="kryob" fileName="Images/Square.png" xy="0,0" size="79,30" alpha="0.2" color="#000000"/>
<component id="n15_fcfg" name="icon" src="fcfggf" fileName="Com/CurrencyIcon.xml" xy="4,4" controller="type,1"/>
<text id="n17_fcfg" name="title" xy="29,2" size="48,26" fontSize="16" color="#ffffff" autoSize="none" text="58.02"/>
</displayList>
</component>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="30,30" extention="Label" mask="n3_fcfg">
<displayList>
<graph id="n3_fcfg" name="n3" xy="0,0" size="30,30" type="eclipse">
<relation target="" sidePair="width-width,height-height"/>
</graph>
<loader id="n2_fcfg" name="icon" xy="0,0" size="30,30" url="ui://6hgkvlaufcfgfs" fill="scale">
<relation target="" sidePair="width-width,height-height"/>
</loader>
</displayList>
</component>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="90,90" extention="Button">
<displayList>
<component id="n0_fcfg" name="icon" src="fcfgft" fileName="Com/Head.xml" xy="0,0" size="90,90"/>
<loader id="n1_fcfg" name="flag" xy="7,74" size="19,13" url="ui://6hgkvlaufcfgfr" fill="scaleMatchHeight"/>
</displayList>
<Button/>
</component>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="1920,140" extention="Label" designImage="ui://6hgkvlaufcfgh0" designImageAlpha="0">
<displayList>
<image id="n1_fcfg" name="LongLine" src="kryob" fileName="Images/Square.png" xy="0,137" size="1920,2" alpha="0.3"/>
<list id="n2_fcfg" name="List" xy="268,93" pivot="0.5,0.5" size="1383,46" layout="row" scroll="horizontal" defaultItem="ui://6hgkvlaufcfggs" align="center" vAlign="bottom">
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
</list>
<text id="n4_fcfg" name="title" xy="916,19" pivot="0.5,0.5" size="87,56" font="ui://6hgkvlaugkm7v" fontSize="42" color="#ffffff" align="center" vAlign="middle" shadowColor="#2f406b" shadowOffset="2,2" text="标题"/>
<component id="n5_fcfg" name="n5" src="fcfgfu" fileName="Com/UserTopHead.xml" xy="41,21"/>
<text id="n6_fcfg" name="TextName" xy="158,62" size="135,39" fontSize="28" color="#7888a0" text="Bob.Song">
<relation target="n4_fcfg" sidePair="left-left,top-top"/>
</text>
<component id="n8_fcfg" name="Currency" src="fcfggq" fileName="Com/CurrencyGroup.xml" xy="1653,33"/>
<component id="n9_fcfg" name="BtnClose" src="fcfggb" fileName="Com/Buttons/BtnClose.xml" xy="1867,33"/>
</displayList>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -5,7 +5,7 @@
<component id="isq98" name="LoadingProgress.xml" path="/Com/Progress/" exported="true"/>
<component id="isq99" name="ProgressBar.xml" path="/Com/"/>
<component id="isq9a" name="BtnCommon.xml" path="/Com/" exported="true"/>
<image id="kryob" name="Square.png" path="/Images/" scale="9grid" scale9grid="1,1,1,0"/>
<image id="kryob" name="Square.png" path="/Images/" exported="true" scale="9grid" scale9grid="1,1,1,0"/>
<component id="kryoc" name="GreenProgress.xml" path="/Com/Progress/" exported="true"/>
<component id="sqnkd" name="GMPanel.xml" path="/" exported="true"/>
<component id="sqnke" name="InputDef.xml" path="/Com/"/>
@@ -68,6 +68,50 @@
<component id="tmu81k" name="TextTag.xml" path="/Com/" exported="true"/>
<component id="fcfgfm" name="TextCenterTag.xml" path="/Com/" exported="true"/>
<image id="fcfgfn" name="op-bank.png" path="/Icon/交互/" exported="true"/>
<image id="fcfgfo" name="op-oven.png" path="/Icon/交互/" exported="true"/>
<image id="fcfgfp" name="op-wharf.png" path="/Icon/交互/" exported="true"/>
<image id="fcfgfq" name="op-vending.png" path="/Icon/交互/" exported="true"/>
<image id="fcfgfr" name="CHN.png" path="/Icon/国旗/" exported="true"/>
<image id="fcfgfs" name="b_cfc46a5198bacf1db9fd46f56f712572.jpg" path="/"/>
<component id="fcfgft" name="Head.xml" path="/Com/" exported="true"/>
<component id="fcfgfu" name="UserTopHead.xml" path="/Com/" exported="true"/>
<image id="fcfgfz" name="icon_common_25.png" path="/Images/" exported="true"/>
<image id="fcfgg0" name="icon_common_26.png" path="/Images/" exported="true"/>
<image id="fcfgg1" name="icon_common_27.png" path="/Images/" exported="true"/>
<image id="fcfgg2" name="icon_common_28.png" path="/Images/" exported="true"/>
<image id="fcfgg3" name="icon_common_29.png" path="/Images/" exported="true"/>
<image id="fcfgg4" name="icon_common_30.png" path="/Images/" exported="true"/>
<image id="fcfgg5" name="icon_common_31.png" path="/Images/" exported="true"/>
<image id="fcfgg6" name="icon_common_37.png" path="/Images/" exported="true"/>
<image id="fcfgg7" name="icon_common_38.png" path="/Images/" exported="true"/>
<image id="fcfgg8" name="icon_common_1.png" path="/Images/" exported="true"/>
<image id="fcfgg9" name="icon_common_5.png" path="/Images/" exported="true"/>
<component id="fcfgga" name="BtnIcon.xml" path="/Com/Buttons/" exported="true"/>
<component id="fcfggb" name="BtnClose.xml" path="/Com/Buttons/" exported="true"/>
<image id="fcfggd" name="icon_store_22.png" path="/Images/" exported="true"/>
<image id="fcfgge" name="icon_store_4.png" path="/Images/" exported="true"/>
<component id="fcfggf" name="CurrencyIcon.xml" path="/Com/"/>
<component id="fcfggh" name="CurrencyTag1.xml" path="/Com/"/>
<component id="fcfggi" name="CurrencyTag2.xml" path="/Com/"/>
<component id="fcfggj" name="BtnIcon2.xml" path="/Com/Buttons/"/>
<image id="fcfggk" name="button_square_2.png" path="/Images/button/" scale="9grid" scale9grid="32,32,64,64"/>
<image id="fcfggl" name="button_square_3.png" path="/Images/button/"/>
<image id="fcfggm" name="button_square_4.png" path="/Images/button/"/>
<image id="fcfggn" name="button_square_5.png" path="/Images/button/"/>
<image id="fcfggo" name="button_square_6.png" path="/Images/button/"/>
<image id="fcfggp" name="button_square_7.png" path="/Images/button/"/>
<component id="fcfggq" name="CurrencyGroup.xml" path="/Com/" exported="true"/>
<image id="fcfg9" name="20250521000344_1.jpg" path="/效果图/"/>
<component id="fcfggr" name="CommonMenu.xml" path="/" exported="true"/>
<component id="fcfggs" name="ButtonTab.xml" path="/Com/Buttons/" exported="true"/>
<image id="fcfggt" name="icon_controller_1.png" path="/Icon/控制图标/"/>
<image id="fcfggu" name="icon_controller_2.png" path="/Icon/控制图标/"/>
<image id="fcfggv" name="icon_controller_3.png" path="/Icon/控制图标/"/>
<image id="fcfggw" name="icon_controller_4.png" path="/Icon/控制图标/"/>
<image id="fcfggx" name="icon_controller_27.png" path="/Icon/控制图标/"/>
<image id="fcfggy" name="icon_controller_28.png" path="/Icon/控制图标/"/>
<image id="fcfggz" name="icon_controller_29.png" path="/Icon/控制图标/"/>
<image id="fcfgh0" name="20250521222909_1.jpg" path="/效果图/"/>
</resources>
<publish name="" path="../Assets/Resources/Fgui/Common" packageCount="2" genCode="true"/>
</packageDescription>

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Some files were not shown because too many files have changed in this diff Show More