Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc973b9f0d | |||
| 8a552f7993 | |||
| 93841bc85d | |||
| 9ba8847626 |
@@ -36,7 +36,7 @@ jobs:
|
||||
upload-report: false
|
||||
|
||||
- name: Upload test report
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v3-node20
|
||||
with:
|
||||
name: Test Report
|
||||
path: ${{ github.workspace }}/reports/test-result.html
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
upload-report: false
|
||||
|
||||
- name: Upload test report
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v3-node20
|
||||
with:
|
||||
name: Test Report
|
||||
path: ${{ github.workspace }}/reports/test-result.html
|
||||
@@ -90,25 +90,27 @@ jobs:
|
||||
mkdir -v -p build/windows
|
||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
||||
zip -r Windows.zip build/windows
|
||||
ls -la
|
||||
pwd
|
||||
echo ${{ github.workspace }}
|
||||
|
||||
- uses: Oval-Tutu/publish-to-itch-with-butler@v1
|
||||
with:
|
||||
api-key: ${{ secrets.BUTLER_TOKEN }}
|
||||
itch_user: ${{ env.ITCHIO_USERNAME }}
|
||||
itch_game: ${{ env.ITCHIO_GAMEID }}
|
||||
channel: windows
|
||||
package: Windows.zip
|
||||
version: ${{ needs.BumpTag.outputs.tag_name }}
|
||||
|
||||
# - name: Upload to Itch
|
||||
# uses: KikimoraGames/itch-publish@v0.0.3
|
||||
# with:
|
||||
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
|
||||
# itchUsername: ${{ env.ITCHIO_USERNAME }}
|
||||
# itchGameId: ${{ env.ITCHIO_GAMEID }}
|
||||
# buildNumber: 0.1.0 # ${{ needs.BumpTag.outputs.tag_name }}
|
||||
# gameData: ${{ github.workspace }}/Windows.zip
|
||||
# buildChannel: windows
|
||||
- name: Setup Butler
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
mkdir ./tools 2>/dev/null || true
|
||||
pushd tools
|
||||
curl -sSLfo ./butler.zip "https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default"
|
||||
unzip butler.zip
|
||||
chmod +x ./butler
|
||||
popd
|
||||
./tools/butler -V
|
||||
|
||||
- name: Upload to itch.io
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
versionArgument="--userversion ${{ needs.BumpTag.outputs.tag_name }}"
|
||||
./tools/butler push \
|
||||
"Windows.zip" \
|
||||
${{ env.ITCHIO_USERNAME }}/${{ env.ITCHIO_GAMEID }}:windows ${versionArgument}
|
||||
|
||||
|
||||
@@ -40,64 +40,77 @@ jobs:
|
||||
uses: https://git.game-dev.space/minimata/setup-godot.git@main
|
||||
with:
|
||||
godot-version: '4.6'
|
||||
dotnet-version: 'net9.0'
|
||||
dotnet-version: 'net9.0'
|
||||
|
||||
- name: Setup Butler
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
mkdir ./tools 2>/dev/null || true
|
||||
pushd tools
|
||||
curl -sSLfo ./butler.zip "https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default"
|
||||
unzip butler.zip
|
||||
chmod +x ./butler
|
||||
popd
|
||||
./tools/butler -V
|
||||
|
||||
- name: Build Windows
|
||||
run: |
|
||||
mkdir -v -p build/windows
|
||||
godot --headless --verbose --build-solutions --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
||||
zip -r Windows.zip build/windows
|
||||
- name: Upload to Itch
|
||||
uses: KikimoraGames/itch-publish@v0.0.3
|
||||
with:
|
||||
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
|
||||
itchUsername: ${{ env.ITCHIO_USERNAME }}
|
||||
itchGameId: ${{ env.ITCHIO_GAMEID }}
|
||||
buildNumber: ${{ needs.ReleaseName.outputs.release_name }}
|
||||
gameData: Windows.zip
|
||||
buildChannel: windows
|
||||
- name: Upload Windows to itch.io
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
versionArgument="--userversion ${{ needs.ReleaseName.outputs.release_name }}"
|
||||
./tools/butler push \
|
||||
"Windows.zip" \
|
||||
${{ env.ITCHIO_USERNAME }}/${{ env.ITCHIO_GAMEID }}:windows ${versionArgument}
|
||||
|
||||
- name: Build Windows ARM
|
||||
run: |
|
||||
mkdir -v -p build/windowsArm
|
||||
godot --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
|
||||
zip -r WindowsArm.zip build/windowsArm
|
||||
- name: Upload to Itch
|
||||
uses: KikimoraGames/itch-publish@v0.0.3
|
||||
with:
|
||||
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
|
||||
itchUsername: ${{ env.ITCHIO_USERNAME }}
|
||||
itchGameId: ${{ env.ITCHIO_GAMEID }}
|
||||
buildNumber: ${{ needs.ReleaseName.outputs.release_name }}
|
||||
gameData: WindowsArm.zip
|
||||
buildChannel: windows-arm
|
||||
- name: Upload Windows to itch.io
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
versionArgument="--userversion ${{ needs.ReleaseName.outputs.release_name }}"
|
||||
./tools/butler push \
|
||||
"WindowsArm.zip" \
|
||||
${{ env.ITCHIO_USERNAME }}/${{ env.ITCHIO_GAMEID }}:windows-arm ${versionArgument}
|
||||
|
||||
- name: Linux Build
|
||||
run: |
|
||||
mkdir -v -p build/linux
|
||||
godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
|
||||
zip -r Linux.zip build/linux
|
||||
- name: Upload to Itch
|
||||
uses: KikimoraGames/itch-publish@v0.0.3
|
||||
with:
|
||||
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
|
||||
itchUsername: ${{ env.ITCHIO_USERNAME }}
|
||||
itchGameId: ${{ env.ITCHIO_GAMEID }}
|
||||
buildNumber: ${{ needs.ReleaseName.outputs.release_name }}
|
||||
gameData: Linux.zip
|
||||
buildChannel: linux
|
||||
- name: Upload Windows to itch.io
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
versionArgument="--userversion ${{ needs.ReleaseName.outputs.release_name }}"
|
||||
./tools/butler push \
|
||||
"Linux.zip" \
|
||||
${{ env.ITCHIO_USERNAME }}/${{ env.ITCHIO_GAMEID }}:linux ${versionArgument}
|
||||
|
||||
- name: Mac Build
|
||||
run: |
|
||||
mkdir -v -p build/mac
|
||||
godot --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
|
||||
zip -r Mac.zip build/mac
|
||||
- name: Upload to Itch
|
||||
uses: KikimoraGames/itch-publish@v0.0.3
|
||||
with:
|
||||
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
|
||||
itchUsername: ${{ env.ITCHIO_USERNAME }}
|
||||
itchGameId: ${{ env.ITCHIO_GAMEID }}
|
||||
buildNumber: ${{ needs.ReleaseName.outputs.release_name }}
|
||||
gameData: Mac.zip
|
||||
buildChannel: mac
|
||||
- name: Upload Windows to itch.io
|
||||
shell: bash
|
||||
env:
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||
run: |
|
||||
versionArgument="--userversion ${{ needs.ReleaseName.outputs.release_name }}"
|
||||
./tools/butler push \
|
||||
"Mac.zip" \
|
||||
${{ env.ITCHIO_USERNAME }}/${{ env.ITCHIO_GAMEID }}:mac ${versionArgument}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_heart.png")]
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_heart.png")]
|
||||
public partial class CHealthbar : Sprite3D
|
||||
{
|
||||
private Healthbar _healthbar;
|
||||
|
||||
@@ -26,10 +26,10 @@ metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||
|
||||
[node name="Main" unique_id=1551129541 instance=ExtResource("1_w4y6q")]
|
||||
|
||||
[node name="BackgroundMusicPlayer" parent="." index="0"]
|
||||
[node name="BackgroundMusicPlayer" parent="." index="0" unique_id=879496303]
|
||||
autoplay = false
|
||||
|
||||
[node name="Player" parent="." index="5"]
|
||||
[node name="Player" parent="." index="5" unique_id=1309399929]
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 2, 1.5, 9.5)
|
||||
|
||||
[node name="Greybox" type="CSGCombiner3D" parent="." index="7" unique_id=646927976]
|
||||
@@ -125,18 +125,19 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 7, -16)
|
||||
Target = NodePath("../Player")
|
||||
RMovement = SubResource("Resource_xixm3")
|
||||
|
||||
[node name="GroundedSpawner" parent="." index="14" unique_id=557145011 instance=ExtResource("7_ba7rw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.5, -15)
|
||||
[node name="GroundedSpawner" parent="." index="14" unique_id=557145011 node_paths=PackedStringArray("Target") instance=ExtResource("7_ba7rw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2.5, -15)
|
||||
EnemyToSpawn = ExtResource("4_5mjy0")
|
||||
MovementInputs = ExtResource("8_cdhvi")
|
||||
HealthInputs = SubResource("Resource_epn1o")
|
||||
DamageInputs = ExtResource("10_xyaoo")
|
||||
Target = NodePath("../Player")
|
||||
IsActiveOnStart = false
|
||||
|
||||
[node name="FlyingSpawner" parent="." index="15" unique_id=974076606 instance=ExtResource("7_ba7rw")]
|
||||
[node name="FlyingSpawner" parent="." index="15" unique_id=974076606 node_paths=PackedStringArray("Target") instance=ExtResource("7_ba7rw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
|
||||
EnemyToSpawn = ExtResource("6_xuqf0")
|
||||
MovementInputs = ExtResource("11_yug0s")
|
||||
HealthInputs = ExtResource("12_qgrw7")
|
||||
DamageInputs = ExtResource("13_qulje")
|
||||
IsActiveOnStart = false
|
||||
Target = NodePath("../Player")
|
||||
|
||||
@@ -22,21 +22,14 @@ public partial class Spawner : Node3D
|
||||
[Export]
|
||||
public bool IsActiveOnStart { get; set; } = true;
|
||||
|
||||
private float _spawnTimer;
|
||||
private bool _isActive;
|
||||
private Timer _timer;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_isActive = IsActiveOnStart;
|
||||
_spawnTimer = SpawnInterval;
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!_isActive) return;
|
||||
|
||||
_spawnTimer -= (float) delta;
|
||||
if (_spawnTimer <= 0) Spawn();
|
||||
_timer = GetNode<Timer>("Timer");
|
||||
_timer.WaitTime = SpawnInterval;
|
||||
_timer.Timeout += Spawn;
|
||||
if (IsActiveOnStart) StartSpawning();
|
||||
}
|
||||
|
||||
public void Spawn()
|
||||
@@ -44,27 +37,24 @@ public partial class Spawner : Node3D
|
||||
if (EnemyToSpawn == null || !EnemyToSpawn.CanInstantiate()) return;
|
||||
|
||||
if (EnemyToSpawn.Instantiate() is not Enemy spawnedInstance) return;
|
||||
|
||||
|
||||
GetTree().GetCurrentScene().AddChild(spawnedInstance);
|
||||
spawnedInstance.GlobalPosition = GlobalPosition;
|
||||
|
||||
spawnedInstance.Target = Target;
|
||||
spawnedInstance.RMovement = MovementInputs;
|
||||
spawnedInstance.RDamage = DamageInputs;
|
||||
spawnedInstance.RHealth = HealthInputs;
|
||||
spawnedInstance.Initialize();
|
||||
|
||||
GetTree().GetCurrentScene().AddChild(spawnedInstance);
|
||||
spawnedInstance.GlobalPosition = GlobalPosition;
|
||||
|
||||
_spawnTimer = SpawnInterval;
|
||||
}
|
||||
|
||||
public void StartSpawning()
|
||||
{
|
||||
_isActive = true;
|
||||
_spawnTimer = SpawnInterval;
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
public void StopSpawning()
|
||||
{
|
||||
_isActive = false;
|
||||
_timer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,3 +6,5 @@
|
||||
script = ExtResource("1_2otbo")
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="." unique_id=610854505]
|
||||
|
||||
[node name="Timer" type="Timer" parent="." unique_id=1842357493]
|
||||
|
||||
Reference in New Issue
Block a user