修改一些问题
This commit is contained in:
parent
9b90252c37
commit
1f4d4a7c1a
|
@ -48,6 +48,8 @@ namespace RenderHeads.Media.AVProVideo.Demos
|
||||||
|
|
||||||
private MediaPlayer _loadingPlayer;
|
private MediaPlayer _loadingPlayer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MediaPlayer PlayingPlayer
|
public MediaPlayer PlayingPlayer
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -89,6 +91,7 @@ namespace RenderHeads.Media.AVProVideo.Demos
|
||||||
|
|
||||||
public void OnOpenVideoFile()
|
public void OnOpenVideoFile()
|
||||||
{
|
{
|
||||||
|
Debug.Log(System.IO.Path.Combine(_folder, _videoFiles[_VideoIndex]));
|
||||||
LoadingPlayer.m_VideoPath = System.IO.Path.Combine(_folder, _videoFiles[_VideoIndex]);
|
LoadingPlayer.m_VideoPath = System.IO.Path.Combine(_folder, _videoFiles[_VideoIndex]);
|
||||||
_VideoIndex = (_VideoIndex + 1) % (_videoFiles.Length);
|
_VideoIndex = (_VideoIndex + 1) % (_videoFiles.Length);
|
||||||
if (string.IsNullOrEmpty(LoadingPlayer.m_VideoPath))
|
if (string.IsNullOrEmpty(LoadingPlayer.m_VideoPath))
|
||||||
|
@ -228,6 +231,22 @@ namespace RenderHeads.Media.AVProVideo.Demos
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Button multiplyPlaybackBtn;
|
||||||
|
public Button[] multiplyButtons;
|
||||||
|
public GameObject multiplyTogglesParents;
|
||||||
|
public bool isMultiplyOn = false;
|
||||||
|
|
||||||
|
public void ResetPlayState()
|
||||||
|
{
|
||||||
|
isMultiplyOn = false;
|
||||||
|
multiplyTogglesParents.SetActive(false);
|
||||||
|
multiplyPlaybackBtn.transform.GetChild(0).GetComponent<Text>().text = "×1";
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 倍数播放
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_loadingPlayer = _mediaPlayerB;
|
_loadingPlayer = _mediaPlayerB;
|
||||||
|
@ -235,6 +254,27 @@ namespace RenderHeads.Media.AVProVideo.Demos
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
multiplyPlaybackBtn.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
isMultiplyOn = !isMultiplyOn;
|
||||||
|
multiplyTogglesParents.SetActive(isMultiplyOn);
|
||||||
|
});
|
||||||
|
|
||||||
|
for (int i = 0; i < multiplyButtons.Length; i++)
|
||||||
|
{
|
||||||
|
int index = i;
|
||||||
|
multiplyButtons[index].onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
multiplyPlaybackBtn.transform.GetChild(0).GetComponent<Text>().text = "×" + multiplyButtons[index].name;
|
||||||
|
float temp = float.Parse(multiplyButtons[index].name);
|
||||||
|
if (PlayingPlayer)
|
||||||
|
PlayingPlayer.Control.SetPlaybackRate(temp);
|
||||||
|
isMultiplyOn = false;
|
||||||
|
multiplyTogglesParents.SetActive(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
ResetPlayState();
|
||||||
if (PlayingPlayer)
|
if (PlayingPlayer)
|
||||||
{
|
{
|
||||||
PlayingPlayer.Events.AddListener(OnVideoEvent);
|
PlayingPlayer.Events.AddListener(OnVideoEvent);
|
||||||
|
|
|
@ -79,7 +79,7 @@ TextMesh:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 114525537}
|
m_GameObject: {fileID: 114525537}
|
||||||
m_Text:
|
m_Text: "\u7535\u5B50\u4FA6\u5BDF\u65E0\u4EBA\u673A"
|
||||||
m_OffsetZ: 0
|
m_OffsetZ: 0
|
||||||
m_CharacterSize: 1
|
m_CharacterSize: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
|
@ -142,7 +142,7 @@ MonoBehaviour:
|
||||||
isEnableVertical: 1
|
isEnableVertical: 1
|
||||||
isEnableLerp: 0
|
isEnableLerp: 0
|
||||||
lerpTime: 1
|
lerpTime: 1
|
||||||
_distance: 10
|
_distance: 6
|
||||||
--- !u!1 &1868832759
|
--- !u!1 &1868832759
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -768,6 +768,11 @@ MonoBehaviour:
|
||||||
SurveillanceFrequencyBand: {fileID: 6513129680526216908}
|
SurveillanceFrequencyBand: {fileID: 6513129680526216908}
|
||||||
gamePos: {fileID: 392167392884716949}
|
gamePos: {fileID: 392167392884716949}
|
||||||
gamemap: {fileID: 6311100753636855780}
|
gamemap: {fileID: 6311100753636855780}
|
||||||
|
reveal: 0
|
||||||
|
Ground:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
boisp: 1
|
||||||
attackColliders1: []
|
attackColliders1: []
|
||||||
currentCollider: {fileID: 0}
|
currentCollider: {fileID: 0}
|
||||||
layerMask:
|
layerMask:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,7 @@ public class Main_interface_Panel : XUIPanel
|
||||||
public Button train;
|
public Button train;
|
||||||
public Button replay;
|
public Button replay;
|
||||||
public Button appQuet;
|
public Button appQuet;
|
||||||
|
public Text accountName;
|
||||||
public Main_interface_Panel() : base(UIType.Fixed, UIMode.None, UICollider.None)
|
public Main_interface_Panel() : base(UIType.Fixed, UIMode.None, UICollider.None)
|
||||||
{
|
{
|
||||||
uiPath = "UIPanel/Main_interface_Panel";
|
uiPath = "UIPanel/Main_interface_Panel";
|
||||||
|
@ -34,6 +35,8 @@ public class Main_interface_Panel : XUIPanel
|
||||||
appQuet.onClick.AddListener(() => { Application.Quit();
|
appQuet.onClick.AddListener(() => { Application.Quit();
|
||||||
//Debug.Log("退出");
|
//Debug.Log("退出");
|
||||||
});
|
});
|
||||||
|
accountName = this.transform.Find("UPBG/avatar_btn/Text").GetComponent<Text>();
|
||||||
|
accountName.text = GlobalFlag.currentUser.login_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -369,10 +369,10 @@ public class Scenariopage : MonoBehaviour
|
||||||
caodi = GameObject.Find("Background");
|
caodi = GameObject.Find("Background");
|
||||||
|
|
||||||
//调用接口
|
//调用接口
|
||||||
Debug.Log("Url_Action..:" + Url_Action);
|
//Debug.Log("Url_Action..:" + Url_Action);
|
||||||
StartCoroutine(Post1(Url_Action, (bol, str) =>
|
StartCoroutine(Post1(Url_Action, (bol, str) =>
|
||||||
{
|
{
|
||||||
Debug.Log(str);
|
//Debug.Log(str);
|
||||||
Scenario(bol, str);
|
Scenario(bol, str);
|
||||||
}));
|
}));
|
||||||
Scenario();//想定文件
|
Scenario();//想定文件
|
||||||
|
@ -382,7 +382,8 @@ public class Scenariopage : MonoBehaviour
|
||||||
send_back_btn.onClick.AddListener(() =>
|
send_back_btn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
GameMain.tiao = false;
|
GameMain.tiao = false;
|
||||||
SceneManager.LoadScene("SampleScene");
|
SceneLoad.Instance.SceneChange("SampleScene");
|
||||||
|
//SceneManager.LoadScene("SampleScene");
|
||||||
});
|
});
|
||||||
//SetLightValue(1f);
|
//SetLightValue(1f);
|
||||||
queding.onClick.AddListener(() =>
|
queding.onClick.AddListener(() =>
|
||||||
|
@ -1558,7 +1559,7 @@ public class Scenariopage : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (bol)
|
if (bol)
|
||||||
{
|
{
|
||||||
Debug.LogError(str);
|
//Debug.LogError(str);
|
||||||
scen = JsonMapper.ToObject<Editinformation>(str);//解析最外层的想定名称json文件
|
scen = JsonMapper.ToObject<Editinformation>(str);//解析最外层的想定名称json文件
|
||||||
for (int i = 0; i < scen.data.Count; i++)
|
for (int i = 0; i < scen.data.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,9 +38,10 @@ public class Taskpanel : MonoBehaviour
|
||||||
public Button fanhuiBtn;
|
public Button fanhuiBtn;
|
||||||
public Button fanhui;
|
public Button fanhui;
|
||||||
private bool isp = true;
|
private bool isp = true;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
this.transform.Find("UPBG/avatar_botn/Text").GetComponent<Text>().text = GlobalFlag.currentUser.login_name;
|
||||||
fanhui.onClick.AddListener(() =>
|
fanhui.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
GameMain.tiao = false;
|
GameMain.tiao = false;
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class View_Panel2 : XUIPanel
|
||||||
public List<string> rootlist = new List<string>();//存入房间的名字
|
public List<string> rootlist = new List<string>();//存入房间的名字
|
||||||
public List<Button> buttonlist = new List<Button>();//克隆出来房间按钮
|
public List<Button> buttonlist = new List<Button>();//克隆出来房间按钮
|
||||||
|
|
||||||
|
|
||||||
//public string roomUrl = Url_RoomList;
|
//public string roomUrl = Url_RoomList;
|
||||||
//public string userUrl = Url_StudentList;
|
//public string userUrl = Url_StudentList;
|
||||||
public RoomData roomdata = new RoomData();
|
public RoomData roomdata = new RoomData();
|
||||||
|
@ -555,7 +554,8 @@ public class View_Panel2 : XUIPanel
|
||||||
///想定编辑
|
///想定编辑
|
||||||
scenario_btn.onClick.AddListener(() =>
|
scenario_btn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
SceneManager.LoadScene("Contingenc_yediting_panl");
|
SceneLoad.Instance.SceneChange("Contingenc_yediting_panl");
|
||||||
|
//SceneManager.LoadScene("Contingenc_yediting_panl");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -860,6 +860,7 @@ public class View_Panel2 : XUIPanel
|
||||||
CreateRoomBase(returnRoomId.data, currentRoomName);
|
CreateRoomBase(returnRoomId.data, currentRoomName);
|
||||||
refresh_btn.onClick?.Invoke();
|
refresh_btn.onClick?.Invoke();
|
||||||
}
|
}
|
||||||
|
currentEditorAccounts.Clear();
|
||||||
string RoomName = "createroom " + returnRoomId.data;
|
string RoomName = "createroom " + returnRoomId.data;
|
||||||
_ = AdamSync.SyncCreateRoom.SendMessageAsync(RoomName);
|
_ = AdamSync.SyncCreateRoom.SendMessageAsync(RoomName);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -46,8 +46,8 @@ public class Face2Camera : MonoBehaviour
|
||||||
|
|
||||||
float distance = Vector3.Distance(Camera.main.transform.position, transform.position);//不断变化的距离
|
float distance = Vector3.Distance(Camera.main.transform.position, transform.position);//不断变化的距离
|
||||||
float scale = distance / _distance;
|
float scale = distance / _distance;
|
||||||
if (scale > 10f)
|
if (scale > 3f)
|
||||||
scale = 10f;
|
scale = 3f;
|
||||||
transform.localScale = initScale * scale;
|
transform.localScale = initScale * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue