Fix revive and game over
This commit is contained in:
parent
175c7ca086
commit
916994f143
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cce5bb4f212e61847bff6ada16d93b59
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -900,7 +900,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1907822959
|
--- !u!224 &1907822959
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,7 +46,7 @@ public class InstantiateOverTime : MonoBehaviour
|
||||||
{
|
{
|
||||||
// i kknow very ismart!:)
|
// i kknow very ismart!:)
|
||||||
int radm = Random.Range(0, rng);
|
int radm = Random.Range(0, rng);
|
||||||
if (radm != 500) return;
|
if (radm != 0) return;
|
||||||
|
|
||||||
if (CanShootTime < Time.time) // We are allowed to shoot
|
if (CanShootTime < Time.time) // We are allowed to shoot
|
||||||
{
|
{
|
||||||
|
@ -110,4 +110,4 @@ public class InstantiateOverTime : MonoBehaviour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,11 @@ public class GameManager : MonoBehaviour
|
||||||
RumbleManager.StartRumble(0, 0.3f, 0.1f, 3f);
|
RumbleManager.StartRumble(0, 0.3f, 0.1f, 3f);
|
||||||
RumbleManager.StartRumble(1, 0.3f, 0.1f, 3f);
|
RumbleManager.StartRumble(1, 0.3f, 0.1f, 3f);
|
||||||
|
|
||||||
ReviveParticleSystem.transform.position = who.transform.position;
|
GameObject go = Instantiate(ReviveParticleSystem, who.transform.position, Quaternion.identity);
|
||||||
ReviveParticleSystem.GetComponent<ParticleSystem>().Play();
|
ParticleSystem ps = go.GetComponent<ParticleSystem>();
|
||||||
|
ps.Play();
|
||||||
|
|
||||||
|
go.AddComponent<DestroyAfter>().Init(5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,30 +23,34 @@ public class PauseMenu : MonoBehaviour
|
||||||
// if(Gamepad.all[i].selectButton)
|
// if(Gamepad.all[i].selectButton)
|
||||||
|
|
||||||
|
|
||||||
foreach (var controller in Gamepad.all)
|
|
||||||
|
if (isPaused)
|
||||||
{
|
{
|
||||||
if (controller.startButton.wasReleasedThisFrame)
|
foreach (var controller in Gamepad.all)
|
||||||
{
|
{
|
||||||
if (isPaused)
|
if (controller.startButton.wasReleasedThisFrame)
|
||||||
|
{
|
||||||
|
if (isPaused)
|
||||||
|
{
|
||||||
|
ResumeGame();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PauseGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (controller.crossButton.IsPressed())
|
||||||
{
|
{
|
||||||
ResumeGame();
|
ResumeGame();
|
||||||
}
|
}
|
||||||
else
|
if (controller.circleButton.IsPressed())
|
||||||
{
|
{
|
||||||
PauseGame();
|
QuitGame();
|
||||||
|
}
|
||||||
|
if (controller.squareButton.IsPressed())
|
||||||
|
{
|
||||||
|
MainMenu();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (controller.crossButton.IsPressed())
|
|
||||||
{
|
|
||||||
ResumeGame();
|
|
||||||
}
|
|
||||||
if (controller.circleButton.IsPressed())
|
|
||||||
{
|
|
||||||
QuitGame();
|
|
||||||
}
|
|
||||||
if (controller.squareButton.IsPressed())
|
|
||||||
{
|
|
||||||
MainMenu();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue