更新认知模块

This commit is contained in:
马铖荣 2025-07-01 16:37:26 +08:00
parent bd9b01175b
commit 389579647d
4 changed files with 10978 additions and 1460 deletions

View File

@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems;
public class ZhanShiCameraMove : MonoBehaviour public class ZhanShiCameraMove : MonoBehaviour
{ {
@ -27,7 +28,8 @@ public class ZhanShiCameraMove : MonoBehaviour
instance = this; instance = this;
// transform.LookAt(target); // transform.LookAt(target);
isAutoRotate = false; isAutoRotate = false;
if (isAutoRotate) { if (isAutoRotate)
{
Invoke("SetBool", 2f); Invoke("SetBool", 2f);
@ -95,8 +97,8 @@ public class ZhanShiCameraMove : MonoBehaviour
// Update is called once per frame // Update is called once per frame
private void Update() private void Update()
{
{ if (isAutoRotate && !Input.GetMouseButton(1)) if (isAutoRotate && !Input.GetMouseButton(1))
{ {
// Debug.Log("测试到鼠标左键没按下"); // Debug.Log("测试到鼠标左键没按下");
@ -132,8 +134,6 @@ public class ZhanShiCameraMove : MonoBehaviour
//更改摄像机位置为计算的值 //更改摄像机位置为计算的值
transform.position = pos; transform.position = pos;
} }
void RotateModelContinuously() void RotateModelContinuously()
{ {
@ -204,14 +204,19 @@ public class ZhanShiCameraMove : MonoBehaviour
transform.position = pos; transform.position = pos;
} }
[SerializeField][Header("是否自动旋转")] [SerializeField]
[Header("是否自动旋转")]
private bool isAutoRotate; private bool isAutoRotate;
[SerializeField] [Header("是否按照自身坐标系轴自动旋转")] [SerializeField]
[Header("是否按照自身坐标系轴自动旋转")]
private bool isAutoRotatePivot; private bool isAutoRotatePivot;
[SerializeField][Header("自动旋转方向,例如(0,1,0)按照Y轴旋转")] [SerializeField]
[Header("自动旋转方向,例如(0,1,0)按照Y轴旋转")]
private Vector3 autoRotateDirection; private Vector3 autoRotateDirection;
[SerializeField][Header("自动旋转速度")] [SerializeField]
[Header("自动旋转速度")]
private float autoRotationSpeed = 5; private float autoRotationSpeed = 5;
[SerializeField][Header("速度")] [SerializeField]
[Header("速度")]
private float speed = 5f; private float speed = 5f;
} }

File diff suppressed because it is too large Load Diff

View File

@ -107,14 +107,14 @@ namespace QFramework.Example
btns.Add(btn); btns.Add(btn);
btn.onClick.AddListener(() => btn.onClick.AddListener(() =>
{ {
subContent.SetActive(!subContent.activeSelf); //subContent.SetActive(!subContent.activeSelf);
if (op.freeStep) //if (op.freeStep)
{ //{
if (highIcon.color != highColor) // if (highIcon.color != highColor)
{ // {
TypeEventSystem.Global.Send<StepExecute>(new StepExecute() { index = int.Parse(btn.name) }); // TypeEventSystem.Global.Send<StepExecute>(new StepExecute() { index = int.Parse(btn.name) });
} // }
} //}
}); });
foreach (var sub in item.SubSteps) foreach (var sub in item.SubSteps)
{ {
@ -139,11 +139,11 @@ namespace QFramework.Example
btns.Add(subBtn); btns.Add(subBtn);
subBtn.onClick.AddListener(() => subBtn.onClick.AddListener(() =>
{ {
if (op.freeStep) //if (op.freeStep)
{ //{
subBtn.transform.parent.gameObject.SetActive(true); // subBtn.transform.parent.gameObject.SetActive(true);
TypeEventSystem.Global.Send<StepExecute>(new StepExecute() { index = int.Parse(subBtn.name) }); // TypeEventSystem.Global.Send<StepExecute>(new StepExecute() { index = int.Parse(subBtn.name) });
} //}
}); });
} }

View File

@ -1,21 +1,13 @@
<示例> <示例>
<!--顺序执行完毕--> <!--顺序执行完毕-->
<Action type="Sequence"> <Action type="Sequence">
<Action type="Log" value="进入初始状态"></Action> <Action type="Log" value="进入初始状态"></Action>
<Action type="Log" value="进入初始状态"></Action> <Action type="Log" value="进入初始状态"></Action>
</Action> </Action>
<!--同时执行完毕--> <!--同时执行完毕-->
<Action type="Parallel"> <Action type="Parallel">
<Action type="Log" value="1"></Action> <Action type="Log" value="1"></Action>
<Action type="Log" value="2"></Action> <Action type="Log" value="2"></Action>
</Action> </Action>
<!--只要任意满足就结束这个动作组--> <!--只要任意满足就结束这个动作组-->
<Action type="Any"></Action> <Action type="Any"></Action>