Exemplo n.º 1
0
        private void updateStats()
        {
            bool inLevel = LauncherWrapper.IsInLevel();

            if (!inLevel)
            {
                // Update FPS only
                ((CompoundItem)Items[0]).Items[0].Update();
                return;
            }
            else
            {
                // Update all stats
                int attributes = LauncherWrapper.GetPlayerAttributesLength();

                if (attributes != attributeLength)
                {
                    InitItems();
                }

                attributeLength = attributes;

                LauncherWrapper.updatePlayer();

                foreach (TreeItem item in Items)
                {
                    item.Update();
                }
            }
        }
Exemplo n.º 2
0
        public override void Update()
        {
            HitResult newValue = GetValue();

            if (isexpanded)
            {
                if (LauncherWrapper.IsInLevel())
                {
                    LauncherWrapper.updateEntity();
                }

                if (newValue != Value || expanded != isexpanded)
                {
                    updateHitStats(newValue);

                    NotifyPropertyChanged("Items");

                    expanded = isexpanded;
                }

                foreach (TreeItem item in Items)
                {
                    item.Update();
                }
            }

            Value = newValue;
            NotifyPropertyChanged("Value");
        }