generated from Joalor64GH/HaxeFlixel-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
585c987
commit 35938b5
Showing
10 changed files
with
297 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package game; | ||
|
||
class GameSprite extends FlxSprite { | ||
public function new(x:Float = 0, y:Float = 0) { | ||
super(x, y); | ||
antialiasing = SaveData.settings.antialiasing; | ||
} | ||
public function new(x:Float = 0, y:Float = 0) { | ||
super(x, y); | ||
antialiasing = SaveData.settings.antialiasing; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
package game; | ||
|
||
class Note extends GameSprite { | ||
public var dir:String = ''; // note direction | ||
public var type:String = ''; // receptor or plain note | ||
public var dir:String = ''; // note direction | ||
public var type:String = ''; // receptor or plain note | ||
|
||
public function new(x:Float, y:Float, dir:String, type:String) { | ||
super(x, y); | ||
public function new(x:Float, y:Float, dir:String, type:String) { | ||
super(x, y); | ||
|
||
this.dir = dir; | ||
this.type = type; | ||
this.dir = dir; | ||
this.type = type; | ||
|
||
loadGraphic(Paths.image('ui/note_$dir'), true, 200, 200); | ||
scale.set(0.6, 0.6); | ||
loadGraphic(Paths.image('ui/note_$dir'), true, 200, 200); | ||
scale.set(0.6, 0.6); | ||
|
||
animation.add("note", [0], 1); | ||
animation.add("press", [1], 1); | ||
animation.add("receptor", [2], 1); | ||
animation.add("note", [0], 1); | ||
animation.add("press", [1], 1); | ||
animation.add("receptor", [2], 1); | ||
|
||
animation.play((type == 'receptor') ? "receptor" : "note"); | ||
} | ||
animation.play((type == 'receptor') ? "receptor" : "note"); | ||
} | ||
|
||
public function press() { | ||
animation.play("press"); | ||
} | ||
public function press() { | ||
animation.play("press"); | ||
} | ||
} |
Oops, something went wrong.