mirror of
https://github.com/OMGeeky/GameDevGameJamV2.git
synced 2025-12-28 15:27:56 +01:00
21 lines
411 B
C#
21 lines
411 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
public class DissolveCollidersExceptPlayer : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter2D( Collider2D col )
|
|
{
|
|
if ( !col.TryGetComponent( out Character character ) )
|
|
return;
|
|
|
|
if ( character.isActivePlayer )
|
|
return;
|
|
|
|
character.DissolveSelf();
|
|
}
|
|
}
|