82 lines
1.7 KiB
C#
82 lines
1.7 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System;
|
|
using Unity.XR.PXR;
|
|
|
|
public class GameInit : MonoBehaviour
|
|
{
|
|
public static GameInit Ins { get; private set; }
|
|
|
|
public Camera MRCamera;
|
|
public Transform MRLeftControl;
|
|
public Transform MRRightControl;
|
|
public Transform Event;
|
|
public GameObject Landmarks;
|
|
public AudioSource bgm;
|
|
public AudioSource sfx;
|
|
|
|
public GameObject JxsdLogo;
|
|
|
|
// 打BOSS站的地方
|
|
public GameObject Tex;
|
|
|
|
[NonSerialized]
|
|
public GameObject Win;
|
|
|
|
[NonSerialized]
|
|
public GameObject HitUI;
|
|
|
|
[NonSerialized]
|
|
public GameObject UIHudDie;
|
|
|
|
[NonSerialized]
|
|
public GameObject AliveUI;
|
|
|
|
[NonSerialized]
|
|
public Text restartCountDownText;
|
|
|
|
public GameObject Runing;
|
|
public GameObject Test;
|
|
|
|
/// <summary>
|
|
/// 游戏场地
|
|
/// </summary>huan
|
|
public GamePlace gamePlace = GamePlace.LiaoningAnShan;
|
|
|
|
[NonSerialized]
|
|
public Player self;
|
|
|
|
public Transform[] SpiderPos;
|
|
|
|
public Transform[] EskyPos;
|
|
|
|
public Transform[] movePoses;
|
|
|
|
public static Transform[] movePos;
|
|
|
|
private void Awake()
|
|
{
|
|
Ins = this;
|
|
Application.targetFrameRate = 60;
|
|
// PXR_MixedReality.EnableVideoSeeThrough(true);
|
|
#if !UNITY_EDITOR && UNITY_ANDROID && PICO
|
|
PXR_MixedReality.EnableVideoSeeThrough(true);
|
|
#elif !UNITY_EDITOR && UNITY_ANDROID && VIVE
|
|
Interop.WVR_ShowPassthroughUnderlay(true);
|
|
#endif
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
movePos = movePoses;
|
|
// if (Runing && Test)
|
|
// {
|
|
// Runing.SetActive(true);
|
|
// Test.SetActive(false);
|
|
// }
|
|
|
|
ConPanel.Show();
|
|
}
|
|
}
|
|
|