Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
368e27f71f
@ -46,30 +46,39 @@ namespace QFramework
|
|||||||
GameObject obj = Utility.FindObj(path);
|
GameObject obj = Utility.FindObj(path);
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
{
|
||||||
anim = obj.GetComponent<Animation>();
|
try
|
||||||
|
{
|
||||||
|
anim = obj.GetComponent<Animation>();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(frame) == false && frame != "-1")
|
if (string.IsNullOrEmpty(frame) == false && frame != "-1")
|
||||||
{
|
|
||||||
int curFrame = 0;
|
|
||||||
int.TryParse(frame, out curFrame);
|
|
||||||
anim[animName].time = curFrame / anim.clip.frameRate;
|
|
||||||
anim[animName].speed = 0;
|
|
||||||
anim.Play(animName);
|
|
||||||
this.Finish();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
float curSpeed = 1;
|
|
||||||
if (string.IsNullOrEmpty(speed)==false)
|
|
||||||
{
|
{
|
||||||
float.TryParse(speed, out curSpeed);
|
int curFrame = 0;
|
||||||
|
int.TryParse(frame, out curFrame);
|
||||||
|
anim[animName].time = curFrame / anim.clip.frameRate;
|
||||||
|
anim[animName].speed = 0;
|
||||||
|
anim.Play(animName);
|
||||||
|
this.Finish();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float curSpeed = 1;
|
||||||
|
if (string.IsNullOrEmpty(speed) == false)
|
||||||
|
{
|
||||||
|
float.TryParse(speed, out curSpeed);
|
||||||
|
}
|
||||||
|
anim[animName].speed = curSpeed;
|
||||||
|
anim.Play(animName);
|
||||||
}
|
}
|
||||||
anim[animName].speed = curSpeed;
|
|
||||||
anim.Play(animName);
|
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Debug.LogError($"{path} 播放动画 {animName} 出错");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Debug.LogError("未找到路径:" + path);
|
||||||
this.Finish();
|
this.Finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace QFramework
|
|||||||
{
|
{
|
||||||
UIPointQuestionData data = new UIPointQuestionData();
|
UIPointQuestionData data = new UIPointQuestionData();
|
||||||
data.paths = paths;
|
data.paths = paths;
|
||||||
UIKit.OpenPanelAsync<UIPointQuestion>(uiData: data).ToAction().StartGlobal(() => this.Finish());
|
UIKit.OpenPanelAsync<UIPointQuestion>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnExecute(float dt)
|
public void OnExecute(float dt)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace QFramework.Example
|
|||||||
public Vector3 normalRot;
|
public Vector3 normalRot;
|
||||||
public float nearTime;
|
public float nearTime;
|
||||||
public float normalTime;
|
public float normalTime;
|
||||||
public bool isNear = false;
|
public bool isNear;
|
||||||
|
|
||||||
}
|
}
|
||||||
public partial class UICameraSwitch : UIPanel
|
public partial class UICameraSwitch : UIPanel
|
||||||
@ -60,30 +60,28 @@ namespace QFramework.Example
|
|||||||
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
|
||||||
|
|
||||||
|
|
||||||
|
//if (mData.isNear)
|
||||||
|
//{
|
||||||
if (mData.isNear)
|
// if (Near.isOn == false)
|
||||||
{
|
// {
|
||||||
if (Near.isOn == false)
|
// Near.isOn = true;
|
||||||
{
|
// }
|
||||||
Near.isOn = true;
|
// else
|
||||||
}
|
// {
|
||||||
else
|
// SetNear();
|
||||||
{
|
// }
|
||||||
SetNear();
|
//}
|
||||||
}
|
//else
|
||||||
}
|
//{
|
||||||
else
|
// if (Far.isOn == false)
|
||||||
{
|
// {
|
||||||
if (Far.isOn == false)
|
// Far.isOn = true;
|
||||||
{
|
// }
|
||||||
Far.isOn = true;
|
// else
|
||||||
}
|
// {
|
||||||
else
|
// SetNormal();
|
||||||
{
|
// }
|
||||||
SetNormal();
|
//}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnShow()
|
protected override void OnShow()
|
||||||
|
|||||||
@ -28,6 +28,8 @@ namespace QFramework.Example
|
|||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
||||||
|
|
||||||
|
Content.RemoveAllChildren();
|
||||||
var paths = mData.paths.Split(',');
|
var paths = mData.paths.Split(',');
|
||||||
for (int i = 0; i < paths.Length; i++)
|
for (int i = 0; i < paths.Length; i++)
|
||||||
{
|
{
|
||||||
@ -60,11 +62,11 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void OnHide()
|
protected override void OnHide()
|
||||||
{
|
{
|
||||||
|
pointMap.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnClose()
|
protected override void OnClose()
|
||||||
{
|
{
|
||||||
pointMap.Clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user