// Cinema Suite 2014
using System;
namespace CinemaDirector
{
///
/// The Attribute for Cutscene Items
///
[AttributeUsage(AttributeTargets.Class)]
public class CutsceneItemAttribute : Attribute
{
private string subCategory; // Sub category for item
private string label; // Name of the item
private CutsceneItemGenre[] genres; // Genres that the item belongs to.
// Optional required object that the cutscene item should be paired with.
// Example: Audio Clip for audio track items.
private Type requiredObjectType;
///
/// The Cutscene Item attribute.
///
/// The user friendly name of the category this cutscene item belongs to.
/// The user friendly name of the cutscene item.
/// The genres that this Cutscene Item belongs to.
public CutsceneItemAttribute(string category, string label, params CutsceneItemGenre[] genres)
{
this.subCategory = category;
this.label = label;
this.genres = genres;
}
///
/// The Cutscene Item attribute.
///
/// The user friendly name of the category this cutscene item belongs to.
/// The user friendly name of the cutscene item.
/// Optional: required object to be paired with cutscene item.
/// The genres that this Cutscene Item belongs to.
public CutsceneItemAttribute(string category, string label, Type pairedObject, params CutsceneItemGenre[] genres)
{
this.subCategory = category;
this.label = label;
this.requiredObjectType = pairedObject;
this.genres = genres;
}
///
/// The category this cutscene item belongs in.
///
public string Category
{
get
{
return subCategory;
}
}
///
/// The name of this cutscene item.
///
public string Label
{
get
{
return label;
}
}
///
/// The genres that this cutscene item belongs to.
///
public CutsceneItemGenre[] Genres
{
get
{
return genres;
}
}
///
/// Get the type of the required object that this cutscene item should be paired with.
/// Null when there is no required object.
/// Example: AudioClip type for CinemaAudio.
///
public Type RequiredObjectType
{
get
{
return requiredObjectType;
}
}
}
}