Beispiel #1
0
        /// <summary>
        /// Create the product for this movableobject.
        /// </summary>
        /// <param name="scene">The scene to create the product into.</param>
        /// <param name="baseName">The base name of the MovableObject.</param>
        /// <returns>The newly created MovableObjectContainer or null if there was an error.</returns>
        internal MovableObjectContainer createProduct(OgreSceneManager scene, String baseName)
        {
            MovableObjectContainer movable = createActualProduct(scene, baseName);

            if (movable != null)
            {
                movable.MovableObject.setRenderQueueGroup(RenderQueue);
            }
            return(movable);
        }
Beispiel #2
0
 /// <summary>
 /// Add an Entity to the node. This will attach it to the SceneNode.
 /// </summary>
 /// <param name="identifier">The identifier of the Entity.</param>
 /// <param name="entity">The Entity to attach.</param>
 public void attachObject(MovableObjectDefinition definition)
 {
     if (!nodeObjects.ContainsKey(definition.Name))
     {
         MovableObjectContainer moveObj = definition.createProduct(scene, Owner.Name + Name);
         if (moveObj != null)
         {
             sceneNode.attachObject(moveObj.MovableObject);
             nodeObjects.Add(moveObj.DefinitionName, moveObj);
         }
     }
     else
     {
         Log.Default.sendMessage("Attempted to add another MovableObject to the node {0} named {1} that already exists. The second entry has been ignored.", LogLevel.Warning, "OgrePlugin", Owner.Name + Name, definition.Name);
     }
 }