using System;
using System.Collections.Generic;
using System.Text;
using Vortex.Resources;

namespace Vortex.SceneFramework {

	/// <summary>
	/// Domain component interface.
	/// Domain components - special kind of domain graph elements (nodes) which are rich user defined part of scenes.
	/// Domain component has Load/Unload methods which are invoked after domain is loaded or before unloaded. Also its properties/fields are scanned for [ResourceRef]/[ElementRef] annotations.
	/// This functionality could be used for creating game fields or other complex visual components
	/// </summary>
	public interface ISceneComponent {

		/// <summary>
		/// Invoked on domain component is loaded.
		/// </summary>
		/// <param name="resources">The domain resource collection.</param>
		void ComponentLoad(IResourceCollection resources);

		/// <summary>
		/// Invoked on domain component is loaded. Note, component should be attached to domain to receive this event on domain unload.
		/// </summary>
		void ComponentUnload();
	}
}
