mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-11-11 04:22:40 +00:00
Clouds and Book triggers
This commit is contained in:
1 parent
ea2a88b5ea
commit
38baefcf2d
70 files changed
+2302
-41
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10dee861b1d1e2549b75d0690524e587
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user