Moved Some stuff around before the merge

I move stuff :)
This commit is contained in:
Unknown committed 2022-02-23 12:48:30 -06:00
1 parent 8486b14d17
commit ce568ed8e5
8 files changed
+70 -21

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ceiling_Trigger : MonoBehaviour
{
bool entered = false;
public GameObject cam;
public GameObject cat;
private int counter = 0;
private Vector3 moveCam = new Vector3(0, 10, 0);
private Vector3 moveCat = new Vector3(0, 3, 0);
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
counter++;
}
void OnTriggerEnter2D(Collider2D col)
{
if (!entered && counter >= 69)
{
entered = true;
//Debug.Log("Move Cam Right");
cam.transform.position += moveCam;
cat.transform.position += moveCat;
Debug.Log(counter);
counter = 0;
}
else if (counter >= 69 && entered)
{
//Debug.Log("Moved cam left");
Debug.Log(counter);
cam.transform.position -= moveCam;
//cat.transform.position -= moveCat;
entered = false;
counter = 0;
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5cf4f43ae0936c443a05276d3fd59404
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+30
View File
@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScriptRayHit : MonoBehaviour
{
public RaycastHit2D hit;
public Ray ray;
private int counter;
// Start is called before the first frame update
void Start()
{
counter = 0;
}
// Update is called once per frame
void Update()
{
hit = Physics2D.Raycast(transform.position, transform.TransformDirection(Vector2.right), 4f);
if (hit)
{
//Debug.Log(" Hit a wall "+ hit.collider.name);
//Debug.Log(counter);
}
counter++;
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1fd41423fac95444da8286db867308b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: