示例#1
0
    private void OnGUI()
    {
        capsule = FindObjectOfType <CapsuleAirController>();

        scroll = GUILayout.BeginScrollView(scroll);

        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();
        {
            PrintLabel("Current air");

            ShowAirGUI(capsule.air);
        }
        GUILayout.EndVertical();
        GUILayout.BeginVertical();
        {
            PrintLabel("Target air");

            ShowAirGUI(capsule.targetAir);
        }
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        PrintLabel("Tanks");
        ShowAllTanks();

        GUILayout.EndScrollView();
    }
示例#2
0
 private void Awake()
 {
     if (!instance)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
示例#3
0
文件: NPump.cs 项目: Elgirhath/Mars
 void Start()
 {
     airController = GetComponentInParent <CapsuleAirController>();
     tank          = GetComponentInChildren <GasTank>();
     powerSocket   = GetComponent <PowerSocket>();
 }
示例#4
0
文件: Heater.cs 项目: Elgirhath/Mars
 void Start()
 {
     airController = GetComponentInParent <CapsuleAirController>();
     powerSocket   = GetComponent <PowerSocket>();
 }