From eceeb4163ec58077e4323ad12d3ba5f7db4b11bf Mon Sep 17 00:00:00 2001 From: HackDev <80620538+Hackx2@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:13:43 +0000 Subject: [PATCH] Revert "3 wwqfd" This reverts commit 3af2ad51e39e16202fd7936bf1f01f1079e86e3c. --- .github/workflows/main.yml | 13 ++++----- Preloader.hx | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 Preloader.hx diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c90c750..835e217a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,3 @@ - # This is a basic workflow to help you get started with Actions name: Build @@ -7,9 +6,9 @@ name: Build on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ main, experimental ] + branches: [main, experimental] pull_request: - branches: [ main, experimental ] + branches: [main, experimental] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -43,14 +42,12 @@ jobs: - name: Create Version Tag run: echo "${{github.run_id}}" > VERSION - name: Compile - run: | - haxelib fixrepo - haxelib run lime build Project.xml linux --app-version="4.0.0-${{ github.run_id}}" + run: haxelib run lime build Project.xml linux --app-version="4.0.0-${{ github.run_id}}" - name: Publish Artifact uses: actions/upload-artifact@v2.2.4 with: name: linuxBuild - path: 'export/release/linux/bin' + path: "export/release/linux/bin" #--- buildWindows: runs-on: windows-latest @@ -108,4 +105,4 @@ jobs: uses: actions/upload-artifact@v2.2.4 with: name: macBuild - path: export/release/macos/bin \ No newline at end of file + path: export/release/macos/bin diff --git a/Preloader.hx b/Preloader.hx new file mode 100644 index 00000000..c979c9c7 --- /dev/null +++ b/Preloader.hx @@ -0,0 +1,57 @@ +package ; + +import flixel.system.FlxBasePreloader; +import openfl.display.Sprite; +import flash.display.Bitmap; +import flash.display.BitmapData; +import flash.display.BlendMode; +import flash.display.Sprite; +import flash.Lib; +import flixel.FlxG; + +@:bitmap("art/preloaderArt.png") class LogoImage extends BitmapData { } + +class Preloader extends FlxBasePreloader +{ + public function new(MinDisplayTime:Float=3, ?AllowedURLs:Array) + { + super(MinDisplayTime, AllowedURLs); + } + + var logo:Sprite; + + override function create():Void + { + this._width = Lib.current.stage.stageWidth; + this._height = Lib.current.stage.stageHeight; + + var ratio:Float = this._width / 2560; //This allows us to scale assets depending on the size of the screen. + + logo = new Sprite(); + logo.addChild(new Bitmap(new LogoImage(0,0))); //Sets the graphic of the sprite to a Bitmap object, which uses our embedded BitmapData class. + logo.scaleX = logo.scaleY = ratio; + logo.x = ((this._width) / 2) - ((logo.width) / 2); + logo.y = (this._height / 2) - ((logo.height) / 2); + addChild(logo); //Adds the graphic to the NMEPreloader's buffer. + + super.create(); + } + + override function update(Percent:Float):Void + { + if(Percent < 69) + { + logo.scaleX += Percent / 1920; + logo.scaleY += Percent / 1920; + logo.x -= Percent * 0.6; + logo.y -= Percent / 2; + }else{ + logo.scaleX = this._width / 1280; + logo.scaleY = this._width / 1280; + logo.x = ((this._width) / 2) - ((logo.width) / 2); + logo.y = (this._height / 2) - ((logo.height) / 2); + } + + super.update(Percent); + } +} \ No newline at end of file