//test variables // public PointerEventData ped = new PointerEventData(EventSystem.current); // public List<RaycastResult> hits = new List<RaycastResult>(); //test variables void Awake() { gamecontrolman = GameObject.FindGameObjectWithTag("GameController"); playerstaminaref = gamecontrolman.GetComponent <playerstamina>(); camerarig = transform.GetChild(1).gameObject; // GameObject.Find("EventSystem").GetComponent<OVRInputModule>().rayTransform = transform; }
//test variables // public PointerEventData ped = new PointerEventData(EventSystem.current); // public List<RaycastResult> hits = new List<RaycastResult>(); //test variables void Awake() { gamecontrolman = GameObject.FindGameObjectWithTag("GameController"); playerstaminaref = gamecontrolman.GetComponent<playerstamina>(); camerarig = transform.GetChild(1).gameObject; // GameObject.Find("EventSystem").GetComponent<OVRInputModule>().rayTransform = transform; }
// Use this for initialization void Start() { playerstaminaref = GameObject.Find("gameman").GetComponent <playerstamina>(); playerobj = playerstaminaref.playerobj; ecanvas = transform.GetChild(0).gameObject; button1 = ecanvas.transform.GetChild(0).GetComponent <Button>(); button2 = ecanvas.transform.GetChild(1).GetComponent <Button>(); button3 = ecanvas.transform.GetChild(2).GetComponent <Button>(); button1.onClick.AddListener(() => { choiceone(); }); button2.onClick.AddListener(() => { choicetwo(); }); button3.onClick.AddListener(() => { choicethree(); }); }
void Awake() { playerstaminaref = GameObject.FindGameObjectWithTag("GameController").gameObject.GetComponent <playerstamina>(); }
// Use this for initialization void Start() { playerstaminaref = GameObject.Find("gameman").GetComponent<playerstamina>(); playerobj = playerstaminaref.playerobj; ecanvas = transform.GetChild(0).gameObject; button1 = ecanvas.transform.GetChild(0).GetComponent<Button>(); button2 = ecanvas.transform.GetChild(1).GetComponent<Button>(); button3 = ecanvas.transform.GetChild(2).GetComponent<Button>(); button1.onClick.AddListener(()=>{choiceone();}); button2.onClick.AddListener(()=>{choicetwo();}); button3.onClick.AddListener(()=>{choicethree();}); }
void Awake() { playerstaminaref = GameObject.FindGameObjectWithTag("GameController").gameObject.GetComponent<playerstamina>(); }