Clouds and Book triggers

This commit is contained in:
Rizvee committed 2022-02-25 15:06:43 -06:00
1 parent ea2a88b5ea
commit 38baefcf2d
70 files changed
+2302 -41

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BookTrigger : Trigger
{
public GameObject levelSelect;
public override void Action()
{
levelSelect.SetActive(true);
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 10dee861b1d1e2549b75d0690524e587
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+3 -1
View File
@@ -46,7 +46,9 @@ public class PlayerMovement : MonoBehaviour {
if (Movement.pause) {
animator.SetFloat("Horizontal", 0);
} else if (animator != null) {
animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
if(controller.m_Grounded) {
animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
}
animator.SetBool("Airborne", !controller.m_Grounded);
}
}
+16 -7
View File
@@ -25,17 +25,26 @@ public abstract class Trigger : MonoBehaviour
Debug.Log("entered");
isActive = true;
}
}
private void OnTriggerExit2D(Collider2D other) {
if(other.CompareTag("Player")) {
else {
isActive = false;
Debug.Log("exit");
}
if(forceInteract && repeatable) {
hasOccurred = false;
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
void Update()
{