public void ShowWorkers()
 {
     PopulateWorkerPanel();
     _activePanel?.element.Hide();
     this._workerPanelReference.element.Show();
     this._activePanel = this._workerPanelReference;
 }
 public void ShowSpecs()
 {
     this._activePanel?.element.Hide();
     this._specsPanelReference.element.Show();
     this.SpecPanelUpdateInterface();
     this._activePanel = this._specsPanelReference;
 }
 public override void LayoutRebuilt(ParseXmlResult parseResult)
 {
     _workerMoneyLabelReference   = _workerMoneyLabelReference ?? this.XmlElementReference <Text>("moneyLabel");
     _workerPanelReference        = _workerPanelReference ?? this.XmlElementReference <XmlElement>("workerPanel");
     _specsPanelReference         = _specsPanelReference ?? this.XmlElementReference <XmlElement>("specsPanel");
     _shopPanelReference          = _shopPanelReference ?? this.XmlElementReference <XmlElement>("shopPanel");
     _messageBoxReference         = _messageBoxReference ?? this.XmlElementReference <XmlElement>("messageBox");
     _workerUnlockPanelReference  = _workerUnlockPanelReference ?? this.XmlElementReference <XmlElement>("workerUnlockPanel");
     _moneyUpgradeButtonReference = _moneyUpgradeButtonReference ??
                                    this.XmlElementReference <XmlElement>("UpgradeMoneyPercentage");
 }
Ejemplo n.º 4
0
        public override void LayoutRebuilt(ParseXmlResult parseResult)
        {
            // populate dataTable3 if necessary (this should only be once ever)
            if (dataTable3 == null)
            {
                dataTable3 = XmlElementReference <XmlLayoutDataTable>("dataTable3");
            }

            // Set the data of the dataTable directly
            dataTable3.element.SetData(myData3);
        }
Ejemplo n.º 5
0
        public static void StripExtraNamespaces(DocumentNode node)
        {
            XmlElementReference elementReference = node.SourceContext as XmlElementReference;

            if (elementReference == null)
            {
                return;
            }
            elementReference.RemoveMatchingAttributes((Func <XmlElementReference.Attribute, bool>)(attribute =>
            {
                if (attribute.Type != XmlElementReference.AttributeType.Compatibility)
                {
                    return(attribute.Type == XmlElementReference.AttributeType.Xmlns);
                }
                return(true);
            }));
        }
Ejemplo n.º 6
0
        void Start()
        {
            songList       = XmlElementReference <XmlElement>("songList");
            songTemplate   = XmlElementReference <XmlElement>("songTemplate");
            nowPlayingText = XmlElementReference <XmlElement>("nowPlayingText");
            bottom         = XmlElementReference <XmlElement>("bottom");

            // Add sample data if the list hasn't been populated in the inspector beforehand
            if (playList.Count == 0)
            {
                playList.Add(new Song("Song 1", "Artist 1", "Songs/1.mp3"));
                playList.Add(new Song("Song 2", "Artist 2", "Songs/2.mp3"));
                playList.Add(new Song("Song 3", "Artist 3", "Songs/3.mp3"));
                playList.Add(new Song("Song 4", "Artist 4", "Songs/4.mp3"));
                playList.Add(new Song("Song 5", "Artist 5", "Songs/5.mp3"));
            }

            foreach (var song in playList)
            {
                AddSong(song);
            }
        }
 void Awake()
 {
     // Populate the 'Apply' button reference.
     // (this requires a reference to the XmlLayout controller, so it can only be populated after the instance is created)
     applyButton = XmlElementReference <Button>("applyButton");
 }
 public void ShowShop()
 {
     this._activePanel?.element.Hide();
     this._shopPanelReference.element.Show();
     this._activePanel = this._shopPanelReference;
 }
Ejemplo n.º 9
0
 void Start()
 {
     progressBar = XmlElementReference <XmlLayoutProgressBar>("progressBar");
 }
 void Awake()
 {
     titleText   = XmlElementReference <Text>("titleText");
     messageText = XmlElementReference <Text>("messageText");
 }
    void Awake()
    {
        xmlLayout.Show();

        toggleGroup = XmlElementReference <XmlLayoutToggleGroup>("languageToggleGroup");
    }