// Use this for initialization void Start() { textManager = GameObject.Find("LeftBodyPart").GetComponent <textbox>(); symManager = GameObject.Find("Text1").GetComponent <symptomManager>(); lManager = GameObject.Find("Text1").GetComponent <lightManager>(); selectedPart = ""; }
// Use this for initialization void Start() { tManag = GameObject.Find("GvrEventSystem").GetComponent <translationManager>(); textManager = GameObject.Find("LeftBodyPart").GetComponent <textbox>(); lManag = GameObject.Find("Text1").GetComponent <lightManager>(); selectedPart = ""; symptomToggles = new Dictionary <bodyPart, List <symptom> >() { }; selectedSymptoms = new List <symptom>() { }; defaultSymptoms = new List <symptom> { symptom.Pain, symptom.Swelling, symptom.Weakness, symptom.Redness, symptom.Itching, symptom.Other }; symptomsDictionary = new Dictionary <bodyPart, List <symptom> >() { { bodyPart.UpperRightLeg, defaultSymptoms }, { bodyPart.Knees, defaultSymptoms }, { bodyPart.UpperLeftLeg, defaultSymptoms }, { bodyPart.Belly, new List <symptom> { symptom.Diarrhea, symptom.Constipation, symptom.LossOfAppetite, symptom.Swelling, symptom.WeightLoss, symptom.Other } }, { bodyPart.LowerRightLeg, defaultSymptoms }, { bodyPart.LowerHead, new List <symptom> { symptom.Vomiting, symptom.BleedingGums, symptom.DryMouth, symptom.StiffNeck, symptom.Thirsty, symptom.Other } }, { bodyPart.LowerBack, defaultSymptoms }, { bodyPart.LowerLeftLeg, defaultSymptoms }, { bodyPart.Feet, defaultSymptoms }, { bodyPart.UpperHead, new List <symptom> { symptom.Headache, symptom.Dizziness, symptom.EyePain, symptom.Fever, symptom.YellowingOfEyes, symptom.Other } }, { bodyPart.UpperBack, defaultSymptoms }, { bodyPart.Chest, new List <symptom> { symptom.Cough, symptom.ShortOfBreath, symptom.Chills, symptom.Sweating, symptom.Pain, symptom.Other } }, { bodyPart.RightBiceps, defaultSymptoms }, { bodyPart.RightForearms, defaultSymptoms }, { bodyPart.RightTriceps, defaultSymptoms }, { bodyPart.RightHandPinky, defaultSymptoms }, { bodyPart.RightHandRing, defaultSymptoms }, { bodyPart.RightHandMiddle, defaultSymptoms }, { bodyPart.RightHandIndex, defaultSymptoms }, { bodyPart.RightHandThumb, defaultSymptoms }, { bodyPart.LeftBiceps, defaultSymptoms }, { bodyPart.LeftForearms, defaultSymptoms }, { bodyPart.LeftTriceps, defaultSymptoms }, { bodyPart.LeftHandPinky, defaultSymptoms }, { bodyPart.LeftHandRing, defaultSymptoms }, { bodyPart.LeftHandMiddle, defaultSymptoms }, { bodyPart.LeftHandIndex, defaultSymptoms }, { bodyPart.LeftHandThumb, defaultSymptoms }, }; }
private lightManager m_lm; // Light manager to control the responsive lights in the ship // ------------------------------------------ // Start is called before update // ------------------------------------------ void Start() { // Get the image component and the original sprite m_btn = GetComponent <Image>(); m_original = m_btn.sprite; // Get the AudioManager m_audioManager = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>(); // Get the light manager m_lm = GameObject.FindGameObjectWithTag("GameController").GetComponent <lightManager>(); }
public override void OnInspectorGUI() { lightManager myTarget = (lightManager)target; DrawDefaultInspector(); EditorUtility.SetDirty(myTarget); foreach (var item in Resources.LoadAll("LightType", typeof(lightType))) { lightType aux = (lightType)item; if (!myTarget.listLights.Contains(aux)) { myTarget.listLights.Add(aux); } } _ligthName = EditorGUILayout.TextField("Nome: ", _ligthName); EditorGUILayout.BeginHorizontal(); _begin = EditorGUILayout.IntField("Begin: ", _begin, GUILayout.Width(175)); _end = EditorGUILayout.IntField("End: ", _end, GUILayout.Width(175)); EditorGUILayout.EndHorizontal(); _ligthColor = EditorGUILayout.ColorField("Cor da Luz: ", _ligthColor); EditorGUILayout.BeginHorizontal(); _intensity = EditorGUILayout.Slider(_intensity, 0, 5.00f); _turnOnLights = EditorGUILayout.Toggle("On Ligths: ", _turnOnLights); EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Testar Luz")) { myTarget.testLigth(_ligthColor, _intensity); } EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); if (GUILayout.Button("Salvar Luzes")) { var ligthType = ScriptableObject.CreateInstance <lightType>(); ProjectWindowUtil.CreateAsset(ligthType, "Assets/Resources/LightType/" + _ligthName + ".asset"); ligthType.init(_ligthName, _ligthColor, _intensity, _begin, _end, _turnOnLights); } }