module State1 {
    export class State1 extends Phaser.State {
        tasks: Array<Base.BasicGroup>;
        constructor() {
            super();
        }

        init(tasks) {
            this.tasks = tasks;
        }

        create() {
            for (var i = 0; i < this.tasks.length; i++) {
                this.tasks[i].create();
                this.add.existing(this.tasks[i]);
            }
        }

        preload() {
            this.game.load.spritesheet("key", "Graphics/GUI/key.png", 110, 110, 3);
            for (var i = 0; i < this.tasks.length; i++) {
                this.tasks[i].preload();
            }
        }
    }
}