FuckingDescription.ts 583 B

12345678910111213141516171819
  1. /// <reference path="../ContentDescription.ts" />
  2. class FuckingDescription extends ContentDescription {
  3. public static DESCRIPTIONS = [];
  4. public constructor (name : string) {
  5. super(name, new ContentGroup());
  6. FuckingDescription.DESCRIPTIONS.push(this);
  7. }
  8. public addUnit () {
  9. let unit = new FuckingUnit();
  10. (<ContentGroup> this.group).addUnit(unit);
  11. return unit;
  12. }
  13. public static getDescription (target : ContentGroup) {
  14. return ContentDescription.pickDescriptions(FuckingDescription.DESCRIPTIONS, target);
  15. }
  16. }