public override void OnInspectorGUI() { PanelFade panel = (PanelFade)target; serializedObject.Update(); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(rank); EditorGUILayout.PropertyField(duration); EditorGUILayout.PropertyField(curve); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Linked Event: "); panel.linkedEvent = (LinkedEvent)EditorGUILayout.EnumPopup(panel.linkedEvent); EditorGUILayout.EndHorizontal(); EditorGUILayout.PropertyField(ignorePage); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Attach objects to Fade: "); list.DoLayoutList(); serializedObject.ApplyModifiedProperties(); }
void OnClick() { // 找到该按钮要关闭的Panel对象中的PanelFade脚本 PanelFade _panelfade_script = gameObject.GetComponentInParent <PanelFade>(); // 把脚本中对应关闭状态的_closing设为true _panelfade_script._closing = true; }
void Update() { fader += Time.deltaTime; if (fader > 5) { PanelFade pf = GameObject.Find("PanelFadeObject").GetComponent <PanelFade>(); pf.loadLevel("Ollantay"); } }
private void FadeMethod() { PanelFade.Begin(); Panel.Visibility = Visibility.Collapsed; ProgressFadeMethod(); //文件没有被选中,但PickFileButton禁用所有按钮 DisableButtons(); SetPickFileButton(true); SetOutputFileButton(true); SetCancelButton(false); }
void OnClick() { PanelFade _panelfade_script = GameObject.Find("UI Root/Panel1").GetComponent <PanelFade>(); _panelfade_script._closing = true; }