mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-10-11 18:19:11 +00:00
Merge remote-tracking branch 'origin/main' into beni
This commit is contained in:
14 files changed
+574
-46
No files matched your search
@@ -49,15 +49,19 @@ public class PlayerMovement : MonoBehaviour {
|
||||
|
||||
//if colliding with platform, move with platform
|
||||
void OnCollisionEnter2D (Collision2D other) {
|
||||
if (other.gameObject.tag == "Platform") {
|
||||
transform.parent = other.transform;
|
||||
}
|
||||
}
|
||||
void OnCollisionExit2D (Collision2D other) {
|
||||
if (other.gameObject.tag == "Platform") {
|
||||
transform.parent = null;
|
||||
}
|
||||
}
|
||||
if (other.gameObject.tag == "Platform") {
|
||||
transform.parent = other.transform;
|
||||
}
|
||||
// if(other.gameObject.tag == "Detection") {
|
||||
// Debug.Log("detect");
|
||||
// other.gameObject.GetComponent<MeanBird>().Detected(transform.position - other.gameObject.transform.position);
|
||||
// }
|
||||
}
|
||||
void OnCollisionExit2D (Collision2D other) {
|
||||
if (other.gameObject.tag == "Platform") {
|
||||
transform.parent = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ChangePos(double x, double y) {
|
||||
|
||||
Reference in new issue
Block a user