Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private KeywordFlag keyword = KeywordFlag.None;
- /// <summary>
- /// The data of the editor camera. We save last position in editor and so on.
- /// </summary>
- private GraphicalInterface.Utility.EditorCameraData editorCameraData;
- /// <summary>
- /// The last date that the project was edited.
- /// </summary>
- private GraphicalInterface.Utility.Date lastEditedDate;
- //// TODO: Add information about how many bytes the Project file will be, this way we can check when reading if we are getting the correct Project and a valid one.
- /// <summary>
- /// Constructor, initializes the ProjectMetaData with the given values.
- /// </summary>
- /// <param name="json">All text-based data to store.</param>
- /// <param name="byteArray">All binary-based data to store.</param>
- public ProjectMetaData(string json, byte[] byteArray)
- {
- this.name = defaultProjectName;
- this.Deserialize(JToken.Parse(json), new BinaryCollectionArray(ref byteArray));
- }
- /// <summary>
- /// A normal constructor. So that we can create empty ProjectMetaData which we can pass in methods.
- /// </summary>
- public ProjectMetaData()
- {
- this.name = defaultProjectName;
- // This does nothing and should never be the end result, but is used at some spots where we for example want to pass an empty ProjectMetaData inside a function.
- this.localThumbnail = PaperEngine.GraphicalInterface.UIManager.Instance.ProjectDefaultThumbnail;
- }
- /// <summary>
- /// Enum for denoting genre.
- /// </summary>
- [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
- public enum Genre
- {
- [System.Runtime.Serialization.EnumMember(Value = "Platformer")]
- Platformer,
- [System.Runtime.Serialization.EnumMember(Value = "Racing")]
- Racing
- }
- /// <summary>
- /// The project type.
- /// </summary>
- public enum ProjectType
- {
- ADVANCED, // This one is placed as first element to support old levels which didn't have this feature (default value).
- CLASSIC
- }
- public enum KeywordFlag : uint
- {
- None = 0U,
- IntroEditorTutorial = 1U << 0,
- }
- public KeywordFlag Keyword
- {
- get
- {
- return this.keyword;
- }
- set
- {
- this.keyword = value;
- }
- }
- public bool ContainsKeyword(KeywordFlag keyword)
- {
- return (this.keyword & keyword) == keyword;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement