Compare commits

...

2 Commits

Author SHA1 Message Date
2bbfb58325 更新导表工具, 支持object数据类型 2024-03-20 14:03:46 +08:00
4a0ae0aa0f 细节优化 2024-03-20 00:52:40 +08:00
6 changed files with 55 additions and 44 deletions

View File

@ -707,7 +707,16 @@ public static class ExcelGenerator
var tempStr = str.Substring(1, str.Length - 2);
var typeData = ConvertToType(tempStr, depth + 1);
var typeStr = typeData.TypeStr + "[]";
var typeName = typeData.TypeName + "[]";
string typeName;
var index = typeData.TypeName.IndexOf(',');
if (index < 0)
{
typeName = typeData.TypeName + "[]";
}
else
{
typeName = typeData.TypeName.Substring(0, index) + "[]" + typeData.TypeName.Substring(index);
}
if (typeData.IsRefExcel) //引用过其他表
{
@ -724,12 +733,13 @@ public static class ExcelGenerator
{
switch (typeName)
{
case "object": return typeof(JsonElement).FullName;
case "boolean": return "bool";
case "vector2": return "SerializeVector2";
case "vector3": return "SerializeVector3";
case "color": return "SerializeColor";
case "activityType": return "ActivityType";
case "activityQuality": return "ActivityQuality";
case "vector2": return typeof(SerializeVector2).FullName;
case "vector3": return typeof(SerializeVector3).FullName;
case "color": return typeof(SerializeColor).FullName;
case "activityType": return typeof(ActivityType).FullName;
case "activityQuality": return typeof(ActivityQuality).FullName;
}
return typeName;
@ -739,24 +749,25 @@ public static class ExcelGenerator
{
switch (typeName)
{
case "object":return typeof(JsonElement).AssemblyQualifiedName;
case "bool":
case "boolean": return typeof(bool).FullName;
case "byte": return typeof(byte).FullName;
case "sbyte": return typeof(sbyte).FullName;
case "short": return typeof(short).FullName;
case "ushort": return typeof(ushort).FullName;
case "int": return typeof(int).FullName;
case "uint": return typeof(uint).FullName;
case "long": return typeof(long).FullName;
case "ulong": return typeof(ulong).FullName;
case "string": return typeof(string).FullName;
case "float": return typeof(float).FullName;
case "double": return typeof(double).FullName;
case "vector2": return "SerializeVector2";
case "vector3": return "SerializeVector3";
case "color": return "SerializeColor";
case "activityType": return "ActivityType";
case "activityQuality": return "ActivityQuality";
case "boolean": return typeof(bool).AssemblyQualifiedName;
case "byte": return typeof(byte).AssemblyQualifiedName;
case "sbyte": return typeof(sbyte).AssemblyQualifiedName;
case "short": return typeof(short).AssemblyQualifiedName;
case "ushort": return typeof(ushort).AssemblyQualifiedName;
case "int": return typeof(int).AssemblyQualifiedName;
case "uint": return typeof(uint).AssemblyQualifiedName;
case "long": return typeof(long).AssemblyQualifiedName;
case "ulong": return typeof(ulong).AssemblyQualifiedName;
case "string": return typeof(string).AssemblyQualifiedName;
case "float": return typeof(float).AssemblyQualifiedName;
case "double": return typeof(double).AssemblyQualifiedName;
case "vector2": return typeof(SerializeVector2).AssemblyQualifiedName;
case "vector3": return typeof(SerializeVector3).AssemblyQualifiedName;
case "color": return typeof(SerializeColor).AssemblyQualifiedName;
case "activityType": return typeof(ActivityType).AssemblyQualifiedName;
case "activityQuality": return typeof(ActivityQuality).AssemblyQualifiedName;
}
return typeName;

View File

@ -1 +1 @@
6
7

View File

@ -1714,7 +1714,7 @@
"CameraShake": 2,
"BacklashRange": [
1,
1
2
],
"BacklashRegressionSpeed": 35,
"UpliftAngle": 3,
@ -1790,7 +1790,7 @@
"CameraShake": 2,
"BacklashRange": [
1,
1
2
],
"BacklashRegressionSpeed": 35,
"UpliftAngle": 3,

View File

@ -123,7 +123,7 @@ DefaultLayer = 1
ShowOffset = Vector2(2.08165e-12, 2)
CollisionVisible = false
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0006" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0006" index="0"]
position = Vector2(-10, -3)
texture = ExtResource("7_30qwa")
@ -135,7 +135,7 @@ DefaultLayer = 1
ShowOffset = Vector2(2.08165e-12, 2)
CollisionVisible = false
[node name="ActivityInstance" type="Node2D" parent="ItemRoot/Item0008" index="1"]
[node name="ActivityInstance" type="Node2D" parent="ItemRoot/Item0008" index="0"]
position = Vector2(2.5, -12)
script = ExtResource("5_lowqi")
Id = "item_0031"
@ -151,7 +151,7 @@ DefaultLayer = 1
ShowOffset = Vector2(2.08165e-12, 2)
CollisionVisible = false
[node name="Item26" type="Sprite2D" parent="ItemRoot/Item0013" index="1"]
[node name="Item26" type="Sprite2D" parent="ItemRoot/Item0013" index="0"]
position = Vector2(18, -2)
texture = ExtResource("8_61dkg")
@ -163,19 +163,19 @@ DefaultLayer = 1
ShowOffset = Vector2(2.08165e-12, 2)
CollisionVisible = false
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0017" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0017" index="0"]
position = Vector2(-2, -13)
texture = ExtResource("8_u3vry")
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0017" index="2"]
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0017" index="1"]
position = Vector2(18, -11)
texture = ExtResource("9_lhdr8")
[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0017" index="3"]
[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0017" index="2"]
position = Vector2(-16, -2)
texture = ExtResource("10_4eqn0")
[node name="Sprite2D4" type="Sprite2D" parent="ItemRoot/Item0017" index="4"]
[node name="Sprite2D4" type="Sprite2D" parent="ItemRoot/Item0017" index="3"]
position = Vector2(10, -1)
texture = ExtResource("11_tg3jo")
@ -201,11 +201,11 @@ Id = "item_0002"
DefaultLayer = 1
CollisionVisible = false
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0002" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0002" index="0"]
position = Vector2(32, -2)
texture = ExtResource("12_agfji")
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0002" index="2"]
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0002" index="1"]
material = SubResource("ShaderMaterial_i7git")
position = Vector2(0, -15)
scale = Vector2(1, -1)
@ -223,7 +223,7 @@ script = ExtResource("5_lowqi")
Id = "item_0004"
DefaultLayer = 1
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0004" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0004" index="0"]
position = Vector2(0, -17)
texture = ExtResource("13_unnpl")
@ -258,15 +258,15 @@ script = ExtResource("5_lowqi")
Id = "item_0009"
DefaultLayer = 1
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0009" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0009" index="0"]
position = Vector2(-24, -10)
texture = ExtResource("15_h7524")
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0009" index="2"]
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0009" index="1"]
position = Vector2(1, -10)
texture = ExtResource("15_h7524")
[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0009" index="3"]
[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0009" index="2"]
position = Vector2(37, -10)
texture = ExtResource("15_h7524")
@ -300,7 +300,7 @@ script = ExtResource("5_lowqi")
Id = "item_0015"
DefaultLayer = 1
[node name="Slice04" type="Sprite2D" parent="ItemRoot/Item0015" index="1"]
[node name="Slice04" type="Sprite2D" parent="ItemRoot/Item0015" index="0"]
position = Vector2(16, -9)
texture = ExtResource("15_h7524")
@ -322,11 +322,11 @@ script = ExtResource("5_lowqi")
Id = "item_0019"
DefaultLayer = 1
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0019" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0019" index="0"]
position = Vector2(-23, -7)
texture = ExtResource("16_xj0e1")
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0019" index="2"]
[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0019" index="1"]
position = Vector2(24, -8)
texture = ExtResource("17_gwwce")

View File

@ -1235,9 +1235,9 @@ public abstract partial class Weapon : ActivityObject, IPackageItem<Role>
}
else //在地上
{
var v = Utils.Random.RandomConfigRange(Attribute.BacklashRange) * 5;
var v = Utils.Random.RandomConfigRange(Attribute.BacklashRange) * 15;
var externalForce = MoveController.AddForce(new Vector2(-v, 0).Rotated(Rotation));
externalForce.RotationSpeed = -Mathf.DegToRad(40);
externalForce.RotationSpeed = -Mathf.DegToRad(50);
externalForce.RotationResistance = Mathf.DegToRad(80);
}