Compare commits

...

4 Commits

Author SHA1 Message Date
YangHua 0a26adf9d3 串UI 2023-09-14 16:45:22 +08:00
YangHua aa73d16fb2 Merge branch 'master' of http://119.45.94.212:1280/zhuyayu/E_ElecCompetition 2023-09-14 15:22:11 +08:00
YangHua 3c0af738e5 任务书接口 2023-09-14 15:13:22 +08:00
YangHua 0e1424e037 添加任务书接口 2023-09-14 15:13:06 +08:00
16 changed files with 208 additions and 78 deletions

View File

@ -34766,7 +34766,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &379354441
RectTransform:
m_ObjectHideFlags: 0
@ -34831,18 +34831,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 5090827398298492658}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 2047386840}
m_TargetAssemblyTypeName: UnityEngine.UI.Toggle, UnityEngine.UI
m_MethodName: set_isOn
@ -103168,6 +103156,7 @@ GameObject:
- component: {fileID: 1067605742}
- component: {fileID: 1067605745}
- component: {fileID: 1067605746}
- component: {fileID: 1067605747}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
@ -103276,6 +103265,7 @@ MonoBehaviour:
MobileTerminalController: {fileID: 1067605742}
assignmentController: {fileID: 1067605744}
bottomCotroller: {fileID: 1067605746}
toolModelManager: {fileID: 0}
exitBtn: {fileID: 1602550215}
backToToolBtn: {fileID: 1505331878}
--- !u!114 &1067605742
@ -103343,8 +103333,11 @@ MonoBehaviour:
m_EditorClassIdentifier:
RWPanel: {fileID: 5090827398298492658}
rws: {fileID: 7550337382994350724}
rwsTip: {fileID: 1464913868116621290}
loadBtn: {fileID: 7502760747128527674}
closeBtn: {fileID: 379354442}
originPos: {x: 0, y: 0}
url: http://111.229.30.246:10013/Handler/Taiqu.ashx?action=rws
--- !u!114 &1067605745
MonoBehaviour:
m_ObjectHideFlags: 0
@ -103384,6 +103377,20 @@ MonoBehaviour:
- {fileID: 1189450973}
buttomPanel: {fileID: 1935876357}
BirdEyeView: {fileID: 932668468}
--- !u!114 &1067605747
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1067605736}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbdc92a427f66b4ab0ae87c35cb0544, type: 3}
m_Name:
m_EditorClassIdentifier:
toolItems: []
toolItemContent: {fileID: 1021690653}
--- !u!1 &1072268438
GameObject:
m_ObjectHideFlags: 0
@ -201301,18 +201308,6 @@ RectTransform:
m_AnchoredPosition: {x: -416, y: -65}
m_SizeDelta: {x: 1059, y: 585}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7650852213641946357
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9029326305111261340}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 41a6ccb45404ead45a8ec03025263a84, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!222 &8409965097830473489
CanvasRenderer:
m_ObjectHideFlags: 0
@ -201332,7 +201327,6 @@ GameObject:
- component: {fileID: 6346542558084323096}
- component: {fileID: 6050573552887945181}
- component: {fileID: 1464913868116621290}
- component: {fileID: 7650852213641946357}
m_Layer: 5
m_Name: Text
m_TagString: Untagged

View File

@ -1,3 +1,4 @@
using AData;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@ -16,13 +17,21 @@ namespace Adam
{
public GameObject RWPanel;
public RectTransform rws;
public Text rwsTip;
public Button loadBtn;
public Button closeBtn;
public Vector2 originPos = new Vector2();
public string url = "http://111.229.30.246:10013/Handler/Taiqu.ashx?action=rws";
private async void Awake()
{
AssignmentDatas aData = await AsyncWebReq.Get<AssignmentDatas>(url);
rwsTip.text = aData.message;
}
private void Start()
{
originPos = rws.anchoredPosition;
loadBtn.onClick.AddListener(OnLoad);
closeBtn.onClick.AddListener(() => { SwitchPanel(false); });
SwitchPanel(false);
}
@ -43,6 +52,7 @@ namespace Adam
UIManager.Instance.exitBtn.gameObject.SetActive(true);
rws.anchoredPosition = Vector2.zero;
loadBtn.gameObject.SetActive(false);
closeBtn.gameObject.SetActive(true);
SwitchPanel(false);
SceneLoad.Instance.SceneChange("工具间场景");
}

View File

@ -21,6 +21,7 @@ public class ToolItem : MonoBehaviour
public Vector3 originPos = new Vector3();
public Vector3 originAngle = new Vector3();
public GameObject prefab;
public Attribute attribute = Attribute.defaultModel;
public void SetValue(string name, Transform modelTransform, Action selfCallback = null)
{
@ -36,6 +37,7 @@ public class ToolItem : MonoBehaviour
originPos = modelTransform.localPosition;
originAngle = modelTransform.localEulerAngles;
prefab = Resources.Load<GameObject>("New/Models/" + toolName);
attribute = prefab.GetComponent<ToolModelClick>().attribute;
}
public void SetState(bool isActive)
@ -44,13 +46,32 @@ public class ToolItem : MonoBehaviour
selfButton.interactable = !isActive;
}
/// <summary>
/// 判断自己是不是可以点击
/// </summary>
public void SwitchSelfIsClick()
{
closeButton.gameObject.SetActive(false);
if (attribute == Attribute.SafetyToolsAndInstruments)
{
selfButton.interactable = false;
}
else if (attribute == Attribute.ToolsAndInstruments)
{
selfButton.interactable = true;
}
else
{
}
}
public void OnSelfClick()
{
}
public Sprite ToSprite(Texture2D t)
private Sprite ToSprite(Texture2D t)
{
Sprite prite = Sprite.Create(t, new Rect(0, 0, t.width, t.height), new Vector2(0.5f, 0.5f));
return prite;

View File

@ -0,0 +1,55 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
//@create 20230914
//@company QianHuo
//
//@description:
//============================================================
namespace AData
{
public class AssignmentDatas
{
/// <summary>
///
/// </summary>
public string state;
/// <summary>
///
/// </summary>
public string message;
/// <summary>
///
/// </summary>
public string data;
}
//public class Data
//{
// /// <summary>
// ///
// /// </summary>
// public string id;
// /// <summary>
// ///
// /// </summary>
// public string content;
// /// <summary>
// ///
// /// </summary>
// public string r1;
// /// <summary>
// ///
// /// </summary>
// public string r2;
// /// <summary>
// ///
// /// </summary>
// public string r3;
//}
}

View File

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

View File

@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
@ -11,17 +12,18 @@ using UnityEngine;
//============================================================
namespace Data
{
[Serializable]
public class SceneData
{
public bool state;
public string message;
public Data data;
public bool state { get; private set; }
public string message { get; private set; }
public string data { get; private set; }
}
public class Data
{
public string Isguangfu;
public string jxfs;
public string zhbl;
}
//public class Data
//{
// public string Isguangfu;
// public string jxfs;
// public string zhbl;
//}
}

View File

@ -11,7 +11,7 @@ using UnityEngine;
//@description:
//============================================================
public static class Global
public class GlobalFlag
{
public SceneData sceneData;
}

View File

@ -17,11 +17,11 @@ namespace QianHuo
{
public Button goToSceneBtn;
public InputField userID;
public SceneData sceneData = new SceneData();
public string url = "http://111.229.30.246:10013/Handler/Taiqu.ashx?action=changjing&bianhao=";
// Use this for initialization
private void Start()
{
OnGo();
goToSceneBtn.onClick.AddListener(OnGo);
}
@ -29,6 +29,7 @@ namespace QianHuo
{
string _url = url + userID.text;
SceneData data = await AsyncWebReq.Get<SceneData>(_url);
}
}
}

View File

@ -12,10 +12,18 @@ using UnityEngine;
public class ToolModelManager : MonoBehaviour
{
public ToolItem[] toolItems;
public Transform toolItemContent;
// Use this for initialization
private void Start()
/// <summary>
/// 需要3D去调用
/// </summary>
public void SwitchAllToolItems()
{
toolItems = toolItemContent.GetComponentsInChildren<ToolItem>();
for (int i = 0; i < toolItems.Length; i++)
{
toolItems[i].SwitchSelfIsClick();
}
}
}

View File

@ -18,6 +18,7 @@ public class UIManager : MonoSingleton<UIManager>
public MobileTerminalController MobileTerminalController;
public AssignmentController assignmentController;
public BottomController bottomCotroller;
public ToolModelManager toolModelManager;
public Button exitBtn;
public Button backToToolBtn;
// Use this for initialization

View File

@ -2,7 +2,10 @@ fileFormatVersion: 2
guid: 483e16a8ce5cebd47a3a743327bb5993
ModelImporter:
serializedVersion: 21300
internalIDToNameTable: []
internalIDToNameTable:
- first:
74: 1827226128182048838
second: Take 001
externalObjects:
- first:
type: UnityEngine:Material

View File

@ -845,7 +845,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &214298342
GameObject:
@ -2605,7 +2605,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!114 &333646758
MonoBehaviour:
m_ObjectHideFlags: 0
@ -4517,7 +4517,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalPosition.x
@ -5221,7 +5221,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!65 &1265359517
BoxCollider:
m_ObjectHideFlags: 0
@ -5231,7 +5231,7 @@ BoxCollider:
m_GameObject: {fileID: 1265359516}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
@ -5293,12 +5293,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1265359516}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -5.8120117, y: -0.97698975, z: -0.49}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 1
m_Children: []
m_LocalPosition: {x: -6.138, y: -0.97698975, z: -0.49}
m_LocalScale: {x: 1.7114836, y: 0.882692, z: 1.3039875}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2059769794}
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1265359521
MonoBehaviour:
@ -5307,7 +5308,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1265359516}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67d4de287b46eb34e83a61e4f9115070, type: 3}
m_Name:
@ -5369,19 +5370,13 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1265359516}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 936e1a57cc0a2944a89d7b1617875726, type: 3}
m_Name:
m_EditorClassIdentifier:
"\u7269\u54C1\u540D\u79F0":
"\u7269\u54C1\u5206\u7C7B": 3
"\u7269\u54C1\u72B6\u6001": 2
"\u4EA4\u4E92\u5B8C\u6210": 0
inHandPos: {x: 0, y: 0, z: 0}
inHandRot: {x: 0, y: 0, z: 0}
game: {fileID: 333646762}
name:
name: Computer
--- !u!1001 &1266954248
PrefabInstance:
m_ObjectHideFlags: 0
@ -7474,23 +7469,35 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1265359520}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_RootOrder
value: 9
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalScale.x
value: 0.76687855
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalScale.y
value: 1.132898
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalScale.z
value: 0.58428836
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalPosition.x
value: -6.153
value: -0.008764247
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalPosition.y
value: -1.505
value: -0.5981817
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalPosition.z
value: -0.498
value: -0.006135018
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
propertyPath: m_LocalRotation.w
@ -7550,6 +7557,11 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
--- !u!4 &2059769794 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 483e16a8ce5cebd47a3a743327bb5993, type: 3}
m_PrefabInstance: {fileID: 2059769793}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2067175759
PrefabInstance:
m_ObjectHideFlags: 0
@ -8164,16 +8176,28 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5863485535301246023, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: newWindowAction
value: 0
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5863485535301246023, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: allowContextMenuOn
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5863485535498290377, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: m_Color.a
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5863485535498290377, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: m_Texture
value:
objectReference: {fileID: 0}
objectReference: {fileID: 2800000, guid: 30a28a853ae87d44bab2c4bdc861c40d, type: 3}
- target: {fileID: 5863485535498290381, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: m_Name
value: BrowserGUI
objectReference: {fileID: 0}
- target: {fileID: 5863485535498290381, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9d013d05025dab8428d976610feb0b7d, type: 3}
--- !u!114 &1374127874211543268 stripped

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using ZenFulcrum.EmbeddedBrowser;
public class newfollow : ToolBase
public class newfollow : MonoBehaviour
{
[SerializeField] testURL game;
[SerializeField] string name;
@ -34,8 +34,8 @@ public class newfollow : ToolBase
if (hit.transform.name.Equals(name))
{
Debug.Log(hit.transform.name);
game.init("baidu.com");
game.gameObject.SetActive(true);
game.init("https://blog.csdn.net/qq_42481369/article/details/114674590");
}
}

View File

@ -8,7 +8,7 @@ public class testURL : MonoBehaviour
[SerializeField] Browser browser;
public void init(string urls)
{
browser.Url = urls;
browser.gameObject.SetActive(true);
browser.Url = urls;
}
}

View File

@ -35,12 +35,12 @@
"source": "builtin",
"dependencies": {
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.rider": "3.0.16",
"com.unity.ide.rider": "3.0.15",
"com.unity.ide.vscode": "1.2.5",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.performance.profile-analyzer": "1.1.1",
"com.unity.test-framework": "1.1.31",
"com.unity.testtools.codecoverage": "1.2.2"
"com.unity.testtools.codecoverage": "1.0.1"
}
},
"com.unity.ide.rider": {
@ -92,7 +92,7 @@
"url": "https://packages.unity.cn"
},
"com.unity.services.core": {
"version": "1.6.0",
"version": "1.4.2",
"depth": 1,
"source": "registry",
"dependencies": {
@ -121,7 +121,7 @@
"url": "https://packages.unity.cn"
},
"com.unity.testtools.codecoverage": {
"version": "1.2.2",
"version": "1.0.1",
"depth": 1,
"source": "registry",
"dependencies": {