111
This commit is contained in:
@@ -7,25 +7,29 @@ namespace Stary.Evo
|
|||||||
{
|
{
|
||||||
private OpenDomainType OpenDomainType { get; set; }
|
private OpenDomainType OpenDomainType { get; set; }
|
||||||
|
|
||||||
private Vector3 position;
|
private TransformCtor transformCtor;
|
||||||
|
|
||||||
public ProgressBarPanel ProgressBarPanel { get; set; }
|
public ProgressBarPanel ProgressBarPanel { get; set; }
|
||||||
public void SetOpenDomainType(OpenDomainType type)
|
public void SetOpenDomainType(OpenDomainType type)
|
||||||
{
|
{
|
||||||
this.OpenDomainType = type;
|
this.OpenDomainType = type;
|
||||||
}
|
}
|
||||||
public void SetPosition(Vector3 position)
|
public void SetTransformCtor(Transform transform)
|
||||||
{
|
{
|
||||||
this.position = position;
|
this.transformCtor = transform.GetTransformCtor();
|
||||||
|
}
|
||||||
|
public void SetTransformCtor(TransformCtor transformCtor)
|
||||||
|
{
|
||||||
|
this.transformCtor = transformCtor;
|
||||||
}
|
}
|
||||||
public OpenDomainType GetOpenDomainType()
|
public OpenDomainType GetOpenDomainType()
|
||||||
{
|
{
|
||||||
return this.OpenDomainType;
|
return this.OpenDomainType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GetPosition()
|
public TransformCtor GetTransformCtor()
|
||||||
{
|
{
|
||||||
return this.position;
|
return this.transformCtor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,9 @@ namespace Stary.Evo
|
|||||||
}
|
}
|
||||||
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.ImageTracked)
|
else if (fsmLoadSystem.GetOpenDomainType() == OpenDomainType.ImageTracked)
|
||||||
{
|
{
|
||||||
info.transform.position = fsmLoadSystem.GetPosition();
|
info.transform.position = fsmLoadSystem.GetTransformCtor().position;
|
||||||
|
info.transform.rotation = Quaternion.Euler(fsmLoadSystem.GetTransformCtor().rotation);
|
||||||
|
info.transform.localScale = fsmLoadSystem.GetTransformCtor().scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace Stary.Evo
|
|||||||
public string domain;
|
public string domain;
|
||||||
|
|
||||||
private FsmLoadSystem _fsmSystem;
|
private FsmLoadSystem _fsmSystem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 即将加载的domain场景
|
/// 即将加载的domain场景
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -69,11 +70,21 @@ namespace Stary.Evo
|
|||||||
AppConfig.PackageDomainName = domain;
|
AppConfig.PackageDomainName = domain;
|
||||||
_fsmSystem.SetCurState(nameof(ResStartState));
|
_fsmSystem.SetCurState(nameof(ResStartState));
|
||||||
}
|
}
|
||||||
public void OpenDomain(string domain, Vector3 position)
|
|
||||||
|
public void OpenDomain(string domain, TransformCtor transformCtor)
|
||||||
{
|
{
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
_fsmSystem.SetOpenDomainType(OpenDomainType.ImageTracked);
|
_fsmSystem.SetOpenDomainType(OpenDomainType.ImageTracked);
|
||||||
_fsmSystem.SetPosition(position);
|
_fsmSystem.SetTransformCtor(transformCtor);
|
||||||
|
AppConfig.PackageDomainName = domain;
|
||||||
|
_fsmSystem.SetCurState(nameof(ResStartState));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenDomain(string domain, Transform transform)
|
||||||
|
{
|
||||||
|
this.domain = domain;
|
||||||
|
_fsmSystem.SetOpenDomainType(OpenDomainType.ImageTracked);
|
||||||
|
_fsmSystem.SetTransformCtor(transform);
|
||||||
AppConfig.PackageDomainName = domain;
|
AppConfig.PackageDomainName = domain;
|
||||||
_fsmSystem.SetCurState(nameof(ResStartState));
|
_fsmSystem.SetCurState(nameof(ResStartState));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace Stary.Evo
|
namespace Stary.Evo
|
||||||
{
|
{
|
||||||
public static class VectorExtension {
|
public static class VectorExtension
|
||||||
|
{
|
||||||
|
|
||||||
public static Vector3Ctor GetVector3Ctor(this Vector3 vector)
|
public static Vector3Ctor GetVector3Ctor(this Vector3 vector)
|
||||||
{
|
{
|
||||||
return new Vector3Ctor(vector);
|
return new Vector3Ctor(vector);
|
||||||
@@ -26,7 +25,12 @@ namespace Stary.Evo
|
|||||||
return new Vector2(vector3Ctor.x, vector3Ctor.y);
|
return new Vector2(vector3Ctor.x, vector3Ctor.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TransformCtor GetTransformCtor(this Transform transform)
|
||||||
|
{
|
||||||
|
return new TransformCtor(transform);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Vector3Ctor
|
public class Vector3Ctor
|
||||||
{
|
{
|
||||||
@@ -36,14 +40,15 @@ namespace Stary.Evo
|
|||||||
|
|
||||||
public Vector3Ctor()
|
public Vector3Ctor()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3Ctor(Vector3 vector)
|
public Vector3Ctor(Vector3 vector)
|
||||||
{
|
{
|
||||||
x = vector.x;
|
x = vector.x;
|
||||||
y = vector.y;
|
y = vector.y;
|
||||||
z = vector.z;
|
z = vector.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3Ctor(float x, float y, float z)
|
public Vector3Ctor(float x, float y, float z)
|
||||||
{
|
{
|
||||||
this.x = x;
|
this.x = x;
|
||||||
@@ -51,6 +56,7 @@ namespace Stary.Evo
|
|||||||
this.z = z;
|
this.z = z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Vector2Ctor
|
public class Vector2Ctor
|
||||||
{
|
{
|
||||||
@@ -63,4 +69,19 @@ namespace Stary.Evo
|
|||||||
y = vector.y;
|
y = vector.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class TransformCtor
|
||||||
|
{
|
||||||
|
public Vector3 position;
|
||||||
|
public Vector3 rotation;
|
||||||
|
public Vector3 scale;
|
||||||
|
|
||||||
|
public TransformCtor(Transform transform)
|
||||||
|
{
|
||||||
|
position = transform.position;
|
||||||
|
rotation = transform.eulerAngles;
|
||||||
|
scale = transform.localScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.staryevo.tools",
|
"name": "com.staryevo.tools",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"displayName": "00.StaryEvo.Tools",
|
"displayName": "00.StaryEvo.Tools",
|
||||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user