示例#1
0
    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);
    }
示例#2
0
    private void Awake()
    {
        panel = FindObjectOfType <UIpanel>();

        gridpointer          = GetComponent <VR_GridPointer>();
        pointerObjectSnapper = GetComponent <VR_pointerObjectSnapper>();
    }
示例#3
0
    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>();
    }
示例#4
0
    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);
    }
示例#5
0
 public override void SetupContent(UIpanel controller, GameObject viewPort)
 {
 }
示例#6
0
 //this is kinda like void Start()
 public override void SetupContent(UIpanel controller, GameObject viewPort)
 {
     anim = GetComponent <Animator>();
 }
示例#7
0
 private void Awake()
 {
     panelcontroller = panelCanvas.GetComponentInChildren <UIpanel>();
     panelMover      = panelCanvas.GetComponent <VRPanelMover>();
 }
示例#8
0
 /// <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);
示例#9
0
 public void setBrick()
 {
     UIpanel.SetActive(false);
     spawn();
 }