本文整理汇总了C#中CardboardHead类的典型用法代码示例。如果您正苦于以下问题:C# CardboardHead类的具体用法?C# CardboardHead怎么用?C# CardboardHead使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CardboardHead类属于命名空间,在下文中一共展示了CardboardHead类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
ConsoleLog.SLog ("PlayerGameManager Start()");
anim = GetComponent<Animator> ();
cardboardCamera = GameObject.FindGameObjectWithTag("PlayerHead");
cardboardHead = cardboardCamera.GetComponent<CardboardHead> ();
headPos = GameObject.FindGameObjectWithTag ("CameraPos").transform;
gun = GameObject.FindGameObjectWithTag ("MyGun");
gunProperties = gun.GetComponent<GunProperties> ();
gunAudio = gun.GetComponents<AudioSource> ();
gunLight = GameObject.FindGameObjectWithTag ("GunLight");
gunFlashEmitter = GameObject.FindGameObjectWithTag ("GunFlash").GetComponent<EllipsoidParticleEmitter>();
gunFlashEmitter.emit = false;
footstepsAudio = GetComponent<AudioSource> ();
bulletHoleArray = new ArrayList (bulletHoleMaxAmount);
//HUD
HUD = GameObject.FindGameObjectWithTag("HUD");
healthBar = HUD.transform.GetChild (0) as Transform;
bulletText = HUD.transform.GetChild (1).GetComponent<TextMesh>();
reloadText = HUD.transform.GetChild (2).GetComponent<TextMesh>();
grenadeText = HUD.transform.GetChild (3).GetComponent<TextMesh>();
HUDCanvas = HUD.transform.GetChild (4).gameObject;
deadText = HUDCanvas.transform.GetChild (0).gameObject;
endRoundText = HUDCanvas.transform.GetChild (1).gameObject;
endGameText = HUDCanvas.transform.GetChild (2).gameObject;
bulletText.text = gunProperties.bulletLoadCurrent + "/" + gunProperties.bulletStoreCurrent;
grenadeText.text = grenadeStore + "";
}
示例2: Start
// Use this for initialization
void Start()
{
Cardboard.SDK.OnTrigger += PullTrigger;
head = GameObject.FindObjectOfType<CardboardHead>();
rb = GetComponent<Rigidbody>();
state = GameObject.FindObjectOfType<LevelState>();
}
示例3: Awake
void Awake(){
ConsoleLog.SLog ("ControlScript Awake()");
ConsoleLog.SLog ("CharacterType = " + characterType);
cardboardMain = GameObject.FindGameObjectWithTag ("CardboardMain");
cardboardCamera = GameObject.FindGameObjectWithTag("PlayerHead");
characterHead = GameObject.FindGameObjectWithTag ("CharacterHead");
cardboardHead = cardboardCamera.GetComponent<CardboardHead> ();
if (!cardboardHead.isCharacterSync) { cardboardHead.ReSyncCharacter (); }
cameraPos = GameObject.FindGameObjectWithTag ("CameraPos").transform;
gazePointer = GameObject.FindGameObjectWithTag ("GazePointer");
}
开发者ID:Xenocide93,项目名称:MultiplayerFPSCardboardGame,代码行数:12,代码来源:UnityChanControlScriptWithRgidBody.cs
示例4: Start
private GameObject playerBody = null; // 'Cos' del jugador
void Start(){
Debug.Log ("Start() PlayerController");
GameObject gameControllerObject = GameObject.FindWithTag ("GameController");
if (gameControllerObject != null)
{
gameController = gameControllerObject.GetComponent <GameController>();
}
if (gameController == null)
{
Debug.Log ("No s'ha trobat el script GameController");
}
playerBody = this.gameObject;
// CardBoard ?
if (Camera.main.GetComponent<StereoController>().Head == null){
// Sense CardBoard
vr = false;
} else {
// amb CardBoard
vr = true;
head = Camera.main.GetComponent<StereoController>().Head;
playerBody.GetComponent<Renderer>().enabled = false;
}
jumping = false;
crouching = false;
}
示例5: Start
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
overlay = overlayObject.GetComponent<Overlay>();
progressBar = transform.parent.FindChild("Bar Progress Pivot").gameObject;
text = transform.parent.FindChild("Text").GetComponent<TextMesh>();
}
示例6: Start
void Start ()
{
head = Camera.main.GetComponent<StereoController>().Head;
//playerObject = GameObject.FindWithTag ("Player");
}
示例7: Start
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
startingPosition = transform.localPosition;
CardboardGUI.IsGUIVisible = false;
color = new Color (1, 1, 1, 1);
}
示例8: Start
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
startingPosition = transform.localPosition;
// CardboardGUI.IsGUIVisible = true;
// CardboardGUI.onGUICallback += this.OnGUI;
}
示例9: Start
// Use this for initialization
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
//initialOffset = head.transform.eulerAngles;
initialObjPositionZ = transform.eulerAngles.z;
//print("Wing: " + initialOffset.x + " " + initialOffset.y + " " + initialOffset.z);
initialOffset = new Vector3(0, 180, 0);
}
示例10: Start
void Start()
{
//We get the head componant from google
cardboardHead = Camera.main.GetComponent<StereoController>().Head;
//We precvent devices such as the LG G2 from going to sleep
Screen.sleepTimeout = SleepTimeout.NeverSleep;
}
示例11: Start
// Use this for initialization
void Start()
{
//this sets the head variable to the Head component
head = Camera.main.GetComponent<StereoController>().Head;
//this gets the head component
controller = GameObject.Find("PlayerCapsule");
//this finds the script that contains the boolean checkAutoWalk
autowalk = controller.GetComponent<CharacterMotor>();
}
示例12: Start
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
if (Toolbox.Instance.mode == Constants.VR_MODE) {
Cardboard.SDK.VRModeEnabled = true;
} else {
Cardboard.SDK.VRModeEnabled = false;
}
}
示例13: Start
// Use this for initialization
void Start()
{
cardboardHead = Camera.main.GetComponent<StereoController>().Head;
gazeInput = GameObject.FindGameObjectWithTag ("EventSystem").GetComponent<GazeInputModule>();
EventSystemManager = GameObject.FindGameObjectWithTag ("EventSystem").GetComponent<EventSystem> ();
eventSystem = new PointerEventData (EventSystem.current);
loader = GameObject.FindGameObjectWithTag ("Clicker");
loadFill = loader.GetComponent<Image> ();
}
示例14: Start
void Start()
{
head = Camera.main.GetComponent<StereoController>().Head;
originalParent = pauseMenu.transform.parent;
buttonText = transform.GetChild (1);
buttonText.gameObject.SetActive (false);
song = GameObject.FindWithTag("Song");
metronome = FindObjectOfType<MetronomeScript>();
ui = FindObjectOfType<UIScript>();
}
示例15: Load
public virtual void Load()
{
head = Camera.main.GetComponent<StereoController>().Head;
timer = 0;
barBGMat = Resources.Load("Materials/BarBG") as Material;
barSelectedMat = Resources.Load("Materials/BarSelected") as Material;
barInactiveMat = Resources.Load("Materials/BarInactive") as Material;
progressBar = transform.parent.FindChild("Bar Progress Pivot").gameObject;
text = transform.parent.FindChild("Text").GetComponent<TextMesh>();
}