瀏覽代碼

wall coordinates

Виктор Шейко 4 年之前
父節點
當前提交
f81b34c241
共有 3 個文件被更改,包括 14 次插入5 次删除
  1. 5 0
      .gitignore
  2. 1 1
      Assets/Scenes/Player.unity
  3. 8 4
      Assets/Scripts/Models/Wall.cs

+ 5 - 0
.gitignore

@@ -72,3 +72,8 @@ crashlytics-build.properties
 # Temporary auto-generated Android Assets
 /[Aa]ssets/[Ss]treamingAssets/aa.meta
 /[Aa]ssets/[Ss]treamingAssets/aa/*
+/PositionViewer_Data
+/MonoBleedingEdge
+/UnityPlayer.dll
+/UnityCrashHandler64.exe
+/PositionViewer.exe

+ 1 - 1
Assets/Scenes/Player.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 0}
-  m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
+  m_IndirectSpecularColor: {r: 0.4465782, g: 0.49641252, b: 0.5748167, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:

+ 8 - 4
Assets/Scripts/Models/Wall.cs

@@ -97,10 +97,14 @@ public class Wall
         //var wall = WallCreate.AddWall(this,
         //               new Vector3(w.start_width, WallCreate.WallHeight / 2, w.start_height),
         //               new Vector3(Mathf.Abs(w.end_width), WallCreate.WallHeight, Mathf.Abs(w.end_height)));
-        coord.Add(end_width - (start_width/2));
-        coord.Add(end_height - (start_height / 2));
-        coord.Add(end_width + (start_width/2));
-        coord.Add(end_height + (start_height / 2));
+        var x1 = start_width - (end_width / 2);
+        coord.Add(x1); //x1
+        var x2 = start_height - (end_height / 2);
+        coord.Add(x2); //z1
+        var z1 = start_width + (end_width / 2);
+        coord.Add(z1); //x2
+        var z2 = start_height + (end_height  / 2);
+        coord.Add(z2); //z2
 
         return coord;
     }