Exemplo n.º 1
0
        //Texture productTexture;

        protected override void OnAttach()
        {
            base.OnAttach();

            //create window
            window = ControlDeclarationManager.Instance.CreateControl("Gui\\ProductLogoWindow.gui");
            Controls.Add(window);

            //productTexture = TextureManager.Instance.Load("Gui\\Various\\AKLogoNew.png", Texture.Type.Type2D);
            VideoBox videoBox = window.Controls["VideoBox"] as VideoBox;

            if (string.IsNullOrEmpty(videoBox.FileName) || videoBox.IsEndOfFile())
            {
                if (string.IsNullOrEmpty(videoBox.FileName))
                {
                    videoBox.FileName = "Gui\\Various\\akvideo2.ogv";
                }
                if (videoBox.IsEndOfFile())
                {
                    videoBox.Rewind();
                }
            }
            else
            {
                videoBox.FileName = "";
            }

            EngineApp.Instance.MouseRelativeMode = true;

            SoundWorld.Instance.SetListener(new Vec3(1000, 1000, 1000),
                                            Vec3.Zero, new Vec3(1, 0, 0), new Vec3(0, 0, 1));

            ResetTime();
        }
Exemplo n.º 2
0
        private void PlayVideo_Click(Button sender)
        {
            VideoBox videoBox = window.Controls["VideoBox"] as VideoBox;

            if (string.IsNullOrEmpty(videoBox.FileName) || videoBox.IsEndOfFile())
            {
                if (string.IsNullOrEmpty(videoBox.FileName))
                {
                    videoBox.FileName = "_ResourceEditorSamples\\Video\\Test.ogv";
                }
                if (videoBox.IsEndOfFile())
                {
                    videoBox.Rewind();
                }
            }
            else
            {
                videoBox.FileName = "";
            }
        }