Merge remote-tracking branch 'origin/master' into LouDi_Pig

This commit is contained in:
李浩 2024-12-31 16:19:30 +08:00
commit 368e27f71f
4 changed files with 53 additions and 44 deletions

View File

@ -45,6 +45,8 @@ namespace QFramework
{
GameObject obj = Utility.FindObj(path);
if (obj != null)
{
try
{
anim = obj.GetComponent<Animation>();
@ -60,7 +62,7 @@ namespace QFramework
else
{
float curSpeed = 1;
if (string.IsNullOrEmpty(speed)==false)
if (string.IsNullOrEmpty(speed) == false)
{
float.TryParse(speed, out curSpeed);
}
@ -68,8 +70,15 @@ namespace QFramework
anim.Play(animName);
}
}
catch (Exception)
{
Debug.LogError($"{path} 播放动画 {animName} 出错");
}
}
else
{
Debug.LogError("未找到路径:" + path);
this.Finish();
}
}

View File

@ -35,7 +35,7 @@ namespace QFramework
{
UIPointQuestionData data = new UIPointQuestionData();
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)

View File

@ -16,7 +16,7 @@ namespace QFramework.Example
public Vector3 normalRot;
public float nearTime;
public float normalTime;
public bool isNear = false;
public bool isNear;
}
public partial class UICameraSwitch : UIPanel
@ -60,30 +60,28 @@ namespace QFramework.Example
mData = uiData as UICameraSwitchData ?? new UICameraSwitchData();
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()

View File

@ -28,6 +28,8 @@ namespace QFramework.Example
protected override void OnOpen(IUIData uiData = null)
{
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
Content.RemoveAllChildren();
var paths = mData.paths.Split(',');
for (int i = 0; i < paths.Length; i++)
{
@ -60,11 +62,11 @@ namespace QFramework.Example
protected override void OnHide()
{
pointMap.Clear();
}
protected override void OnClose()
{
pointMap.Clear();
}
}
}