修改config表格T_Scheme数据结构,添加背包数据类,修改背包逻辑,添加脚本ToolRoomManager,修改工具选择脚本。
This commit is contained in:
parent
2633450d10
commit
1f57690529
Binary file not shown.
|
@ -60,11 +60,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &2468428323860960022
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -60,11 +60,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 1
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &2186571632370376101
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -60,11 +60,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 1
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &2906462593900441407
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -60,11 +60,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &2397141117729196589
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -143,11 +143,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &9159459832370388555
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -499,11 +499,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!65 &3014182739139812810
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -48,11 +48,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!65 &5298069477168308409
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -60,11 +60,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!114 &2357552334371453598
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -48,11 +48,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!65 &2292098275725943769
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -47,11 +47,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!65 &7642060814474931475
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -47,11 +47,12 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
toolId: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
itemInfo:
|
||||
toolId: 0
|
||||
triggerID: 0
|
||||
toolName:
|
||||
toolOrDeviceOrMaterial: 0
|
||||
_highlight: {fileID: 0}
|
||||
IsClick: 1
|
||||
--- !u!65 &2828524944087783442
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,4 +6,5 @@ public class TB_Scheme
|
|||
public string schemeName;
|
||||
public string deviceMap;
|
||||
public string schemeDes;
|
||||
public string ToolOrMaterilOrDevice;
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
public class TB_ToolAndMaterial
|
||||
{
|
||||
public int id;
|
||||
public int schemeId;
|
||||
public string objName;
|
||||
public int type;
|
||||
public string prefabName;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
/// <summary>
|
||||
/// 材料/工具/设备
|
||||
/// </summary>
|
||||
public class D_ToolAndMaterialData
|
||||
{
|
||||
public int id;
|
||||
public string objName;
|
||||
public int type;
|
||||
public string prefabName;
|
||||
public string iconSpriteName;
|
||||
}
|
|
@ -18,6 +18,8 @@ public class D_Scheme
|
|||
/// </summary>
|
||||
public string schemeName;
|
||||
|
||||
public string ToolOrMaterilOrDevice;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ToolAndMaterialData
|
||||
{
|
||||
public string objName;
|
||||
public int type;
|
||||
public uint count;
|
||||
}
|
|
@ -97,21 +97,21 @@ public enum E_ToolOrDeviceOrMaterials
|
|||
/// <summary>
|
||||
/// 空
|
||||
/// </summary>
|
||||
None = 0,
|
||||
None = -1,
|
||||
|
||||
/// <summary>
|
||||
/// 工具
|
||||
/// </summary>
|
||||
Tool,
|
||||
|
||||
/// <summary>
|
||||
/// 材质
|
||||
/// </summary>
|
||||
Materials,
|
||||
Tool = 0,
|
||||
/// <summary>
|
||||
/// 设备
|
||||
/// </summary>
|
||||
Device
|
||||
Device = 1,
|
||||
/// <summary>
|
||||
/// 材质
|
||||
/// </summary>
|
||||
Materials = 2
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -84,23 +84,38 @@ public class DataManager : BaseManager<DataManager>
|
|||
return allSchemeList;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 获取当前系统全部工器具和材料
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public List<TB_ToolAndMaterial> GetCurrentSystemToolAndMaterials()
|
||||
//{
|
||||
// var currentSystemToolAndMaterials = new List<TB_ToolAndMaterial>();
|
||||
// foreach (var item in toolAndMaterialDic.Values)
|
||||
// {
|
||||
// if (item.systemID == GameManager.ProcessMgr.id)
|
||||
// {
|
||||
// currentSystemToolAndMaterials.Add(item);
|
||||
// }
|
||||
// }
|
||||
/// <summary>
|
||||
/// 根据方案 ToolOrMaterilOrDevice 获取当前系统全部工器具和材料
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<D_ToolAndMaterialData> GetCurrentSystemToolAndMaterials(string tOrMOrD)
|
||||
{
|
||||
var currentSystemToolAndMaterials = new List<D_ToolAndMaterialData>();
|
||||
|
||||
string[] tmdTemp = tOrMOrD.Split(',');
|
||||
|
||||
for (int i = 0; i < tmdTemp.Length; i++)
|
||||
{
|
||||
int index = i;
|
||||
foreach (var item in toolAndMaterialDic.Values)
|
||||
{
|
||||
if (item.id == int.Parse(tmdTemp[index]))
|
||||
{
|
||||
D_ToolAndMaterialData d_ToolAndMaterialData = new D_ToolAndMaterialData();
|
||||
d_ToolAndMaterialData.id = item.id;
|
||||
d_ToolAndMaterialData.objName = item.objName;
|
||||
d_ToolAndMaterialData.type = item.type;
|
||||
d_ToolAndMaterialData.prefabName = item.prefabName;
|
||||
d_ToolAndMaterialData.iconSpriteName = item.iconSpriteName;
|
||||
currentSystemToolAndMaterials.Add(d_ToolAndMaterialData);
|
||||
}
|
||||
}
|
||||
}
|
||||
return currentSystemToolAndMaterials;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// return currentSystemToolAndMaterials;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取D_Scheme
|
||||
|
@ -115,6 +130,7 @@ public class DataManager : BaseManager<DataManager>
|
|||
{
|
||||
d_Scheme.id = schemeDic[id].id;
|
||||
d_Scheme.schemeName = schemeDic[id].schemeName;
|
||||
d_Scheme.ToolOrMaterilOrDevice = schemeDic[id].ToolOrMaterilOrDevice;
|
||||
}
|
||||
d_Scheme.processes = GetD_Processes(d_Scheme.id);
|
||||
return d_Scheme;
|
||||
|
@ -208,7 +224,7 @@ public class DataManager : BaseManager<DataManager>
|
|||
}
|
||||
|
||||
|
||||
public List<int> GetSubProcessStepIDByToolID(int toolID)
|
||||
public List<int> GetSubProcessStepIDByTriggerID(int triggerID)
|
||||
{
|
||||
List<TB_SubProcessStep> tb_subProcesssSteps = new List<TB_SubProcessStep>();
|
||||
List<int> stepIDsTemp = new List<int>();
|
||||
|
@ -226,7 +242,7 @@ public class DataManager : BaseManager<DataManager>
|
|||
string[] subProcessStepToolID = item.triggerID.Split(',');
|
||||
for (int i = 0; i < subProcessStepToolID.Length; i++)
|
||||
{
|
||||
if (int.Parse(subProcessStepToolID[i]) == toolID)
|
||||
if (int.Parse(subProcessStepToolID[i]) == triggerID)
|
||||
stepIDsTemp.Add(item.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// </summary>
|
||||
public D_Scheme d_Scheme;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///当前方案ID
|
||||
/// </summary>
|
||||
|
@ -76,7 +77,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||
d_Scheme = DataManager.Instance.GetSchemeData(id);
|
||||
ReportManager.Instance.creport = DataManager.Instance.GetSchemeReport(id);
|
||||
|
||||
GameManager.ToolAndmaterialMgr.Init(d_Scheme.ToolOrMaterilOrDevice);
|
||||
d_Scheme.Init();
|
||||
Debug.Log("流程初始化完成");
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class RunModelMgr : BaseManager<RunModelMgr>
|
|||
/// <summary>
|
||||
/// 设备/方案id
|
||||
/// </summary>
|
||||
public int deviceId;
|
||||
public int schemeID;
|
||||
|
||||
|
||||
public E_ModeType ModeType
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TooRoomlMannger : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: efa839f070de80947a96cae9774ce7e9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -9,40 +9,25 @@ public class ToolAndmaterialMgr : BaseManager<ToolAndmaterialMgr>
|
|||
{
|
||||
//该系统所需要使用的全部工器具和材料
|
||||
|
||||
public List<TB_ToolAndMaterial> toolAndMaterialList;
|
||||
public List<D_ToolAndMaterialData> toolAndMaterialList = new List<D_ToolAndMaterialData>();
|
||||
|
||||
private ToolAndmaterialMgr()
|
||||
{
|
||||
}
|
||||
|
||||
//public void Init()
|
||||
//{
|
||||
// toolAndMaterialList = GameManager.DataMgr.GetCurrentSystemToolAndMaterials();
|
||||
//}
|
||||
|
||||
public string GetIconSpriteName(string objName)
|
||||
public void Init(string toolOrMaterilOrDevice)
|
||||
{
|
||||
var tempObj= toolAndMaterialList.Find(o => o.objName == objName);
|
||||
if (tempObj!=null)
|
||||
{
|
||||
return tempObj.iconSpriteName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
toolAndMaterialList = GameManager.DataMgr.GetCurrentSystemToolAndMaterials(toolOrMaterilOrDevice);
|
||||
}
|
||||
|
||||
public int GetObjType(string objName)
|
||||
|
||||
public D_ToolAndMaterialData GetToolOrMaterialOrDeviceInfoByObjName(string objName)
|
||||
{
|
||||
var tempObj= toolAndMaterialList.Find(o => o.objName == objName);
|
||||
if (tempObj!=null)
|
||||
for (int i = 0; i < toolAndMaterialList.Count; i++)
|
||||
{
|
||||
return tempObj.type;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
if (toolAndMaterialList[i].objName == objName)
|
||||
return toolAndMaterialList[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@ public class Device_Mobile : MonoBehaviour
|
|||
public int downIndex = 0;
|
||||
public int triggerID = 5005;
|
||||
private HighlightEffect _highlight;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_highlight = GetComponent<HighlightEffect>();
|
||||
|
|
|
@ -14,10 +14,7 @@ public class ItemInfo
|
|||
public int toolId;
|
||||
public int triggerID;
|
||||
public string toolName;
|
||||
|
||||
public E_ToolOrDeviceOrMaterials toolOrDeviceOrMaterial;
|
||||
|
||||
// 你可以在这里添加更多的属性和方法
|
||||
}
|
||||
/// <summary>
|
||||
/// 工具或者材料基类,此脚本必须挂在工具或者材料上
|
||||
|
@ -25,64 +22,37 @@ public class ItemInfo
|
|||
public abstract class BaseToolOrDevice : MonoBehaviour
|
||||
{
|
||||
public ItemInfo itemInfo;
|
||||
[HideInInspector]
|
||||
public HighlightEffect _highlight;
|
||||
public bool IsClick = true;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_highlight = GetComponent<HighlightEffect>();
|
||||
GetInfo();
|
||||
}
|
||||
|
||||
|
||||
[ContextMenu("GetInfo")]
|
||||
public void GetInfo(string itemName)
|
||||
|
||||
public void GetInfo()
|
||||
{
|
||||
|
||||
D_ToolAndMaterialData dTMD = GameManager.ToolAndmaterialMgr.GetToolOrMaterialOrDeviceInfoByObjName(gameObject.name);
|
||||
if (dTMD != null)
|
||||
{
|
||||
itemInfo.toolId = dTMD.id;
|
||||
itemInfo.triggerID = dTMD.id;
|
||||
itemInfo.toolOrDeviceOrMaterial = (E_ToolOrDeviceOrMaterials)dTMD.type;
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
//public void GetInfo(string itemName)
|
||||
//{
|
||||
// if (itemDatabase.ContainsKey(itemName))
|
||||
// {
|
||||
// ItemInfo info = itemDatabase[itemName];
|
||||
// OnItemInfoReceived?.Invoke(info);
|
||||
// }
|
||||
//}
|
||||
|
||||
//public void GetInfo(GameObject Item,string ItemName,E_ToolOrDeviceOrMaterials E_Item)
|
||||
//{
|
||||
|
||||
// Item.SetActive(false);
|
||||
// if (itemDatabase.ContainsKey(ItemName))
|
||||
// {
|
||||
// // 获取物品信息
|
||||
// ItemInfo info = itemDatabase[ItemName];
|
||||
// // TODO: 后续处理,例如更新UI或执行其他逻辑
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogWarning($"物品 '{ItemName}' 不存在于数据库中");
|
||||
// }
|
||||
// switch (E_Item)
|
||||
// {
|
||||
// case E_ToolOrDeviceOrMaterials.Tool:
|
||||
|
||||
// break;
|
||||
// case E_ToolOrDeviceOrMaterials.Materials:
|
||||
|
||||
// break;
|
||||
// }
|
||||
// //TODO:后续 根据英文名称去获取ID 中文名 和其它
|
||||
//}
|
||||
|
||||
private void OnMouseEnter()
|
||||
{
|
||||
if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom) return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnEnter();
|
||||
UIManager.Instance.ShowPanel<ItemTips>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init(gameObject.name);
|
||||
}); //提示面板
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
|
@ -90,16 +60,13 @@ public abstract class BaseToolOrDevice : MonoBehaviour
|
|||
if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom) return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnDown();
|
||||
//gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnMouseExit()
|
||||
{
|
||||
UIManager.Instance.HidePanel<ItemTips>();//提示面板
|
||||
//TODO: 这里写提示关闭的代码
|
||||
if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom) return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnExit();
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,28 +7,32 @@ public class Tool_SelectComponent : BaseToolOrDevice
|
|||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
GameManager.UIMgr.ShowPanel<ItemTips>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init(gameObject.name);
|
||||
});
|
||||
///高亮
|
||||
_highlight.highlighted = true;
|
||||
}
|
||||
public override void OnDown()
|
||||
{
|
||||
base.OnDown();
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.ToolRoom)//털뙤끝쒼
|
||||
////렴흙교관
|
||||
//묏야츰냔뵨묏야렴흙묏야움
|
||||
|
||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(itemInfo.triggerID, true) == 0)
|
||||
{
|
||||
////렴흙교관
|
||||
if (IsClick)
|
||||
{
|
||||
//묏야츰냔뵨묏야렴흙묏야움
|
||||
GameManager.PacksackBagMgr.AddOneToolOrMater(itemInfo);
|
||||
this.gameObject.SetActive(false);
|
||||
}
|
||||
GameManager.PacksackBagMgr.AddOneToolOrMater(itemInfo);
|
||||
gameObject.SetActive(false);
|
||||
GameManager.UIMgr.HidePanel<ItemTips>();//瓊刻충겼
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
///关闭高亮
|
||||
_highlight.highlighted = false;
|
||||
base.OnExit();
|
||||
_highlight.highlighted = false;
|
||||
GameManager.UIMgr.HidePanel<ItemTips>();//瓊刻충겼
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class UI_MenuBar : BasePanel
|
|||
private Coroutine coroutine;
|
||||
public void Init()
|
||||
{
|
||||
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||
//coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||
//MenuBarIamge = GetControl<Image>("MenuBar");
|
||||
closeDefaultBtn = GetControl<Button>("CloseDefaultBtn");
|
||||
toolRoomBtn = GetControl<Button>("ToolRoomBtn");
|
||||
|
@ -64,6 +64,7 @@ public class UI_MenuBar : BasePanel
|
|||
public void CheckBtnBySceneName(E_SceneType type)
|
||||
{
|
||||
Debug.Log(type.ToString());
|
||||
GetControl<Image>("MenuBar").transform.DOLocalMoveX(1070, 0.5f);
|
||||
toolRoomBtn.gameObject.SetActive(type != E_SceneType.ToolRoom);
|
||||
siteBtn.gameObject.SetActive(type == E_SceneType.ToolRoom);
|
||||
workOrderBtn.gameObject.SetActive(type == E_SceneType.Office || type == E_SceneType.Site);
|
||||
|
@ -112,11 +113,12 @@ public class UI_MenuBar : BasePanel
|
|||
GameManager.ScenesMgr.LoadSceneAsyn("04_ToolMaterialScene", () =>
|
||||
{
|
||||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.9f);
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, GameManager.RunModelMgr.SceneType);
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "SiteBtn":
|
||||
SceneManager.LoadScene("");
|
||||
|
||||
break;
|
||||
case "WorkOrderBtn":
|
||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(workOrderID, false) == 0)
|
||||
|
@ -139,6 +141,12 @@ public class UI_MenuBar : BasePanel
|
|||
});
|
||||
}
|
||||
break;
|
||||
case "ToolKitBtn":
|
||||
GameManager.UIMgr.ShowPanel<UI_ToolAndMaterialPanel>(E_UI_Layer.Mid, (p) =>
|
||||
{
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -71,8 +71,8 @@ public class UI_SelectDevicePanel : BasePanel
|
|||
});
|
||||
deviceBtnAComponent.onClick.AddListener(() =>
|
||||
{
|
||||
GameManager.RunModelMgr.deviceId = int.Parse(deviceBtnAComponent.name);
|
||||
GameManager.ProcessMgr.Init(GameManager.RunModelMgr.deviceId, E_ModeType.Study);
|
||||
GameManager.RunModelMgr.schemeID = int.Parse(deviceBtnAComponent.name);
|
||||
GameManager.ProcessMgr.Init(GameManager.RunModelMgr.schemeID, E_ModeType.Study);
|
||||
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
|
||||
|
|
|
@ -6,6 +6,7 @@ public class UI_ToolAndMaterialPanel : BasePanel
|
|||
{
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue