public override void SetupContent(UIpanel controller, GameObject viewPort) { parentCanvas = GetComponentInParent <Canvas>(); this.controller = controller; this.viewPort = viewPort; usePageCount = false; List <GameObject> gridPages = new List <GameObject>(); foreach (Transform child in transform) { GridSpawnWindow window = child.GetComponent <GridSpawnWindow>(); if (window != null) { window.SetupContent(controller, viewPort); gridPages.Add(window.gameObject); } } pages = gridPages.ToArray(); generateSubTabs(subTabDiameters, subTabAlignment); SwitchToPage(0); }
private void Awake() { panel = FindObjectOfType <UIpanel>(); gridpointer = GetComponent <VR_GridPointer>(); pointerObjectSnapper = GetComponent <VR_pointerObjectSnapper>(); }
private void Awake() { panelMover = FindObjectOfType <VRPanelMover>(); panel = FindObjectOfType <UIpanel>(); isActive = new bool[transform.childCount]; pointsholder = new Transform[transform.childCount]; for (int i = 0; i < transform.childCount; i++) { pointsholder[i] = transform.GetChild(i); } //gridObjectSpawners = FindObjectsOfType<VRGridObjectSpawner>(); }
public override void SetupContent(UIpanel controller, GameObject viewPort) { buttonBehaviourScript = GetComponent <GridButtonBehaviour>(); if (buttonBehaviourScript == null) { throw new MissingComponentException("GridSpawnWindow of " + gameObject.name + " has no behavioural script attached to it"); } buttonBehaviourScript.Setup(this); numberOfButtons = buttonBehaviourScript.NumberOfObjects; this.controller = controller; this.viewPort = viewPort; backGroundImage = GetComponent <Image>(); GenerateButtonGrid(); SwitchToPage(0); }
public override void SetupContent(UIpanel controller, GameObject viewPort) { }
//this is kinda like void Start() public override void SetupContent(UIpanel controller, GameObject viewPort) { anim = GetComponent <Animator>(); }
private void Awake() { panelcontroller = panelCanvas.GetComponentInChildren <UIpanel>(); panelMover = panelCanvas.GetComponent <VRPanelMover>(); }
/// <summary> /// Constructor method which gets called by the UIpanel class that controls the panel /// </summary> /// <param name="controller">The controller that called this method</param> /// <param name="viewPort">The viewport this content is in, this is usually the main viewport</param> public abstract void SetupContent(UIpanel controller, GameObject viewPort);
public void setBrick() { UIpanel.SetActive(false); spawn(); }