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
@override | |
bool onKeyEvent(RawKeyEvent event, Set<LogicalKeyboardKey> keysPressed) { | |
final isKeyUp = event is RawKeyUpEvent; | |
// | |
if (isKeyUp) { | |
if (current == PlayerState.right || current == PlayerState.left || current == PlayerState.jump) { | |
stop(); | |
current = PlayerState.regular; | |
} | |
} |
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
enum PlayerState { regular, duck, left, right, jump, hit, shoot } | |
... | |
@override | |
Future<void> onLoad() async { | |
await super.onLoad(); | |
await _loadCharacterSprites(); |
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
// Added World | |
import 'package:flame/components.dart'; | |
import 'package:flame/parallax.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_flame_showcase/main.dart'; | |
class MkWorld extends ParallaxComponent<MortalKombat> { | |
@override | |
Future<void> onLoad() async { |
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
void main() { | |
runApp(const MortalKombatGame()); | |
} | |
class MortalKombatGame extends StatefulWidget { | |
const MortalKombatGame({super.key}); | |
@override | |
State<MortalKombatGame> createState() => _MortalKombatGameState(); | |
} |
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
rm -Rf ios/Pods && \ | |
rm -Rf ios/.symlinks && \ | |
rm -Rf ios/Flutter/Flutter.framework && \ | |
rm -Rf ios/Flutter/Flutter.podspec && \ | |
rm -rf ~/.pub-cache && \ | |
fvm flutter pub get && \ | |
cd ios && fvm flutter precache --ios && pod install --repo-update && cd .. |
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
cd android && fastlane deploy_beta --env production && cd ../ios && fastlane deploy_beta --env production && cd .. |
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
#Ruby version | |
ruby_version("3.0.2") | |
# Uncomment the line if you want fastlane to automatically update itself | |
# update_fastlane | |
fastlane_require 'dotenv' | |
default_platform(:ios) |
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
IOS_SCHEME = "prod" | |
IOS_BUNDLE_IDENTIFIER="app.name.io" | |
IOS_FIREBASE_APP_DISTRIBUTION_APP="1:299788468872:ios:2bbe7asdasdaasd0f6034dd553d" | |
IOS_FIREBASE_APP_DISTRIBUTION_RELEASE_NOTES="Test Deployment" | |
IOS_FIREBASE_APP_DISTRIBUTION_TESTERS="vedran@qedcode.io" | |
IOS_FIREBASE_APP_DISTRIBUTION_CREDENTIALS_FILE_PATH="$PWD/fastlane/google-creds-prod.json" | |
FLUTTER_VERSION=3.3.5 | |
# Apple team ID | |
IOS_TEAM_ID='UDW7676AD' |
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
fastlane deploy_beta --env production |
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
ANDROID_SCHEME = "prod" | |
# App identifier | |
ANDROID_BUNDLE_IDENTIFIER="app.name.prod" | |
# Firebase app id (you can find it in project settings) | |
ANDROID_FIREBASE_APP_DISTRIBUTION_APP="1:299788468872:android:234234234234234" | |
# Release Notes | |
ANDROID_FIREBASE_APP_DISTRIBUTION_RELEASE_NOTES="Test Deployment" | |
# Testers, separate with comma | |
ANDROID_FIREBASE_APP_DISTRIBUTION_TESTERS="vedran.balagovic@gmail.com" | |
# Path to google credentials file |
NewerOlder