Merge branch 'LouDi_Quan' of http://git.dragonwxl.cn:8080/loudizhiye/virtualframework into LouDi_Quan
This commit is contained in:
commit
2a91caa79f
@ -16,7 +16,7 @@ Material:
|
|||||||
m_LightmapFlags: 4
|
m_LightmapFlags: 4
|
||||||
m_EnableInstancingVariants: 0
|
m_EnableInstancingVariants: 0
|
||||||
m_DoubleSidedGI: 0
|
m_DoubleSidedGI: 0
|
||||||
m_CustomRenderQueue: -1
|
m_CustomRenderQueue: 2000
|
||||||
stringTagMap:
|
stringTagMap:
|
||||||
RenderType: Opaque
|
RenderType: Opaque
|
||||||
disabledShaderPasses: []
|
disabledShaderPasses: []
|
||||||
|
|||||||
@ -66,7 +66,7 @@ ModelImporter:
|
|||||||
maskType: 3
|
maskType: 3
|
||||||
maskSource: {instanceID: 0}
|
maskSource: {instanceID: 0}
|
||||||
additiveReferencePoseFrame: 0
|
additiveReferencePoseFrame: 0
|
||||||
isReadable: 1
|
isReadable: 0
|
||||||
meshes:
|
meshes:
|
||||||
lODScreenPercentages: []
|
lODScreenPercentages: []
|
||||||
globalScale: 1
|
globalScale: 1
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -231,6 +231,11 @@ public class ActionHelper
|
|||||||
var dictAction = (XMLTool.DictionaryAction)act;
|
var dictAction = (XMLTool.DictionaryAction)act;
|
||||||
return TimeLineAction.Allocate(act.Value, dictAction.args);
|
return TimeLineAction.Allocate(act.Value, dictAction.args);
|
||||||
}
|
}
|
||||||
|
case "Mat":
|
||||||
|
{
|
||||||
|
var dictAction = (XMLTool.DictionaryAction)act;
|
||||||
|
return MatAction.Allocate(dictAction.args);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
Debug.LogError($"没有找到此Action的类型{act.Type}");
|
Debug.LogError($"没有找到此Action的类型{act.Type}");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -24,6 +24,7 @@ namespace QFramework
|
|||||||
Color color = Color.green;
|
Color color = Color.green;
|
||||||
bool isHigh = true;
|
bool isHigh = true;
|
||||||
string deviceName = string.Empty;
|
string deviceName = string.Empty;
|
||||||
|
string isIndependent;
|
||||||
public static HighLightAction Allocate(string path, Dictionary<string, string> datas, System.Action OnFinished = null)
|
public static HighLightAction Allocate(string path, Dictionary<string, string> datas, System.Action OnFinished = null)
|
||||||
{
|
{
|
||||||
var retNode = mPool.Allocate();
|
var retNode = mPool.Allocate();
|
||||||
@ -43,6 +44,7 @@ namespace QFramework
|
|||||||
bool.TryParse(datas["isHigh"], out retNode.isHigh);
|
bool.TryParse(datas["isHigh"], out retNode.isHigh);
|
||||||
}
|
}
|
||||||
retNode.deviceName = datas.ContainsKey("deviceName") ? datas["deviceName"] : string.Empty;
|
retNode.deviceName = datas.ContainsKey("deviceName") ? datas["deviceName"] : string.Empty;
|
||||||
|
retNode.isIndependent = datas.ContainsKey("isIndependent") ? datas["isIndependent"] : string.Empty;
|
||||||
retNode.OnFinished = OnFinished;
|
retNode.OnFinished = OnFinished;
|
||||||
return retNode;
|
return retNode;
|
||||||
}
|
}
|
||||||
@ -70,6 +72,18 @@ namespace QFramework
|
|||||||
var effect = obj.GetOrAddComponent<HighlightEffect>();
|
var effect = obj.GetOrAddComponent<HighlightEffect>();
|
||||||
effect.outlineColor = color;
|
effect.outlineColor = color;
|
||||||
effect.highlighted = true;
|
effect.highlighted = true;
|
||||||
|
if (string.IsNullOrEmpty(isIndependent) == false)
|
||||||
|
{
|
||||||
|
switch (isIndependent)
|
||||||
|
{
|
||||||
|
case "true":
|
||||||
|
effect.outlineIndependent = true;
|
||||||
|
break;
|
||||||
|
case "false":
|
||||||
|
effect.outlineIndependent = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -78,8 +92,8 @@ namespace QFramework
|
|||||||
{
|
{
|
||||||
effect.highlighted = false;
|
effect.highlighted = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
93
Assets/Scripts/Actions/MatAction.cs
Normal file
93
Assets/Scripts/Actions/MatAction.cs
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace QFramework
|
||||||
|
{
|
||||||
|
internal class MatAction : IAction
|
||||||
|
{
|
||||||
|
|
||||||
|
public System.Action OnFinished { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
private MatAction()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private static readonly SimpleObjectPool<MatAction> mPool =
|
||||||
|
new SimpleObjectPool<MatAction>(() => new MatAction(), null, 10);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
string value;
|
||||||
|
string deviceName;
|
||||||
|
string matName;
|
||||||
|
string index;
|
||||||
|
public static MatAction Allocate(Dictionary<string, string> datas, System.Action OnFinished = null)
|
||||||
|
{
|
||||||
|
var retNode = mPool.Allocate();
|
||||||
|
retNode.ActionID = ActionKit.ID_GENERATOR++;
|
||||||
|
retNode.Deinited = false;
|
||||||
|
retNode.Reset();
|
||||||
|
retNode.value = datas.ContainsKey("value") ? datas["value"] : "";
|
||||||
|
retNode.deviceName = datas.ContainsKey("deviceName") ? datas["deviceName"] : "";
|
||||||
|
retNode.matName = datas.ContainsKey("matName") ? datas["matName"] : "";
|
||||||
|
retNode.index = datas.ContainsKey("index") ? datas["index"] : "0";
|
||||||
|
retNode.OnFinished = OnFinished;
|
||||||
|
return retNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ulong ActionID { get; set; }
|
||||||
|
public ActionStatus Status { get; set; }
|
||||||
|
|
||||||
|
public void OnStart()
|
||||||
|
{
|
||||||
|
GameObject obj;
|
||||||
|
if (string.IsNullOrEmpty(deviceName))
|
||||||
|
{
|
||||||
|
obj = Utility.FindObj(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
obj = DeviceController.Instance.GetDeviceObj(deviceName);
|
||||||
|
}
|
||||||
|
var mesh = obj.GetComponent<Renderer>();
|
||||||
|
int matIndex = 0;
|
||||||
|
int.TryParse(index, out matIndex);
|
||||||
|
mesh.materials[matIndex] = Resources.Load<Material>("Mat/" + matName);
|
||||||
|
this.Finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnExecute(float dt)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnFinish()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
Status = ActionStatus.NotStart;
|
||||||
|
Paused = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Paused { get; set; }
|
||||||
|
|
||||||
|
public void Deinit()
|
||||||
|
{
|
||||||
|
if (!Deinited)
|
||||||
|
{
|
||||||
|
OnFinished = null;
|
||||||
|
Deinited = true;
|
||||||
|
mPool.Recycle(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Deinited { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
11
Assets/Scripts/Actions/MatAction.cs.meta
Normal file
11
Assets/Scripts/Actions/MatAction.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 05ceca20dad98ea4092091f19ff388a3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -772,7 +772,14 @@ namespace XMLTool
|
|||||||
act.args.Add("deviceName", deviceName.Value);
|
act.args.Add("deviceName", deviceName.Value);
|
||||||
}
|
}
|
||||||
newAction = act;
|
newAction = act;
|
||||||
|
XAttribute isIndependent = action.Attribute("isIndependent");
|
||||||
|
if (isIndependent != null)
|
||||||
|
{
|
||||||
|
act.args.Add("isIndependent", isIndependent.Value);
|
||||||
|
}
|
||||||
|
newAction = act;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "LoadRes":
|
case "LoadRes":
|
||||||
{
|
{
|
||||||
@ -1087,6 +1094,32 @@ namespace XMLTool
|
|||||||
newAction = act;
|
newAction = act;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "Mat":
|
||||||
|
{
|
||||||
|
var act = new DictionaryAction();
|
||||||
|
XAttribute value = action.Attribute("value");
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
act.args.Add("value", value.Value);
|
||||||
|
}
|
||||||
|
XAttribute deviceName = action.Attribute("deviceName");
|
||||||
|
if (deviceName != null)
|
||||||
|
{
|
||||||
|
act.args.Add("deviceName", deviceName.Value);
|
||||||
|
}
|
||||||
|
XAttribute matName = action.Attribute("matName");
|
||||||
|
if (matName != null)
|
||||||
|
{
|
||||||
|
act.args.Add("matName", matName.Value);
|
||||||
|
}
|
||||||
|
XAttribute index = action.Attribute("index");
|
||||||
|
if (index != null)
|
||||||
|
{
|
||||||
|
act.args.Add("index", index.Value);
|
||||||
|
}
|
||||||
|
newAction = act;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
newAction = new Action();
|
newAction = new Action();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<Type>Exam</Type>
|
<Type>Exam</Type>
|
||||||
<Name>犬小肠部分切除吻合术虚拟仿真实训</Name>
|
<Name>犬小肠部分切除吻合术虚拟仿真实训</Name>
|
||||||
<Descript>
|
<Descript>
|
||||||
该软件是以犬为对象,针对小肠切除术和吻合术的专业实训。是以典型的工作任务为驱动,以工作流程为主线所进行的内容设计。包含术前准备和手术过程两个主要操作环节。其中术前准备中囊括了器械、药品、耗材、手术人员、手术动物等的准备内容。手术过程则包含了术部开刀、去除病变小肠、肠端吻合、缝合切口以及术后处理的详细过程。旨在让学生通过实训内容,了解犬小肠切除与吻合的专业知识,掌握工作流程及操作要点。
|
该软件是以犬为对象,针对小肠切除术和吻合术的专业实训。是以典型的工作任务为驱动,以工作流程为主线所进行的内容设计。包含术前准备和手术过程两个主要操作环节。其中术前准备中囊括了器械、药品、耗材、手术人员、手术动物等的准备内容。手术过程则包含了术部开刀、去除病变小肠、肠端吻合、缝合切口以及术后处理的详细过程。旨在让学生通过实训内容,了解犬小肠切除与吻合的专业知识,掌握工作流程及操作要点。
|
||||||
</Descript>
|
</Descript>
|
||||||
<Device>
|
<Device>
|
||||||
<Name>骨刀</Name>
|
<Name>骨刀</Name>
|
||||||
@ -617,7 +617,7 @@
|
|||||||
</Device>
|
</Device>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Score>
|
<Score>
|
||||||
<Item step="术前准备" name="器械准备" sum="7" bind=""/>
|
<Item step="术前准备" name="器械准备" sum="7" bind=""/>
|
||||||
@ -641,7 +641,7 @@
|
|||||||
<State name="初始状态">
|
<State name="初始状态">
|
||||||
<Enter>
|
<Enter>
|
||||||
<Action type="Parallel">
|
<Action type="Parallel">
|
||||||
|
|
||||||
<Action type="Show" value="Environment/SM_QvanChangJing/jingwu/SM_YiLiaoQuan/sweep4" isShow="false"></Action>
|
<Action type="Show" value="Environment/SM_QvanChangJing/jingwu/SM_YiLiaoQuan/sweep4" isShow="false"></Action>
|
||||||
<Action type="Show" value="Environment/SM_QvanChangJing/chuangbu/polySurface177" isShow="false"></Action>
|
<Action type="Show" value="Environment/SM_QvanChangJing/chuangbu/polySurface177" isShow="false"></Action>
|
||||||
<!--隐藏初始道具-->
|
<!--隐藏初始道具-->
|
||||||
@ -1066,8 +1066,8 @@
|
|||||||
<Action type="Show" value="Models/ZhuDao_chaunyifu/nan_shoushufu.001" isShow="true"></Action>
|
<Action type="Show" value="Models/ZhuDao_chaunyifu/nan_shoushufu.001" isShow="true"></Action>
|
||||||
</Action>
|
</Action>
|
||||||
</Action>
|
</Action>
|
||||||
|
|
||||||
|
|
||||||
<Action type="Rotate" value="Models/zhushou" to="0,270,0" time="0"></Action>
|
<Action type="Rotate" value="Models/zhushou" to="0,270,0" time="0"></Action>
|
||||||
<Action type="Show" value="Models/zhushou/zhijin" isShow="false"></Action>
|
<Action type="Show" value="Models/zhushou/zhijin" isShow="false"></Action>
|
||||||
<Action type="Show" value="Models/zhushou" isShow="true"></Action>
|
<Action type="Show" value="Models/zhushou" isShow="true"></Action>
|
||||||
@ -1089,7 +1089,7 @@
|
|||||||
<Action type="Move" value="Models/ZhuDao_chaunyifu" to="-4.219,0,-3.307" time="0"></Action>
|
<Action type="Move" value="Models/ZhuDao_chaunyifu" to="-4.219,0,-3.307" time="0"></Action>
|
||||||
<Action type="Rotate" value="Models/ZhuDao_chaunyifu" to="0,90,0" time="0"></Action>
|
<Action type="Rotate" value="Models/ZhuDao_chaunyifu" to="0,90,0" time="0"></Action>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Action type="Point3DQuestion">
|
<Action type="Point3DQuestion">
|
||||||
<Data name="12-1" position="-3.728,0.8997,-3.264" rotate="90,0,0" scale="0.1,0.1,0.1" rotateSpeed="180" clickEvent="1"></Data>
|
<Data name="12-1" position="-3.728,0.8997,-3.264" rotate="90,0,0" scale="0.1,0.1,0.1" rotateSpeed="180" clickEvent="1"></Data>
|
||||||
@ -1457,11 +1457,19 @@
|
|||||||
<Action type="Show" value="Models/zhudao" isShow="true"></Action>
|
<Action type="Show" value="Models/zhudao" isShow="true"></Action>
|
||||||
<Action type="Show" value="Models/chuangjin" isShow="true"></Action>
|
<Action type="Show" value="Models/chuangjin" isShow="true"></Action>
|
||||||
<Action type="Show" value="Models/jianjian" isShow="true"></Action>
|
<Action type="Show" value="Models/jianjian" isShow="true"></Action>
|
||||||
|
|
||||||
|
|
||||||
<Action type="Parallel">
|
<Action type="Parallel">
|
||||||
<Action type="Anim" value="Models/jianjian" animName="46jianjian" ></Action>
|
<Action type="Anim" value="Models/jianjian" animName="46jianjian" ></Action>
|
||||||
<Action type="Anim" value="Models/zhudao" animName="46zhudao"></Action>
|
<Action type="Anim" value="Models/zhudao" animName="46zhudao"></Action>
|
||||||
<Action type="Anim" value="Models/chuangjin" animName="46chuangjin"></Action>
|
<Action type="Anim" value="Models/chuangjin" animName="46chuangjin"></Action>
|
||||||
<Action type="Anim" value="Models/zhushou" animName="46zhushou"></Action>
|
<Action type="Anim" value="Models/zhushou" animName="46zhushou"></Action>
|
||||||
|
<Action type="Sequence">
|
||||||
|
<Action type="Show" value="Models/chuangjin1" isShow="true"></Action>
|
||||||
|
<Action type="Anim" value="Models/chuangjin1" animName="46chuangjin" frame="1"></Action>
|
||||||
|
<Action type="Delay" value="3"></Action>
|
||||||
|
<Action type="Show" value="Models/chuangjin1" isShow="false"></Action>
|
||||||
|
</Action>
|
||||||
</Action>
|
</Action>
|
||||||
|
|
||||||
|
|
||||||
@ -1471,15 +1479,15 @@
|
|||||||
<Action type="Collider" deviceName="手术创巾" colliderType="Active" args="false"></Action>
|
<Action type="Collider" deviceName="手术创巾" colliderType="Active" args="false"></Action>
|
||||||
|
|
||||||
<Action type="Show" value="Models/chuangjin" isShow="false"></Action>
|
<Action type="Show" value="Models/chuangjin" isShow="false"></Action>
|
||||||
|
|
||||||
<Action type="Delay" value="1"></Action>
|
<Action type="Delay" value="1"></Action>
|
||||||
<Action type="Show" value="Models/chuangjinqian" isShow="true"></Action>
|
<Action type="Show" value="Models/chuangjinqian" isShow="true"></Action>
|
||||||
<Action type="Delay" value="0.2"></Action>
|
<Action type="Delay" value="0.2"></Action>
|
||||||
<Action type="HighLight" value="Models/chuangjinqian" isHigh="true" color="0,255,0,255"></Action>
|
<Action type="HighLight" value="Models/chuangjinqian" isHigh="true" color="0,255,0,255" isIndependent="true"></Action>
|
||||||
<Action type="Delay" value="0.2"></Action>
|
<Action type="Delay" value="0.2"></Action>
|
||||||
<Action type="HighLight" value="Models/chuangjinqian" isHigh="false" color="0,255,0,255"></Action>
|
<Action type="HighLight" value="Models/chuangjinqian" isHigh="false" color="0,255,0,255"></Action>
|
||||||
<Action type="Delay" value="0.2"></Action>
|
<Action type="Delay" value="0.2"></Action>
|
||||||
<Action type="HighLight" value="Models/chuangjinqian" isHigh="true" color="0,255,0,255"></Action>
|
<Action type="HighLight" value="Models/chuangjinqian" isHigh="true" color="0,255,0,255" isIndependent="true"></Action>
|
||||||
<Action type="Delay" value="0.2"></Action>
|
<Action type="Delay" value="0.2"></Action>
|
||||||
<Action type="HighLight" value="Models/chuangjinqian" isHigh="false" color="0,255,0,255"></Action>
|
<Action type="HighLight" value="Models/chuangjinqian" isHigh="false" color="0,255,0,255"></Action>
|
||||||
<Action type="Delay" value="0.2"></Action>
|
<Action type="Delay" value="0.2"></Action>
|
||||||
@ -1703,7 +1711,7 @@
|
|||||||
|
|
||||||
<Action type="Show" value="Models/dunjian" isShow="false"></Action>
|
<Action type="Show" value="Models/dunjian" isShow="false"></Action>
|
||||||
<Action type="Anim" value="Models/zhudao" animName="zhudaoNormal" ></Action>
|
<Action type="Anim" value="Models/zhudao" animName="zhudaoNormal" ></Action>
|
||||||
<Action type="Anim" value="Models/zhushou" animName="zhushouNormal" ></Action>
|
<Action type="Anim" value="Models/zhushou" animName="zhushouNormal" ></Action>
|
||||||
<Action type="NextOperation"></Action>
|
<Action type="NextOperation"></Action>
|
||||||
</Action>
|
</Action>
|
||||||
</Start>
|
</Start>
|
||||||
@ -2551,7 +2559,7 @@
|
|||||||
<Condition type="StrEvent" value="答题完成"></Condition>
|
<Condition type="StrEvent" value="答题完成"></Condition>
|
||||||
<Action type="TimeLine" value="Models/CZ_FengXian_Timeline" isShow="true" frame="640" endFrame="713"></Action>
|
<Action type="TimeLine" value="Models/CZ_FengXian_Timeline" isShow="true" frame="640" endFrame="713"></Action>
|
||||||
|
|
||||||
|
|
||||||
<Action type="Show" value="Models/CZ_FengXian_Timeline/ChiZhenQian" isShow="false"></Action>
|
<Action type="Show" value="Models/CZ_FengXian_Timeline/ChiZhenQian" isShow="false"></Action>
|
||||||
<Action type="Show" value="Models/CZ_FengXian_Timeline/JueSe" isShow="false"></Action>
|
<Action type="Show" value="Models/CZ_FengXian_Timeline/JueSe" isShow="false"></Action>
|
||||||
<Action type="Show" value="Models/zhudao" isShow="true"></Action>
|
<Action type="Show" value="Models/zhudao" isShow="true"></Action>
|
||||||
|
|||||||
@ -86,8 +86,8 @@
|
|||||||
如果deviceName存在 则不用isDevice
|
如果deviceName存在 则不用isDevice
|
||||||
-->
|
-->
|
||||||
<Action type="Show" value="SM_QvanChangJing/sence/pPlane1" deviceName="设备名字" isShow="false" isDevice="false"></Action>
|
<Action type="Show" value="SM_QvanChangJing/sence/pPlane1" deviceName="设备名字" isShow="false" isDevice="false"></Action>
|
||||||
<!--设置物体高亮 deviceName可以用于设备名字 value是物体路径 color是rgba isHigh设置是否显示高亮-->
|
<!--设置物体高亮 deviceName可以用于设备名字 value是物体路径 color是rgba isHigh设置是否显示高亮 isIndependent为true 可以避免模型高亮被遮挡-->
|
||||||
<Action type="HighLight" deviceName="设备名字" value="路径" isHigh="true" color="0,255,0,255"></Action>
|
<Action type="HighLight" deviceName="设备名字" value="路径" isHigh="true" color="0,255,0,255" isIndependent="true"></Action>
|
||||||
<!--延迟 value是秒-->
|
<!--延迟 value是秒-->
|
||||||
<Action type="Delay" value="2"></Action>
|
<Action type="Delay" value="2"></Action>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user