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
import flixel.util.FlxColor; | |
import flixel.FlxSprite; | |
class Player extends FlxSprite { | |
// Whether the player is invicible or not | |
public var isInvincible:Bool; | |
//The amount of time to be invincible for in seconds | |
public static inline var INVINCIBLE_TIME:Float = 1.5; |
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
package game.states; | |
import game.ui.TextButton; | |
/* | |
* Custom Pause Scene I made for my game. | |
*/ | |
class PauseSubState extends FlxSubState { | |
public var pauseText:FlxText; | |
private var pauseExitSound:FlxSound; |
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
/** | |
* Basic example of a scene used in the tutorial for HaxeFlixel as well. | |
*/ | |
class PlayState extends FlxState { | |
override public function create() { | |
super.create(); | |
add(new FlxText('Hello World', 32).screenCenter()); | |
} | |
override public function update(elapsed:Float) { | |
super.update(elapsed); |
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
//Module Level Main entry point in Haxe 4.2.0 | |
function main() { | |
trace('Hello World'); | |
} |
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
//Example of a main entry point in Haxe before 4.2 | |
class Main { | |
public static function main() { | |
trace('Hello World'); | |
} | |
} |
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
package game; | |
class State { | |
public var currentState:Float -> Void; | |
public function new(initialState:Float -> Void) { | |
currentState = initialState; | |
} |
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 is a basic workflow to help you get started with Actions | |
name: Build Game | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: |
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
/** | |
* Update Code - HaxeFlixel | |
* Kino Rose | |
*/ | |
class CutsceneState extends FlxState { | |
//Code from Before | |
override public function update(elapsed:Float) { |
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
class CutsceneState extends FlxState { | |
//Additional code from before here | |
public static inline var TEXT_WIDTH:Int = 400 | |
override public function create() { | |
createSkip(); | |
createSceneText(); |
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
package; | |
//Imports for the FlxState | |
import flixel.addons.text.FlxTypeText; | |
import flixel.text.FlxText; | |
import flixel.FlxState; | |
// Type Information to create a delay that you want for each individual text that appears on screen | |
typedef SceneText = { | |
public var text:String; |