Files
MuHua-Core/Assets/ModulePrefab/PrefabPlateDesign.cs
T
MuHua-123 84243e75a8 s
2024-11-25 18:32:05 +08:00

21 lines
599 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabPlateDesign : ModulePrefab<DataPlate> {
private DataPlate plate;
private MeshFilter meshFilter => GetComponent<MeshFilter>();
private MeshCollider meshCollider => GetComponent<MeshCollider>();
public override DataPlate Value => plate;
public override void UpdateVisual(DataPlate plate) {
this.plate = plate;
transform.localPosition = plate.designPosition;
meshFilter.mesh = plate.designMesh;
meshCollider.sharedMesh = plate.designMesh;
}
}