Compare commits
No commits in common. "3ac2466bd46b9de79f7c42483cb82f6c22bc9f61" and "10e5c818abd4563c9ca6a979b23a272b258a35ed" have entirely different histories.
3ac2466bd4
...
10e5c818ab
|
@ -372,7 +372,6 @@ GameObject:
|
|||
- component: {fileID: 1111096819}
|
||||
- component: {fileID: 1111096818}
|
||||
- component: {fileID: 1111096817}
|
||||
- component: {fileID: 1111096820}
|
||||
m_Layer: 5
|
||||
m_Name: Returnbtn
|
||||
m_TagString: Untagged
|
||||
|
@ -443,20 +442,7 @@ MonoBehaviour:
|
|||
m_TargetGraphic: {fileID: 1111096818}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1111096820}
|
||||
m_TargetAssemblyTypeName: GameOverMainMenuReturnerButtonScriptForLoadingTheMainMenuSceneOnceAPlayerHasDiedAndHasThenPressedTheMainMenuButtonOnTheGameOverScreen,
|
||||
Assembly-CSharp
|
||||
m_MethodName: r
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_Calls: []
|
||||
--- !u!114 &1111096818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -495,18 +481,6 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1111096815}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1111096820
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1111096815}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ebc1ff2ca6301ea418d24447257776ae, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1464315473
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -5,7 +5,15 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
public class GameOverMainMenuReturnerButtonScriptForLoadingTheMainMenuSceneOnceAPlayerHasDiedAndHasThenPressedTheMainMenuButtonOnTheGameOverScreen : MonoBehaviour
|
||||
{
|
||||
public void r() {
|
||||
SceneManager.LoadScene(0);
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
|
@ -13,15 +12,12 @@ public class GameManager : MonoBehaviour
|
|||
|
||||
private string penisSuriveTime = "";
|
||||
|
||||
public int Revives { get; private set; }
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
Revives = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -33,30 +29,12 @@ public class GameManager : MonoBehaviour
|
|||
{
|
||||
}
|
||||
|
||||
public void playerDied(GameObject who)
|
||||
public void playerDied(int who)
|
||||
{
|
||||
if (Revives == 0)
|
||||
SceneManager.LoadScene(3);
|
||||
else {
|
||||
Revives--;
|
||||
Collider2D[] d = Physics2D.OverlapCircleAll(who.transform.position, 5f);
|
||||
|
||||
foreach (Collider2D c in d) {
|
||||
if (c.gameObject.CompareTag("Enemy")) {
|
||||
c.gameObject.GetComponent<HealthComponent>().TakeDamage(9999999999);
|
||||
}
|
||||
Debug.Break();
|
||||
}
|
||||
|
||||
var g = who.GetComponent<HealthComponent>();
|
||||
// heal
|
||||
g.setMaxHealth(g.getMaxHealth(), true);
|
||||
|
||||
// REVIVE SOUND HERE
|
||||
}
|
||||
}
|
||||
|
||||
public void setTime(string t)
|
||||
{
|
||||
public void setTime(string t) {
|
||||
penisSuriveTime = t;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ public class PlayerMovement : MonoBehaviour
|
|||
|
||||
private bool right = false;
|
||||
|
||||
|
||||
[Header("Whipping")]
|
||||
[SerializeField]
|
||||
RopeWhipAttack whipAttack;
|
||||
|
@ -36,7 +37,6 @@ public class PlayerMovement : MonoBehaviour
|
|||
rb = GetComponent<Rigidbody2D>();
|
||||
playerInput = GetComponent<PlayerInput>();
|
||||
hp = GetComponent<HealthComponent>();
|
||||
attack = GetComponent<PlayerCollideAttack>();
|
||||
|
||||
if (gameObject.name == "Player2")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue