-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
5 changed files
with
111 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Create .love file and build to .exe | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-love: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install zip utility | ||
run: sudo apt-get install zip -y | ||
|
||
- name: Create .love file | ||
run: | | ||
zip -r game.love * | ||
mv game.love ${GITHUB_REPOSITORY#*/}-$(date +%Y%m%d%H%M%S).love | ||
- name: Upload .love file as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: .LOVE file | ||
path: | | ||
*.love | ||
convert-love: | ||
runs-on: ubuntu-latest | ||
needs: create-love | ||
|
||
steps: | ||
- name: Download .love file from previous job | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: .LOVE file | ||
path: . | ||
|
||
- name: Install zip utility | ||
run: sudo apt-get install zip -y | ||
|
||
- name: Download LOVE.exe | ||
run: | | ||
mkdir love | ||
cd love | ||
curl -L -o love-win.zip https://github.com/love2d/love/releases/download/11.5/love-11.5-win64.zip | ||
unzip love-win.zip | ||
mv love-11.5-win64/* . | ||
cd .. | ||
- name: Create .exe file | ||
run: | | ||
cp love/love.exe game.exe | ||
cat ${GITHUB_REPOSITORY#*/}-*.love >> game.exe | ||
cp love/*.dll . | ||
- name: Upload .exe file as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Game Build | ||
path: | | ||
game.exe | ||
*.dll |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
local utils = {} | ||
|
||
function utils:CheckCollision(x1, y1, w1, h1, x2, y2, w2, h2) | ||
return x1 < x2+w2 and | ||
x2 < x1+w1 and | ||
y1 < y2+h2 and | ||
y2 < y1+h1 | ||
end | ||
|
||
return utils |