Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Darktrace/Assets/Computer/Images.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions Darktrace/Assets/Computer/Images/ProfilePicLogin.png.meta

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

8 changes: 8 additions & 0 deletions Darktrace/Assets/Computer/Scripts.meta

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

80 changes: 80 additions & 0 deletions Darktrace/Assets/Computer/Scripts/SystemLogin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;

public class SystemLogin : MonoBehaviour
{
[Header("Estrutura da Cena")]
[SerializeField] private GameObject loginPanel;
[SerializeField] private GameObject desktopPanel;

[Header("Configura��o de Senha")]
[SerializeField] private string passwordCorrect = "1234";
[SerializeField] private TMP_InputField passwordInput;
[SerializeField] private Button loginButton;
[SerializeField] private TextMeshProUGUI errorText;

[Header("�udio (Opcional)")]
[SerializeField] private AudioSource audioSource;
[SerializeField] private AudioClip errorClip;
[SerializeField] private AudioClip loginSuccessClip;

private void Start()
{
if (loginPanel != null) loginPanel.SetActive(true);
if (desktopPanel != null) desktopPanel.SetActive(false);

if (loginButton != null)
{
loginButton.onClick.AddListener(AttemptLogin);
}

if (passwordInput != null)
{
passwordInput.onSubmit.AddListener(delegate { AttemptLogin(); });
passwordInput.Select();
passwordInput.ActivateInputField();
}

if (errorText != null) errorText.text = "";
}

public void AttemptLogin()
{
if (passwordInput.text == passwordCorrect)
{
PerformLogin();
}
else
{
PerformError();
}
}

private void PerformLogin()
{
if (audioSource && loginSuccessClip) audioSource.PlayOneShot(loginSuccessClip);
Debug.Log("Login Aceito. Iniciando Desktop...");

if (loginPanel) loginPanel.SetActive(false);
if (desktopPanel) desktopPanel.SetActive(true);
}

private void PerformError()
{
if (audioSource && errorClip) audioSource.PlayOneShot(errorClip);
Debug.Log("Senha Incorreta");

if (passwordInput)
{
passwordInput.text = "";
passwordInput.Select();
passwordInput.ActivateInputField();
}

if (errorText != null)
{
errorText.text = "Senha incorreta.";
}
}
}
2 changes: 2 additions & 0 deletions Darktrace/Assets/Computer/Scripts/SystemLogin.cs.meta

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

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ MonoBehaviour:
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 2245842924852740096
type: {class: PostProcessData/ShaderResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
Expand Down Expand Up @@ -240,6 +242,9 @@ MonoBehaviour:
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: 5c81372d981403744adbdda4433c9c11, type: 3}
m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 80aa867ac363ac043847b06ad71604cd, type: 3}
m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3}
m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3}
m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3}
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
Expand All @@ -250,8 +255,6 @@ MonoBehaviour:
m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
m_CameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
m_StencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
m_ClusterDeferred: {fileID: 4800000, guid: 222cce62363a44a380c36bf03b392608, type: 3}
m_StencilDitherMaskSeedPS: {fileID: 4800000, guid: 8c3ee818f2efa514c889881ccb2e95a2, type: 3}
m_DBufferClear: {fileID: 4800000, guid: f056d8bd2a1c7e44e9729144b4c70395, type: 3}
- rid: 6852985685364965379
type: {class: UniversalRenderPipelineDebugShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
Expand Down
30 changes: 14 additions & 16 deletions Darktrace/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@
"url": "https://packages.unity.com"
},
"com.unity.collections": {
"version": "2.5.7",
"version": "2.5.1",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.19",
"com.unity.mathematics": "1.3.2",
"com.unity.test-framework": "1.4.6",
"com.unity.nuget.mono-cecil": "1.11.5",
"com.unity.burst": "1.8.17",
"com.unity.nuget.mono-cecil": "1.11.4",
"com.unity.test-framework": "1.4.5",
"com.unity.test-framework.performance": "3.0.3"
},
"url": "https://packages.unity.com"
Expand Down Expand Up @@ -88,18 +87,18 @@
}
},
"com.unity.nuget.mono-cecil": {
"version": "1.11.5",
"version": "1.11.4",
"depth": 3,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "17.2.0",
"version": "17.0.4",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.burst": "1.8.14",
"com.unity.burst": "1.8.20",
"com.unity.mathematics": "1.3.2",
"com.unity.ugui": "2.0.0",
"com.unity.collections": "2.4.3",
Expand All @@ -110,12 +109,12 @@
}
},
"com.unity.render-pipelines.universal": {
"version": "17.2.0",
"version": "17.0.4",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "17.2.0",
"com.unity.shadergraph": "17.2.0",
"com.unity.render-pipelines.core": "17.0.4",
"com.unity.shadergraph": "17.0.4",
"com.unity.render-pipelines.universal-config": "17.0.3"
}
},
Expand Down Expand Up @@ -145,11 +144,11 @@
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "17.2.0",
"version": "17.0.4",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "17.2.0",
"com.unity.render-pipelines.core": "17.0.4",
"com.unity.searcher": "4.9.3"
}
},
Expand Down Expand Up @@ -178,9 +177,9 @@
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages.unity.com"
Expand Down Expand Up @@ -352,8 +351,7 @@
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.hierarchycore": "1.0.0",
"com.unity.modules.physics": "1.0.0"
"com.unity.modules.hierarchycore": "1.0.0"
}
},
"com.unity.modules.umbra": {
Expand Down
4 changes: 2 additions & 2 deletions Darktrace/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 6000.2.5f1
m_EditorVersionWithRevision: 6000.2.5f1 (43d04cd1df69)
m_EditorVersion: 6000.0.57f1
m_EditorVersionWithRevision: 6000.0.57f1 (b7b9860b7bbd)
Loading