Skip to content

Commit

Permalink
Merge pull request #2 from JanGross/dev
Browse files Browse the repository at this point in the history
Merge final changes into master
  • Loading branch information
JanGross authored May 11, 2022
2 parents c539841 + 330782b commit a92e644
Show file tree
Hide file tree
Showing 15 changed files with 385 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/activation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Acquire activation file
on:
workflow_dispatch: {}
jobs:
activation:
name: Request manual activation file
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
54 changes: 54 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Actions

on: [pull_request]

jobs:
build:
name: Build project
runs-on: ubuntu-latest
steps:
# Checkout (without LFS)
- name: Checkout repository
uses: actions/checkout@v2

# Git LFS
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}

- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard
# Cache
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL

# Output
- uses: actions/upload-artifact@v2
with:
name: Build
path: build

132 changes: 131 additions & 1 deletion Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,134 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 619783808}
m_CullTransparentMesh: 1
--- !u!1 &701875521
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 701875522}
- component: {fileID: 701875523}
m_Layer: 0
m_Name: DamageSound
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &701875522
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 701875521}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2036477790}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &701875523
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 701875521}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 9f3c3c28564416d49b2e71899119032d, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &733797115
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1714,7 +1842,7 @@ ParticleSystem:
ringBufferLoopRange: {x: 0, y: 1}
emitterVelocityMode: 1
looping: 1
prewarm: 1
prewarm: 0
playOnAwake: 1
useUnscaledTime: 0
autoRandomSeed: 1
Expand Down Expand Up @@ -6564,6 +6692,7 @@ MonoBehaviour:
direction: 0
speedIncrease: 1
isLit: 0
damageSfx: {fileID: 701875523}
camera: {fileID: 85715039}
--- !u!65 &1153618774
BoxCollider:
Expand Down Expand Up @@ -7597,6 +7726,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 765275277}
- {fileID: 701875522}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
10 changes: 5 additions & 5 deletions Assets/Scenes/Menu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ RectTransform:
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
Expand Down Expand Up @@ -858,7 +858,7 @@ RectTransform:
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
Expand Down Expand Up @@ -998,7 +998,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1607933371
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1213,7 +1213,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Creative and unique game title
m_text: Lightcycle
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: e73a58f6e2794ae7b1b7e50b7fb811b0, type: 2}
Expand Down Expand Up @@ -1306,7 +1306,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1706518355
RectTransform:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Core/ScoreboardManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ IEnumerator SendScoreToServer()
form.AddField("username", username);
form.AddField("score", playerScore);
form.AddField("additional_data", additional_data);
using (UnityWebRequest www = UnityWebRequest.Post("http://vps5.minzkraut.com:3030/scores", form))
using (UnityWebRequest www = UnityWebRequest.Post("https://bhj22sb.minzkraut.com/scores", form))
{
yield return www.SendWebRequest();

Expand All @@ -89,7 +89,7 @@ IEnumerator SendScoreToServer()

IEnumerator GetScores()
{
using (UnityWebRequest webRequest = UnityWebRequest.Get("http://vps5.minzkraut.com:3030/scores"))
using (UnityWebRequest webRequest = UnityWebRequest.Get("https://bhj22sb.minzkraut.com/scores"))
{
// Request and wait for the desired page.
yield return webRequest.SendWebRequest();
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/Game/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class Player : MonoBehaviour
public List<ParticleCollisionEvent> collisionEvents;
public float speedIncrease;
public bool isLit;
public AudioSource damageSfx;

public Camera camera;

Expand Down Expand Up @@ -65,6 +66,7 @@ void Update()
if (isLit && Time.timeSinceLevelLoad > 2)
{
health -= 100.0f * Time.deltaTime;
damageSfx.Play();
}

//if health below 0 die
Expand Down
3 changes: 3 additions & 0 deletions Assets/Sfx/Damaged.wav
Git LFS file not shown
22 changes: 22 additions & 0 deletions Assets/Sfx/Damaged.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/WebGLTemplates.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/WebGLTemplates/BetterMinimal.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a92e644

Please sign in to comment.