playerlives
more additions
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerLives : MonoBehaviour
|
||||
@@ -11,10 +12,15 @@ public class PlayerLives : MonoBehaviour
|
||||
{
|
||||
currentLives = maxLives;
|
||||
}
|
||||
else //add more gamemodes and their lives here
|
||||
if (GameManager.gameMode == GameManager.GameMode.keepAway)
|
||||
{
|
||||
currentLives = 0;
|
||||
currentLives = 1;
|
||||
}
|
||||
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
|
||||
{
|
||||
currentLives = 1;
|
||||
}
|
||||
//add more gamemodes and their lives here
|
||||
}
|
||||
public void PlayerDied()
|
||||
{
|
||||
@@ -30,6 +36,14 @@ public class PlayerLives : MonoBehaviour
|
||||
RespawnPlayer();
|
||||
}
|
||||
}
|
||||
if (GameManager.gameMode == GameManager.GameMode.keepAway)
|
||||
{
|
||||
|
||||
}
|
||||
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
private void RespawnPlayer()
|
||||
{
|
||||
|
||||
16
Assets/Scripts/UseItem.cs
Normal file
16
Assets/Scripts/UseItem.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class UseItem : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UseItem.cs.meta
Normal file
2
Assets/Scripts/UseItem.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 861b3bde023ca7f48a72c48ef9ee25d2
|
||||
Reference in New Issue
Block a user