Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Beatmap.hx
- class Beatmap
- {
- public var BPM:Float;
- public var tick:Float;
- public var prepareTime:Float;
- public var notes:Array;
- public var name:String;
- public var author:String;
- public var creator:String;
- public function new(name:String, author:String, creator:String, newBPM:Float, prepareTime:Float, notes:Array)
- {
- setBPM(newBPM);
- this.notes = notes;
- this.prepareTime = prepareTime;
- }
- public function setBPM(newBPM:Float) {
- BPM = newBPM;
- tick = BPM / 60;
- }
- }
- BeatmapParser.hx
- class BeatmapParser
- {
- public static function parse(path:String):Beatmap {
- var notes;
- var text:String = Assets.getText("data/" + path + "/notes.txt");
- var confs:String = Assets.getText("data/" + path + "/config.txt");
- var conf = confs.split("\n");
- notes = Reader.parseCsv(text, ":");
- trace(notes);
- return new Beatmap(conf[2], conf[1], conf[0], Std.parseFloat(conf[3]), Std.parseFloat(conf[4]), notes);
- }
- }
- Error:
- source/tk/castit/arrows/BeatmapParser.hx:18: characters 9-104 : tk.castit.arrows.Beatmap does not have a constructor
- source/tk/castit/arrows/BeatmapParser.hx:11: lines 11-19 : Missing return tk.castit.arrows.Beatmap
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement