按照新系统组装peipei

This commit is contained in:
2024-12-14 17:47:15 +08:00
parent 8f28951f7a
commit c33f8425ec
17 changed files with 7258 additions and 7140 deletions
@@ -29,7 +29,7 @@ public class HeatMapController : MonoBehaviour
//public float module=0.7f;
//public Texture2D hotspotShapeTexture; // 引用热点形状纹理
private float tempture = 0;
private float tempture = 1;
//public GameObject heatMap;
public float Tempture
@@ -86,7 +86,8 @@ public class HeatMapController : MonoBehaviour
for (int i = 0; i < 7; i++)
{
RectTransform transform=Pos[i].GetComponent<RectTransform>();
//RectTransform transform=Pos[i].GetComponent<RectTransform>();
Transform transform=Pos[i].GetComponent<Transform>();
Debug.Log($"Point {i}: {points[i]}");
if (i == 0)
@@ -101,8 +102,13 @@ public class HeatMapController : MonoBehaviour
{
points[i] = new Vector4(Pos[i].position.x, Pos[i].position.y, modulesTempture, 0); // (x, y, z, temperature)
}
properties[i] = new Vector4(transform.rect.width*1, transform.rect.height*1, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
}
Sprite currentSprite=transform.GetComponent<SpriteRenderer>().sprite;
properties[i] = new Vector4(currentSprite.bounds.size.x, currentSprite.bounds.size.y, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
Debug.Log($"Point {i}: {currentSprite.bounds.size.x}");
//properties[i] = new Vector4(transform.rect.width*1, transform.rect.height*1, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
//properties[i] = new Vector4(transform.rect.width*1, transform.rect.height*1, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
}
// 将数据传递给 Shader