Remember to Like, Comment, and Subscribe

this has the dark finish level in it that can be used 👍
This commit is contained in:
Unknown
2022-02-27 00:07:10 -06:00
parent fbe576872e
commit dcc8607ae4
12 changed files with 2604 additions and 42 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ public class BeatDark : MonoBehaviour
}
}*/
void BeatLevel()
public void BeatLevel()
{
if (currentLevel == 3)
+33
View File
@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EndFukiTalk : EndTrigger
{
public GameObject TextBox;
// public GameObject HeadBox;
public List<string> pages;
public List<int> emotes;
public RuntimeAnimatorController controller;
public Sprite startSprite;
public AudioManager audioManager;
public bool isTalking;
GameObject instance;
// GameObject instance;
// GameObject headInstance;
void Instant()
{
instance = Instantiate(TextBox, TextBox.transform.position, Quaternion.identity);
instance.SetActive(true);
instance.GetComponent<EndLevelDialogue>().pages = pages;
instance.GetComponent<EndLevelDialogue>().emotes = emotes;
instance.GetComponent<EndLevelDialogue>().controller = controller;
instance.GetComponent<EndLevelDialogue>().audioManager = audioManager;
instance.GetComponent<EndLevelDialogue>().isOpen = true;
instance.GetComponent<EndLevelDialogue>().isTalking = isTalking;
}
public override void Action()
{
Instant();
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 267d33fb299532b46b496eb25fb08133
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+88
View File
@@ -0,0 +1,88 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//to implement inheritance
public abstract class EndTrigger : MonoBehaviour
{
//tags for the trigger
public bool forceInteract;
public bool repeatable;
bool isActive;
//only worry about this if it is not repeatable
bool hasOccurred;
public int value;
// Start is called before the first frame update
void Start()
{
hasOccurred = false;
}
//checks if player is in range of the trigger
private void OnTriggerStay2D(Collider2D other)
{
if (other.CompareTag("Player"))
{
//Debug.Log("entered");
isActive = true;
}
// else {
// isActive = false;
// Debug.Log("exit");
// if(forceInteract && repeatable) {
// hasOccurred = false;
// }
// }
}
private void OnTriggerExit2D(Collider2D other)
{
if (other.CompareTag("Player"))
{
isActive = false;
//Debug.Log("exit");
}
if (forceInteract && repeatable)
{
hasOccurred = false;
}
}
// Update is called once per frame
public void Update()
{
// Debug.Log("testr");
//checks if conditions are right
if (isActive && !hasOccurred)
{
//executes action upon entering
if (forceInteract)
{
Action();
hasOccurred = true;
if (!repeatable)
{
isActive = false;
}
}
//only executes action if input is pressed
else
{
if (Input.GetKeyDown(KeyCode.E))
{
Debug.Log("action");
Action();
if (!repeatable)
{
hasOccurred = true;
}
}
}
}
}
public abstract void Action();
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 48a2041fb27275a4c9c69601a098eea2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+1 -1
View File
@@ -12,7 +12,7 @@ public class MoveOnToNextAreaScript : Trigger
{
isTrigger = true;
box.isTrigger = true;
Debug.Log(isTrigger);
//Debug.Log(isTrigger);
}