Esempio n. 1
0
 /// <summary>
 /// Constructs a new component of the specified type and adds it to the internal component list.
 /// </summary>
 /// <param name="type">Type of component to create.</param>
 /// <returns>Instance of the new component.</returns>
 public Component AddComponent(Type type)
 {
     return(Component.Internal_AddComponent(this, type));
 }
Esempio n. 2
0
 /// <summary>
 /// Constructs a new component of the specified type and adds it to the internal component list.
 /// </summary>
 /// <typeparam name="T">Type of component to create.</typeparam>
 /// <returns>Instance of the new component.</returns>
 public T AddComponent <T>() where T : Component
 {
     return((T)Component.Internal_AddComponent(this, typeof(T)));
 }