根据反馈 把镜头切换改为不强制
This commit is contained in:
parent
c25830a670
commit
8caed72886
@ -529,7 +529,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3}
|
m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_AllowSwitchOff: 0
|
m_AllowSwitchOff: 1
|
||||||
--- !u!1 &5353223196711954198
|
--- !u!1 &5353223196711954198
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -64,7 +64,15 @@ namespace QFramework
|
|||||||
data.normalRot = Utility.GetVector3FromStrArray(datas["normalRot"]);
|
data.normalRot = Utility.GetVector3FromStrArray(datas["normalRot"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (datas.ContainsKey("isNear") == false)
|
||||||
|
{
|
||||||
|
data.NotRun = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.NotRun = false;
|
||||||
bool.TryParse(datas["isNear"], out data.isNear);
|
bool.TryParse(datas["isNear"], out data.isNear);
|
||||||
|
}
|
||||||
float.TryParse(datas["nearTime"], out data.nearTime);
|
float.TryParse(datas["nearTime"], out data.nearTime);
|
||||||
float.TryParse(datas["normalTime"], out data.normalTime);
|
float.TryParse(datas["normalTime"], out data.normalTime);
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ namespace QFramework.Example
|
|||||||
public float nearTime;
|
public float nearTime;
|
||||||
public float normalTime;
|
public float normalTime;
|
||||||
public bool isNear;
|
public bool isNear;
|
||||||
|
public bool NotRun;
|
||||||
|
|
||||||
}
|
}
|
||||||
public partial class UICameraSwitch : UIPanel
|
public partial class UICameraSwitch : UIPanel
|
||||||
@ -59,29 +60,32 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
||||||
|
|
||||||
|
if (mData.NotRun==false)
|
||||||
|
{
|
||||||
|
if (mData.isNear)
|
||||||
|
{
|
||||||
|
if (Near.isOn == false)
|
||||||
|
{
|
||||||
|
Near.isOn = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetNear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Far.isOn == false)
|
||||||
|
{
|
||||||
|
Far.isOn = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetNormal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//if (mData.isNear)
|
|
||||||
//{
|
|
||||||
// if (Near.isOn == false)
|
|
||||||
// {
|
|
||||||
// Near.isOn = true;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// SetNear();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// if (Far.isOn == false)
|
|
||||||
// {
|
|
||||||
// Far.isOn = true;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// SetNormal();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnShow()
|
protected override void OnShow()
|
||||||
|
|||||||
@ -48,7 +48,9 @@
|
|||||||
<Action type="Var" name="变量名" value="1"></Action>
|
<Action type="Var" name="变量名" value="1"></Action>
|
||||||
<!--设置分数 与Score配合使用 步骤名字一定要是step+name-->
|
<!--设置分数 与Score配合使用 步骤名字一定要是step+name-->
|
||||||
<Action type="SetScore" name="步骤名字" value="1"></Action>
|
<Action type="SetScore" name="步骤名字" value="1"></Action>
|
||||||
<!--镜头切换 近距离和默认 如果有了nearDevice就可以不用nearPos和nearRot了 按照device的坐标和旋转来处理镜头 normalDevice同理-->
|
<!--镜头切换 近距离和默认 如果有了nearDevice就可以不用nearPos和nearRot了 按照device的坐标和旋转来处理镜头 normalDevice同理
|
||||||
|
isNear 如果不写 则默认不执行镜头切换
|
||||||
|
-->
|
||||||
<Action type="CameraSwitch" nearDevice="肠钳" normalDevice="组织钳" nearPos="-3.942,3.24,-4.319" nearRot="16.42331,180,0" nearTime="1" normalPos="-3.942,3.24,-3.946" normalRot="16.42331,180,-5.305351E-14" normalTime="1" isNear="false"></Action>
|
<Action type="CameraSwitch" nearDevice="肠钳" normalDevice="组织钳" nearPos="-3.942,3.24,-4.319" nearRot="16.42331,180,0" nearTime="1" normalPos="-3.942,3.24,-3.946" normalRot="16.42331,180,-5.305351E-14" normalTime="1" isNear="false"></Action>
|
||||||
<!--文字弹窗 按钮可以多个 点击事件使用UIClick-->
|
<!--文字弹窗 按钮可以多个 点击事件使用UIClick-->
|
||||||
<Action type="TextTip" value="这里是文字描述" audio="q001.mp3" btns="确定,取消"/>
|
<Action type="TextTip" value="这里是文字描述" audio="q001.mp3" btns="确定,取消"/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user