コード例 #1
0
    // Use this for initialization
    void Start()
    {
        {
            load_mananger = gameObject.GetComponent<InitializeScreen>();
            helper = gameObject.AddComponent<BackEndHelper>();
            states = new Dictionary<State, GameObject>();
            states.Add(State.TherapistRegistraion, TherapistRegisterMenu);
            states.Add(State.Login, Login_Menu);
            states.Add(State.TherapistProfile, TherapistProfileMenu);
            states.Add(State.PatientProfile, PatientProfileMenu);
            states.Add(State.PatientRegistration, PatientRegistrationMenu);
            states.Add(State.PostData, PostDataMenu);
            states.Add(State.ChangeTherapistInfo, UpdateTherapistMenu);
            states.Add(State.ChangePatientInfo, UpdatePatientMenu);

            current_state = State.Login;

            error_sound = GameObject.Find("Menus").GetComponents<AudioSource>()[1];
            started = false;
        }
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        {
            load_mananger = gameObject.GetComponent<InitializeScreen>();
            helper = gameObject.AddComponent<BackEndHelper>();
            states = new Dictionary<State, GameObject>();
            states.Add(State.TherapistRegistraion, TherapistRegisterMenu);
            states.Add(State.Login, Login_Menu);
            states.Add(State.TherapistProfile, TherapistProfileMenu);
            states.Add(State.PatientProfile, PatientProfileMenu);
            states.Add(State.PatientRegistration, PatientRegistrationMenu);
            states.Add(State.PostData, PostDataMenu);
            current_state = State.Login;
            foreach(KeyValuePair<State, GameObject> pair in states)
            {
                if (pair.Key != current_state)
                    pair.Value.SetActive(false);
            }

            error_sound = GameObject.Find("Menus").GetComponents<AudioSource>()[1];
        }
    }