2024-04-02 18:17:57 +08:00
|
|
|
|
using System;
|
2024-04-06 11:59:18 +08:00
|
|
|
|
using Sirenix.OdinInspector;
|
2024-04-02 18:17:57 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
|
|
namespace Game
|
|
|
|
|
{
|
|
|
|
|
public class Test : MonoBehaviour
|
|
|
|
|
{
|
2024-04-05 11:59:11 +08:00
|
|
|
|
// public Transform tr;
|
2024-04-02 18:17:57 +08:00
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.A))
|
|
|
|
|
{
|
2024-04-04 23:51:14 +08:00
|
|
|
|
// var go = Game.resourceManager.LoadGameObjectSync(@"player");
|
|
|
|
|
// // var go = ResourceManager.Instance.LoadGameObject_MMM(@"hh");
|
|
|
|
|
// go.name = "123";
|
2024-04-02 18:17:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.D))
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
// ResourceManager.Instance.Release("hh");
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// CommonHelper.FindChildDeep<Image>(tr, "imag");
|
|
|
|
|
// Debug.Log("找到此组件l");
|
2024-04-03 14:38:44 +08:00
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// ResourceManager.Instance.LoadSceneAsync("Game", LoadSceneMode.Additive);
|
|
|
|
|
|
2024-04-02 18:17:57 +08:00
|
|
|
|
//
|
2024-04-03 17:46:56 +08:00
|
|
|
|
// EventManager.Instance.FireNow(this, new LoadingGameSceneFinishEventArgs(true));
|
2024-04-06 11:59:18 +08:00
|
|
|
|
|
2024-04-03 17:46:56 +08:00
|
|
|
|
//
|
|
|
|
|
//var value = this.GetType().ToString().Split(".");
|
2024-04-06 11:59:18 +08:00
|
|
|
|
// Debug.Log(value[^1]);
|
|
|
|
|
|
2024-04-05 11:59:11 +08:00
|
|
|
|
//
|
|
|
|
|
// var values = Enum.GetValues(typeof(ProcedureType));
|
|
|
|
|
// foreach (var value in values)
|
|
|
|
|
// {
|
|
|
|
|
// UnityEngine.Debug.Log( value.ToString());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//
|
2024-04-02 18:17:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-06 11:59:18 +08:00
|
|
|
|
|
|
|
|
|
public Transform room_RightUp;
|
|
|
|
|
public Transform room_LeftDown;
|
|
|
|
|
public Transform room_Pos;
|
|
|
|
|
|
|
|
|
|
[Button]
|
|
|
|
|
public Vector2 GetJoinPosition()
|
|
|
|
|
{
|
|
|
|
|
var vector2 = this.room_RightUp.position - this.room_LeftDown.position;
|
|
|
|
|
|
|
|
|
|
Vector2 vec = new Vector2(UnityEngine.Random.Range(0, vector2.x), UnityEngine.Random.Range(0, vector2.y));
|
|
|
|
|
vec += (Vector2)this.room_LeftDown.position;
|
|
|
|
|
|
|
|
|
|
this.room_Pos.position = vec;
|
|
|
|
|
return vec;
|
|
|
|
|
}
|
2024-04-02 18:17:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|