Anti Softlock Mods an meinen Leveln

-> Neues DynamicWall Prefab, welches Frank durchlässt aber nichts anderes
This commit is contained in:
GungHolo
2023-06-29 12:36:16 +02:00
parent 0765e42f16
commit e605abcc30
16 changed files with 634 additions and 64 deletions

View File

@@ -19,7 +19,7 @@ public class DynamicRespawn : MonoBehaviour
void OnTriggerEnter2D(Collider2D col)
{
if(CompareTag("Player"))
if(col.CompareTag("Player"))
{
respawn.transform.SetPositionAndRotation(gameObject.transform.position ,Quaternion.identity);
}

View File

@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DynamicWall : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter2D(Collider2D col)
{
if(col.CompareTag("Player")){gameObject.GetComponent<EdgeCollider2D>().enabled = false;}
}
void OnTriggerExit2D(Collider2D col)
{
if(col.CompareTag("Player")){gameObject.GetComponent<EdgeCollider2D>().enabled = true;}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a19c0f63b67f716478af1eeff5f9c5da
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: