-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Better Update: Actual systems, FSM, assets, opening
- Loading branch information
Showing
730 changed files
with
510,022 additions
and
57,544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using HighlightPlus; | ||
using UnityEngine; | ||
|
||
public class ApproachLighthouse : MonoBehaviour | ||
{ | ||
public GameObject triggerObject; | ||
public string button; | ||
public Collider FOVCone; | ||
public GameObject doorsOpen; | ||
public GameObject doorsClosed; | ||
|
||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
triggerObject.GetComponent<HighlightEffect>().SetHighlighted(false); | ||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
if (MngrScript.Instance.getCurrentState() == "DisembarkedBoat") | ||
{ | ||
triggerObject.GetComponent<HighlightEffect>().SetHighlighted(true); | ||
} | ||
|
||
} | ||
|
||
bool isAxisButtonDown(string _button) | ||
{ | ||
print(Input.GetAxis(_button)); | ||
return Input.GetAxis(_button) != 0; | ||
} | ||
|
||
|
||
private void OnTriggerEnter(Collider other) | ||
{ | ||
MngrScript.Instance.SetPrompt("Press ["+button+"] to interact"); | ||
} | ||
|
||
private void OnTriggerExit(Collider other) | ||
{ | ||
MngrScript.Instance.SetPrompt(""); | ||
} | ||
|
||
private void OnTriggerStay(Collider other) | ||
{ | ||
|
||
|
||
// make sure the object has a collider | ||
// and that 'isTrigger' is True | ||
// Apply to ALL MESHES WITH A COLLIDER | ||
// it will not activaate if the other | ||
// colliders in the trigger are also triggers | ||
|
||
|
||
|
||
// if the object needs to freeze the game on interaction, add this: | ||
if (other==FOVCone && isAxisButtonDown(button)) | ||
{ | ||
print("lighthouse trigger"); | ||
triggerObject.GetComponent<HighlightEffect>().SetHighlighted(false); | ||
MngrScript.Instance.ApproachedLighthouse = true; | ||
|
||
Destroy(triggerObject); | ||
doorsClosed.SetActive(false); | ||
doorsOpen.SetActive(true); | ||
} | ||
|
||
|
||
|
||
//GameObject originalGameObject = GameObject.Find("FreezeObjects"); | ||
//GameObject child = originalGameObject.transform.GetChild(0).gameObject; | ||
|
||
//freezeInput[] childScripts = originalGameObject.GetComponentsInChildren<freezeInput>(); | ||
//gameObject.GetComponent<freezeInput>.Freeze(); | ||
//childScripts[0].Freeze(); | ||
|
||
|
||
//Destroy(triggerObject); | ||
|
||
//SceneManager.LoadScene("MainMenuScene"); | ||
//MngrScript.Instance.variable = true; | ||
//Instantiate(GameObject, new Vector3(-23, 41, 9), Quaternion.identity); | ||
|
||
|
||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using CMF; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class DisembarkBoat : MonoBehaviour | ||
{ | ||
public GameObject triggerObject; | ||
//public GameObject ApproachLighthouseTrigger; | ||
//public GameObject Cube; | ||
|
||
//public AdvancedWalkerController player; | ||
//public CameraController cameraController; | ||
//public Camera camera; | ||
//public Text promptText; | ||
|
||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
|
||
} | ||
|
||
private void OnTriggerEnter(Collider other) | ||
{ | ||
|
||
// make sure the object has a collider | ||
// and that 'isTrigger' is True | ||
// Apply to ALL MESHES WITH A COLLIDER | ||
|
||
//print("help"); | ||
MngrScript.Instance.DisembarkedBoat = true; | ||
//Instantiate(ApproachLighthouseTrigger, new Vector3(346.105f, 175.507f, 740.599f), Quaternion.identity); | ||
//Instantiate(Cube, new Vector3(244.4123f, 77.59f, 442.7618f), Quaternion.identity); | ||
|
||
|
||
Destroy(triggerObject); | ||
//Destroy(this); | ||
//SceneManager.LoadScene("MainMenuScene"); | ||
//MngrScript.Instance.variable = true; | ||
//Instantiate(GameObject, new Vector3(-23, 41, 9), Quaternion.identity); | ||
|
||
|
||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class FadeControl : MonoBehaviour | ||
{ | ||
|
||
public GameObject fadeEffect; | ||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
if (Input.GetKeyDown(KeyCode.Space)) | ||
{ | ||
fadeEffect.SetActive(true); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!1 &4340539383612703543 | ||
GameObject: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
serializedVersion: 6 | ||
m_Component: | ||
- component: {fileID: 4340539383612703542} | ||
- component: {fileID: 4340539383612703547} | ||
- component: {fileID: 4340539383612703544} | ||
- component: {fileID: 4340539383612703545} | ||
m_Layer: 5 | ||
m_Name: GDT-Canvas-Fade-Object | ||
m_TagString: Untagged | ||
m_Icon: {fileID: 0} | ||
m_NavMeshLayer: 0 | ||
m_StaticEditorFlags: 0 | ||
m_IsActive: 1 | ||
--- !u!224 &4340539383612703542 | ||
RectTransform: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 4340539383612703543} | ||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} | ||
m_LocalPosition: {x: 0, y: 0, z: 0} | ||
m_LocalScale: {x: 1, y: 1, z: 1} | ||
m_Children: [] | ||
m_Father: {fileID: 0} | ||
m_RootOrder: 0 | ||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
m_AnchorMin: {x: 0, y: 0} | ||
m_AnchorMax: {x: 1, y: 1} | ||
m_AnchoredPosition: {x: 0, y: 0} | ||
m_SizeDelta: {x: 0, y: 0} | ||
m_Pivot: {x: 0.5, y: 0.5} | ||
--- !u!222 &4340539383612703547 | ||
CanvasRenderer: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 4340539383612703543} | ||
m_CullTransparentMesh: 0 | ||
--- !u!114 &4340539383612703544 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 4340539383612703543} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} | ||
m_Name: | ||
m_EditorClassIdentifier: | ||
m_Material: {fileID: 0} | ||
m_Color: {r: 1, g: 1, b: 1, a: 0} | ||
m_RaycastTarget: 1 | ||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} | ||
m_Maskable: 1 | ||
m_OnCullStateChanged: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
m_Sprite: {fileID: 0} | ||
m_Type: 0 | ||
m_PreserveAspect: 0 | ||
m_FillCenter: 1 | ||
m_FillMethod: 4 | ||
m_FillAmount: 1 | ||
m_FillClockwise: 1 | ||
m_FillOrigin: 0 | ||
m_UseSpriteMesh: 0 | ||
m_PixelsPerUnitMultiplier: 1 | ||
--- !u!114 &4340539383612703545 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 4340539383612703543} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: e4f07b96075a94f4c897343a8aa477ed, type: 3} | ||
m_Name: | ||
m_EditorClassIdentifier: | ||
playOnAwake: 1 | ||
firstColor: {r: 0, g: 0, b: 0, a: 0} | ||
lastColor: {r: 0, g: 0, b: 0, a: 1} | ||
timeEffect: 1 | ||
initialDelay: 0 | ||
firstToLast: 1 | ||
pingPong: 0 | ||
pingPongDelay: 0 | ||
disableWhenFinish: 0 | ||
disableDelay: 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.