Compare commits

..

No commits in common. "bf92e54eb458287e01d2df412dde29336670f7b2" and "629a98538e6089011bc116ecb23aba9d58353bea" have entirely different histories.

6 changed files with 114 additions and 94 deletions

View File

@ -269,6 +269,7 @@ GameObject:
- component: {fileID: 4723123646134104045}
- component: {fileID: 4723123646134104035}
- component: {fileID: 4723123646134104044}
- component: {fileID: 2556990734553169851}
m_Layer: 5
m_Name: Valuerangepanl
m_TagString: Untagged
@ -344,6 +345,29 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2556990734553169851
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4723123646134104046}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bc58d6fa99d4eac4ab6dc73912d26cba, type: 3}
m_Name:
m_EditorClassIdentifier:
stored: {fileID: 4723123646559606038}
injure: {fileID: 4723123646174311031}
disturb: {fileID: 4723123646946089641}
angle: {fileID: 4723123646364206457}
stored_text: {fileID: 4723123647215699982}
injure_text: {fileID: 4723123647056567040}
disturb_text: {fileID: 4723123647318733699}
angle_text: {fileID: 4723123646884053970}
cancel1_btn: {fileID: 4723123646925232090}
cancel2_btn: {fileID: 4723123646698657968}
queren_btn: {fileID: 4723123647256361776}
--- !u!1 &4723123646174311025
GameObject:
m_ObjectHideFlags: 0
@ -593,7 +617,7 @@ GameObject:
- component: {fileID: 4723123646364206458}
- component: {fileID: 4723123646364206457}
m_Layer: 5
m_Name: SliderAngle1
m_Name: SliderAngle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -684,7 +708,7 @@ GameObject:
- component: {fileID: 4723123646374192124}
- component: {fileID: 4723123646374192125}
m_Layer: 5
m_Name: Text2
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1416,7 +1440,7 @@ GameObject:
- component: {fileID: 4723123646884053969}
- component: {fileID: 4723123646884053970}
m_Layer: 5
m_Name: angle1_text
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1481,7 +1505,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
m_Text: "\u6C34\u5E73\u65B9\u5411\u5168\u5411\uFF0C\u4FEF\u4EF0\u65B9\u54110~60\u5EA6"
--- !u!1 &4723123646925232068
GameObject:
m_ObjectHideFlags: 0
@ -1702,7 +1726,7 @@ GameObject:
- component: {fileID: 4723123647038005809}
- component: {fileID: 4723123647038005810}
m_Layer: 5
m_Name: Text1
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1780,7 +1804,7 @@ GameObject:
- component: {fileID: 4723123647056567047}
- component: {fileID: 4723123647056567040}
m_Layer: 5
m_Name: accumulate_text
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1845,7 +1869,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
m_Text: 3~10s
--- !u!1 &4723123647113957533
GameObject:
m_ObjectHideFlags: 0
@ -1894,7 +1918,7 @@ GameObject:
- component: {fileID: 4723123647148398507}
- component: {fileID: 4723123647148398484}
m_Layer: 5
m_Name: Text4
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1959,7 +1983,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u77AC\u65F6\u89C6\u573A\uFF1A"
m_Text: "\u5E72\u6270\u89D2\u5EA6\uFF1A"
--- !u!1 &4723123647174647711
GameObject:
m_ObjectHideFlags: 0
@ -1972,7 +1996,7 @@ GameObject:
- component: {fileID: 4723123647174647708}
- component: {fileID: 4723123647174647709}
m_Layer: 5
m_Name: Text3
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -2050,7 +2074,7 @@ GameObject:
- component: {fileID: 4723123647215699981}
- component: {fileID: 4723123647215699982}
m_Layer: 5
m_Name: stored_text
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -2115,7 +2139,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
m_Text: 5s
--- !u!1 &4723123647256361778
GameObject:
m_ObjectHideFlags: 0
@ -2320,7 +2344,7 @@ GameObject:
- component: {fileID: 4723123647318733698}
- component: {fileID: 4723123647318733699}
m_Layer: 5
m_Name: dis_text
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -2385,7 +2409,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
m_Text: 0.1~1km
--- !u!1 &4723123647376878727
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,11 +1,16 @@
using LitJson;
using DataModel.Model;
using LitJson;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using System.Reflection;
using Tenkoku.Core;
using UnityEngine;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityTemplateProjects;
@ -21,7 +26,7 @@ public class Scenariopage : MonoBehaviour
public Image Radius_panl;//值范围面板
public Image mianban;//
public Button object_list_btn;//对象列表按钮
//public Button basic_info_btn;//基本信息按钮
public Button basic_info_btn;//基本信息按钮
public Image basic_information_iamg;//基本信息面板
public Button off4_btn;//基本信息关闭按钮
public Button model_list_btn;//模型按钮
@ -32,7 +37,7 @@ public class Scenariopage : MonoBehaviour
public Button Fork_off_btn;//设备详情叉掉面板
public Button queren_btn;//设备详情确认按钮
public Button quxiao_btn;//设备详情取消按钮
public Image model_panl;//模型页面
public Image model_panl;//模型页面按钮
public Button off_btn;//选择设备的关闭按钮
public RectTransform environment_configuration1;//环境页面
public Button environment_setting_btn;//环境按钮
@ -48,9 +53,6 @@ public class Scenariopage : MonoBehaviour
public Button kong_btn;//空
public Button qita_btn;//其他
public Image moxin_yemian;//显示模型框
public RectTransform Model_template;//设备模型和场景模型面板
public Button Device_button;//设备模型
public Button Scene_button;//场景模型
public Image moyin_yemian1;
public Image moyin_yemian2;
public Image moyin_yemian3;
@ -1508,9 +1510,8 @@ public class Scenariopage : MonoBehaviour
});
verify_bton2.onClick.AddListener(() =>
{
Scenariofile_panl.gameObject.SetActive(false);//失活科目列表
basic_information_iamg1.gameObject.SetActive(false);//失活基本信息按钮
environment_setting_btn.gameObject.SetActive(true);//激活环境按钮
//Scenariofile_panl.gameObject.SetActive(false);
basic_information_iamg1.gameObject.SetActive(false);
});
cancel_bton2.onClick.AddListener(() =>
{
@ -1830,8 +1831,6 @@ public class Scenariopage : MonoBehaviour
{
if (duixiang == true)
{
environment_configuration1.gameObject.SetActive(false);
Model_template.gameObject.SetActive(false);//场景模型和设备模型
model_panl.gameObject.SetActive(false);
Scenariofile_panl.gameObject.SetActive(false);
object_list_panl.gameObject.SetActive(true);
@ -2059,7 +2058,6 @@ public class Scenariopage : MonoBehaviour
//想定文件下的打开按钮
unpack_btn.onClick.AddListener(() =>
{
Model_template.gameObject.SetActive(false);//场景模型和设备模型
model_panl.gameObject.SetActive(false);
ScrollView_unpack.gameObject.SetActive(false);
object_list_panl.gameObject.SetActive(false);
@ -2111,20 +2109,11 @@ public class Scenariopage : MonoBehaviour
}
}
Model_template.gameObject.SetActive(false);//场景模型和设备模型
model_panl.gameObject.SetActive(false);//场景模型页面
select_device_iamg.gameObject.SetActive(false);//环境模型页面
environment_configuration1.gameObject.SetActive(false);//环境面板
object_list_panl.gameObject.SetActive(false);//设备参数面板
environment_setting_btn.gameObject.SetActive(false);//环境按钮
model_list_btn.gameObject.SetActive(false);//模型按钮
object_list_btn.gameObject.SetActive(false);//对象列表按钮
ScrollView_unpack.gameObject.SetActive(false);
});
//想定文件下的退出按钮
quit.onClick.AddListener(() =>
{
Model_template.gameObject.SetActive(false);
ScrollView_unpack.gameObject.SetActive(false);
});
@ -2141,8 +2130,6 @@ public class Scenariopage : MonoBehaviour
Preservation();//修改接口
}
select_device_iamg.gameObject.SetActive(false);
model_panl.gameObject.SetActive(false);
object_list_btn.gameObject.SetActive(true);
});
//选择设备取消按钮
Cancel_btnn.onClick.AddListener(() =>
@ -2642,7 +2629,6 @@ public class Scenariopage : MonoBehaviour
time_txt.text = _time;
mode_text.text = _trainModel;
post_txt.text = deviceCount;
environment_configuration1.gameObject.SetActive(false);
basic_information_iamg1.gameObject.SetActive(true);
}
@ -2726,54 +2712,25 @@ public class Scenariopage : MonoBehaviour
{
model_list_btn.onClick.AddListener(() =>
{
Modelbutton();//模型按钮调用
environment_configuration1.gameObject.SetActive(false);//环境页面失活
object_list_panl.gameObject.SetActive(false);//设备参数面板
Model_template.gameObject.SetActive(true);
//if (model == true)
//{
// Inquire();//查询设备想定接口
// environment_configuration1.gameObject.SetActive(false);
// object_list_panl.gameObject.SetActive(false);
// basic_information_iamg1.gameObject.SetActive(false);
// Scenariofile_panl.gameObject.SetActive(false);
// model_panl.gameObject.SetActive(true);
// select_device_iamg.gameObject.SetActive(true);
//}
});
}
private void Modelbutton()
{
Device_button.onClick.AddListener(() =>
{
if (model == true)
{
Inquire();//查询设备想定接口
Model_template.gameObject.SetActive(false);
environment_configuration1.gameObject.SetActive(false);
object_list_panl.gameObject.SetActive(false);
basic_information_iamg1.gameObject.SetActive(false);
Scenariofile_panl.gameObject.SetActive(false);
model_panl.gameObject.SetActive(false);
select_device_iamg.gameObject.SetActive(true);
}
});
Scene_button.onClick.AddListener(() =>
{
Model_template.gameObject.SetActive(false);
Inquire();//查询设备想定接口
environment_configuration1.gameObject.SetActive(false);
object_list_panl.gameObject.SetActive(false);
basic_information_iamg1.gameObject.SetActive(false);
Scenariofile_panl.gameObject.SetActive(false);
model_panl.gameObject.SetActive(true);
select_device_iamg.gameObject.SetActive(false);
});
select_device_iamg.gameObject.SetActive(true);
}
});
}
private void Inquire()
{
string url = Url_Querydevice;
@ -2854,7 +2811,7 @@ public class Scenariopage : MonoBehaviour
//Debug.LogError(tenkokuModule.weather_WindAmt);
//tmie = year_text.text + " " + month_text.text + " " + day_text.text + " " + when_text.text;
model_list_btn.gameObject.SetActive(true);
environment_configuration1.gameObject.SetActive(false);
}
else
@ -3081,15 +3038,10 @@ public class Scenariopage : MonoBehaviour
{
environment_setting_btn.onClick.AddListener(() =>
{
Model_template.gameObject.SetActive(false);//场景模型和设备模型
object_list_panl.gameObject.SetActive(false);//设备参数面板
model_panl.gameObject.SetActive(false);//场景模型页面
select_device_iamg.gameObject.SetActive(false);//环境模型页面
Scenariofile_panl.gameObject.SetActive(false);
environment_configuration1.gameObject.SetActive(true);
basic_information_iamg.gameObject.SetActive(false);
select_device_iamg.gameObject.SetActive(false);
basic_information_iamg1.gameObject.SetActive(false);
environment_configuration1.gameObject.SetActive(true);
});
fork_off_btn.onClick.AddListener(() =>
{
@ -3105,12 +3057,12 @@ public class Scenariopage : MonoBehaviour
/// </summary>
private void Basic()
{
//basic_info_btn.onClick.AddListener(() =>
//{
// basic_information_iamg.gameObject.SetActive(true);
// environment_configuration1.gameObject.SetActive(false);
// select_device_iamg.gameObject.SetActive(false);
//});
basic_info_btn.onClick.AddListener(() =>
{
basic_information_iamg.gameObject.SetActive(true);
environment_configuration1.gameObject.SetActive(false);
select_device_iamg.gameObject.SetActive(false);
});
off4_btn.onClick.AddListener(() =>
{
basic_information_iamg.gameObject.SetActive(false);

View File

@ -15,7 +15,7 @@ public class Underneath : MonoBehaviour
subjectName.text = name;
settingBtn.onClick.AddListener(() =>
{
//Debug.Log("ewewewew");
callback?.Invoke();
});
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;
[Serializable]
public class ExtendedEvent : UnityEvent<float> { } //定义拓展的事件
public class ExtendedSlider : Slider, IBeginDragHandler, IEndDragHandler
{
public ExtendedEvent DragStart = new ExtendedEvent();
public ExtendedEvent DragStop = new ExtendedEvent();
public ExtendedEvent PointerDown = new ExtendedEvent();
public void OnBeginDrag(PointerEventData eventData)
{
DragStart.Invoke(m_Value);
}
public void OnEndDrag(PointerEventData eventData)
{
DragStop.Invoke(m_Value);
}
public override void OnPointerDown(PointerEventData eventData)
{
base.OnPointerDown(eventData);
PointerDown.Invoke(m_Value);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 354647e2aa8b3e84a9705a7d1b14bfc9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: