Skip to content

Commit 4f46e72

Browse files
committed
Deliwar_0.1
- Bug Fixes - Extra Audio (foot steps, Attack VFX, Fight music) - Esc button (Reset the game and back to Main menu)
1 parent d27377f commit 4f46e72

20 files changed

Lines changed: 1117 additions & 41 deletions
106 KB
Binary file not shown.

‎LD53/Assets/Audio/Char SFX/Attack Hit Sound/attack4X.wav.meta‎

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
85.7 KB
Binary file not shown.

‎LD53/Assets/Audio/Char SFX/Box Walking/Walk5X.wav.meta‎

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎LD53/Assets/Code/ActionZone.cs‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.SceneManagement;
5+
using UnityEngine.UI;
6+
7+
public class ActionZone : MonoBehaviour
8+
{
9+
10+
AudioSource audioSource;
11+
public AudioClip audioClip;
12+
13+
void Start()
14+
{
15+
audioSource = GetComponent<AudioSource>();
16+
}
17+
18+
private void OnTriggerEnter2D(Collider2D collision)
19+
{
20+
audioSource.PlayOneShot(audioClip, 0.7F);
21+
}
22+
23+
void OnTriggerExit2D(Collider2D other)
24+
{
25+
audioSource.Stop();
26+
}
27+
28+
29+
30+
}

‎LD53/Assets/Code/ActionZone.cs.meta‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎LD53/Assets/Code/AttackVFX.cs‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using UnityEngine;
5+
6+
public class AttackVFX : MonoBehaviour
7+
{
8+
9+
AudioSource audioSource;
10+
public AudioClip attackA;
11+
12+
void Start()
13+
{
14+
audioSource = GetComponent<AudioSource>();
15+
}
16+
17+
void Update()
18+
{
19+
if (Input.GetKeyDown("f"))
20+
{
21+
22+
audioSource.PlayOneShot(attackA, 0.7F);
23+
}
24+
25+
}
26+
}

‎LD53/Assets/Code/AttackVFX.cs.meta‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎LD53/Assets/Code/BacktoMenu.cs‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,8 @@ public class BacktoMenu : MonoBehaviour
99

1010
public void Back()
1111
{
12-
//SceneManager.LoadScene("Menu_GameVictory");
13-
12+
SceneManager.LoadScene("Menu_Start");
1413
}
1514

1615

17-
private void OnTriggerEnter2D(Collider2D collision)
18-
{
19-
20-
SceneManager.LoadScene("Menu_GameVictory");
21-
22-
23-
}
24-
25-
26-
27-
28-
29-
3016
}

‎LD53/Assets/Code/HealthBar.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void SetDamage(int damage)
3838
{
3939
CurrentHealth = 0;
4040
OnDead?.Invoke();
41-
SceneManager.LoadScene("Menu_GameOver");
41+
4242
}
4343
healthSlider.value = CurrentHealth;
4444
}

0 commit comments

Comments
 (0)