Ejemplo n.º 1
0
        public void Setup(Overlay parent)
        {
            _parent          = parent;
            _internalOverlay = new InternalOverlay("vrub." + _parent.DerivedKey + ".models." + Key, "", Meters, true);

            if (Absolute)
            {
                _internalOverlay.SetAttachment(AttachmentType.Absolute, Position, Rotation);
            }
            else
            {
                _internalOverlay.SetAttachment(AttachmentType.Overlay, Position, Rotation, ParentKey == null ? "vrub." + _parent.DerivedKey : ParentKey);
            }

            _internalOverlay.SetTextureSize(1, 1);
            _internalOverlay.ToggleInput(false);

            if (!_generatedOnePixelTexture)
            {
                GenerateOnePixelTexture(Width, Height);
            }

            if (Animations != null && Animations.Count > 0)
            {
                foreach (RenderModelAnimation anim in Animations)
                {
                    anim.GetFrames(parent.BasePath);
                }
            }

            if (StartingAnimation != null)
            {
                SetAnimation(StartingAnimation);
            }
            else
            {
                UpdateModel(ModelFile);
            }

            _internalOverlay.Show();
        }
Ejemplo n.º 2
0
 public void DestroyDashboardOverlay()
 {
     _dashboardOverlay.Destroy();
     _dashboardOverlay = null;
 }
Ejemplo n.º 3
0
 public void CreateInGameOverlay()
 {
     _inGameOverlay = new Overlay("ingame." + _overlayKey, _overlayName, 2.0f, true);
     _inGameOverlay.Show();
 }
Ejemplo n.º 4
0
 public void DestroyInGameOverlay()
 {
     _inGameOverlay.Destroy();
     _inGameOverlay = null;
 }
Ejemplo n.º 5
0
 public void CreateDashboardOverlay()
 {
     _dashboardOverlay = new Overlay("dashboard." + _overlayKey, _overlayName, 2.0f, false);
     _dashboardOverlay.SetTextureSize(_windowWidth, _windowHeight);
     //_dashboardOverlay.Show();
 }