コード例 #1
0
        /// <inheritdoc />
        public override void DrawShapes(SceneBatch sceneBatch)
        {
            if (containsShapes && Actor.Physics.Type != PhysicsComponent.BodyPhysicsType.None)
            {
                Color color = ColorSettings.ForShape(SceneSelect);

                foreach (Shape shape in Shapes)
                {
                    sceneBatch.Draw(shape, color, 0f);
                }
            }
        }
コード例 #2
0
        /// <inheritdoc />
        /// <remarks>
        /// Before drawing the appearance of the actor is updated, if needed.
        /// Draws the actor and its bounding rectangle.
        /// </remarks>
        public override void Draw(SceneBatch sceneBatch)
        {
            if (updateAppearance)
            {
                UpdateAppearance();
                updateAppearance = false;
            }

            if (Actor.DrawableAssetVisible && sceneDrawable != null)
            {
                sceneDrawable.Draw(sceneBatch, Position, Angle, ScaleFactor, Actor.Layer != null ? Actor.Layer.GraphicsEffect : SceneElementEffect.None);
            }

            sceneBatch.Draw(Rectangle, ColorSettings.ForBounds(SceneSelect), 0);
        }
コード例 #3
0
        /// <inheritdoc />
        /// <remarks>
        /// Draws the path and its bounding rectangle.
        /// </remarks>
        public override void Draw(SceneBatch sceneBatch)
        {
            sceneBatch.Draw(Rectangle, ColorSettings.ForBounds(SceneSelect), 0f);

            sceneBatch.Draw(pathShape, ColorSettings.ForShape(SceneSelect), 0f);
        }