This repository has been archived on 2026-01-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ULD_PT/Assets/Scripts/ULD.cs
jmaniuvc 335bfbaf4c main
2025-05-29 10:49:48 +09:00

44 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ULD : MonoBehaviour
{
public string typeName;
public float volume;
public GameObject uld;
public GameObject uld_Plane;
public float uldHeight;
GameObject virtualPlane;
public float virtualPlaneHeight;
public MeshRenderer virtualPlaneMeshRenderer;
public void Initialize()
{
uld = this.gameObject;
uld_Plane = this.transform.Find("ULD_Plane").gameObject;
uldHeight = uld_Plane.transform.position.y;
virtualPlane = this.transform.Find("ULD_VirtualPlane").gameObject;
virtualPlane.tag = "VirtualPlane";
virtualPlaneMeshRenderer = virtualPlane.GetComponent<MeshRenderer>();
virtualPlaneHeight = virtualPlane.transform.position.y;
SetVolume();
}
void SetVolume()
{
if (this.gameObject.name == "SCA" || this.gameObject.name == "SCA(Clone)")
{
volume = 19.5f;
}
else if (this.gameObject.name == "SCB" || this.gameObject.name == "SCB(Clone)")
{
volume = 17.7f;
}
}
}