Nearly finished.....
This commit is contained in:
13
Assets/Scripts/Player/OpenVoid.cs
Normal file
13
Assets/Scripts/Player/OpenVoid.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class OpenVoid : MonoBehaviour
|
||||
{
|
||||
private void Update()
|
||||
{
|
||||
if (UnlockSanctumState.Instance.VoidOpened)
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/OpenVoid.cs.meta
Normal file
11
Assets/Scripts/Player/OpenVoid.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac239a5b51bd7c84d8abe88686241cf1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Scripts/Player/TalkedToAirshipGuy.cs
Normal file
13
Assets/Scripts/Player/TalkedToAirshipGuy.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToAirshipGuy : MonoBehaviour
|
||||
{
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
UnlockSanctumState.Instance.TalkedToAirshipGuy = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/TalkedToAirshipGuy.cs.meta
Normal file
11
Assets/Scripts/Player/TalkedToAirshipGuy.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b68a11e9789f6344a053b00f7cc3dcc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Scripts/Player/TalkedToFrogLady.cs
Normal file
13
Assets/Scripts/Player/TalkedToFrogLady.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToFrogLady : MonoBehaviour
|
||||
{
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
UnlockSanctumState.Instance.TalkedToFrog = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/TalkedToFrogLady.cs.meta
Normal file
11
Assets/Scripts/Player/TalkedToFrogLady.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0be6aa3e5193f4f4e91e4b2707b8e1ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Scripts/Player/TalkedToIceGuy.cs
Normal file
13
Assets/Scripts/Player/TalkedToIceGuy.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToIceGuy : MonoBehaviour
|
||||
{
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
UnlockSanctumState.Instance.TalkedToIceGuy = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/TalkedToIceGuy.cs.meta
Normal file
11
Assets/Scripts/Player/TalkedToIceGuy.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26df9f81f16eb254dae2480172770084
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
Assets/Scripts/Player/TalkedToVoid.cs
Normal file
16
Assets/Scripts/Player/TalkedToVoid.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToVoid : MonoBehaviour
|
||||
{
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
UnlockSanctumState.Instance.VoidOpened = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/TalkedToVoid.cs.meta
Normal file
11
Assets/Scripts/Player/TalkedToVoid.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b45a63a9fe7ce264e9e339f4366a5651
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/Scripts/Player/UnlockSanctumState.cs
Normal file
32
Assets/Scripts/Player/UnlockSanctumState.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts
|
||||
{
|
||||
public class UnlockSanctumState : MonoBehaviour
|
||||
{
|
||||
public bool TalkedToFrog = false;
|
||||
public bool TalkedToIceGuy = false;
|
||||
public bool TalkedToAirshipGuy = false;
|
||||
public bool SanctumUnlocked = false;
|
||||
public bool VoidOpened = false;
|
||||
|
||||
public static UnlockSanctumState Instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
{
|
||||
Destroy(this);
|
||||
return;
|
||||
}
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (TalkedToFrog && TalkedToIceGuy && TalkedToAirshipGuy)
|
||||
SanctumUnlocked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/UnlockSanctumState.cs.meta
Normal file
11
Assets/Scripts/Player/UnlockSanctumState.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c388cea5ac5cb0241bc77335e96e4f59
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user