예제 #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>();
 }