Пример #1
0
        /// <summary>
        /// Draws the specified scene node
        /// </summary>
        /// <param name="node">The scene element</param>
        public void DrawNode(Scene2DNode node)
        {
            // get the screen position of the node
            Vector2 drawPosition = ApplyTransformations(node.Position);

            node.Draw(spriteRenderer, drawPosition);
        }
Пример #2
0
 /// <summary>
 /// Adds a node to the scene graph
 /// </summary>
 /// <param name="node">The node to add</param>
 public void AddToScene(Scene2DNode node)
 {
     if (node != null)
     {
         currentSceneList.Add(node);
     }
 }