public override Matrix Render(ref Matrix currentTransformation, BasicEffect effect, object parameter)
        {
            var matrix = base.Render(ref currentTransformation, effect, parameter);

            //if(Tile.Visible)
            teleport.Render(ref matrix, effect, parameter);

            return(matrix);
        }
        public override Matrix Render(ref Matrix currentTransformation, BasicEffect effect, object parameter)
        {
            var finalMatrix = base.Render(ref currentTransformation, effect, parameter);

            if (TileSide.TextVisible)
            {
                textRenderer.Render(ref finalMatrix, effect, parameter);
            }

            return(finalMatrix);
        }
Esempio n. 3
0
        public override Matrix Render(ref Matrix currentTransformation, BasicEffect effect, object parameter)
        {
            Matrix finalTransformation = transformation * GetCurrentTransformation(ref currentTransformation);

            base.Render(ref currentTransformation, effect, parameter);

            if (!Tile.Closing && !Tile.ContentActivated)
            {
                Tile.Door.Renderer.Render(ref finalTransformation, effect, parameter);
            }

            DrawModel(frameModel, ref finalTransformation, effect);

            if (Tile.HasButton)
            {
                buttonRenderer.Render(ref finalTransformation, effect, parameter);
                Matrix backButtonReversed = Matrix.CreateRotationY(MathHelper.Pi) * finalTransformation;
                buttonRenderer.Render(ref backButtonReversed, effect, parameter);
            }
            return(finalTransformation);
        }