Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Win message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Fediuchin committed Feb 22, 2020
1 parent 059a1f3 commit 5ad906b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Assets/FarAlone/Prefabs/Items.meta

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

4 changes: 2 additions & 2 deletions Assets/FarAlone/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ LightmapSettings:
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
Expand Down Expand Up @@ -8530,7 +8530,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1051711319
Transform:
m_ObjectHideFlags: 0
Expand Down
3 changes: 3 additions & 0 deletions Assets/FarAlone/Scripts/Repairs/ShipVisualRepair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.Rendering.Universal;
using UnityEngine.SceneManagement;

namespace InjectorGames.FarAlone.Repairs
{
Expand All @@ -28,6 +29,8 @@ public override void OnRepair(float percent)
{
lightIntensity = 1f;
intensityDelay = float.PositiveInfinity;
PlayerPrefs.SetInt("IsDead", 2);
SceneManager.LoadScene(0);
}
else if(percent >= 0.25f)
{
Expand Down
7 changes: 7 additions & 0 deletions Assets/FarAlone/Scripts/UI/MenuWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.UI;

namespace InjectorGames.FarAlone.UI
{
Expand Down Expand Up @@ -36,6 +37,12 @@ private void Awake()
PlayerPrefs.SetInt("IsDead", 0);
deathWindow.SetActive(true);
}
else if (PlayerPrefs.GetInt("IsDead", 0) == 2)
{
PlayerPrefs.SetInt("IsDead", 0);
deathWindow.GetComponentInChildren<Text>().text = "YOU ARE NOT DEAD\n:)";
deathWindow.SetActive(true);
}
}

public void OnStart()
Expand Down

0 comments on commit 5ad906b

Please sign in to comment.