Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
16b64d586d
@ -157,8 +157,8 @@ public class ActionHelper
|
||||
}
|
||||
case "CameraLock":
|
||||
{
|
||||
var strAction = (XMLTool.StringListAction)act;
|
||||
return CameraLockAction.Allocate(strAction.args[0], strAction.args[1]);
|
||||
var strAction = (XMLTool.DictionaryAction)act;
|
||||
return CameraLockAction.Allocate(strAction.args);
|
||||
}
|
||||
case "Video":
|
||||
{
|
||||
|
||||
@ -83,6 +83,10 @@ namespace QFramework
|
||||
}
|
||||
anim[animName].speed = curSpeed;
|
||||
anim.Play(animName);
|
||||
if (anim[animName].wrapMode== WrapMode.Loop)
|
||||
{
|
||||
this.Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QFramework
|
||||
@ -18,14 +19,14 @@ namespace QFramework
|
||||
new SimpleObjectPool<CameraLockAction>(() => new CameraLockAction(), null, 10);
|
||||
string isMove;
|
||||
string isRotate;
|
||||
public static CameraLockAction Allocate(string isMove, string isRotate, System.Action OnFinished = null)
|
||||
public static CameraLockAction Allocate(Dictionary<string, string> datas, System.Action OnFinished = null)
|
||||
{
|
||||
var retNode = mPool.Allocate();
|
||||
retNode.ActionID = ActionKit.ID_GENERATOR++;
|
||||
retNode.Deinited = false;
|
||||
retNode.Reset();
|
||||
retNode.isMove = isMove;
|
||||
retNode.isRotate = isRotate;
|
||||
retNode.isMove = datas.ContainsKey("isMove") ? datas["isMove"] : "true";
|
||||
retNode.isRotate = datas.ContainsKey("isRotate") ? datas["isRotate"] : "true";
|
||||
retNode.OnFinished = OnFinished;
|
||||
return retNode;
|
||||
}
|
||||
|
||||
@ -676,24 +676,16 @@ namespace XMLTool
|
||||
break;
|
||||
case "CameraLock":
|
||||
{
|
||||
var act = new StringListAction();
|
||||
var act = new DictionaryAction();
|
||||
XAttribute isMove = action.Attribute("isMove");
|
||||
if (isMove != null)
|
||||
{
|
||||
act.args.Add(isMove.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
act.args.Add("true");
|
||||
act.args.Add("isMove", isMove.Value);
|
||||
}
|
||||
XAttribute isRotate = action.Attribute("isRotate");
|
||||
if (isRotate != null)
|
||||
{
|
||||
act.args.Add(isRotate.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
act.args.Add("true");
|
||||
act.args.Add("isRotate", isRotate.Value);
|
||||
}
|
||||
newAction = act;
|
||||
}
|
||||
|
||||
@ -51,13 +51,12 @@
|
||||
<Action type="SetScore" name="步骤名字" value="1"></Action>
|
||||
<!--镜头切换 近距离和默认 如果有了nearDevice就可以不用nearPos和nearRot了 按照device的坐标和旋转来处理镜头 normalDevice同理
|
||||
只设置坐标 不执行镜头切换 是否执行要根据UI的按钮操作来
|
||||
isOn: near或者normal 作为强制选择一个镜头
|
||||
-->
|
||||
<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" isOn="near"></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"></Action>
|
||||
<!--文字弹窗 按钮可以多个 点击事件使用UIClick-->
|
||||
<Action type="TextTip" value="这里是文字描述" audio="q001.mp3" btns="确定,取消"/>
|
||||
<!--锁定镜头 value为是否锁定-->
|
||||
<Action type="CameraLock" value="true"></Action>
|
||||
<!--锁定镜头 true为开启 false为锁定 isMove是移动镜头 isRotate是旋转镜头-->
|
||||
<Action type="CameraLock" isMove="true" isRotate="true"></Action>
|
||||
<!--播放视频 size为视频窗口大小 offset为窗口中心点偏移 播放完成事件和关闭事件 通常使用关闭事件即可
|
||||
宽度不要小于500 否则进度条看不太清楚-->
|
||||
<Action type="Video" value="test.mp4" size="500,500" offset="10,10" finishedEvent="finished" closeEvent="close"></Action>
|
||||
@ -128,7 +127,7 @@
|
||||
|
||||
<!--通用事件通知
|
||||
|
||||
HighLightTrigger:value=false 关闭device悬浮高亮 value=true 开启 false value=false,deviceName 后面的参数是可以写设备名字 不写就是全部设备
|
||||
HighLightTrigger:value=false 关闭device悬浮高亮 value=true 开启
|
||||
|
||||
-->
|
||||
<Action type="StrEvent" name="HighLightTrigger" value="false"></Action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user