24 lines
491 B
C#
24 lines
491 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
// MIGHT NOT NEED THIS LOL
|
|
|
|
public class WaterBehavior : MonoBehaviour
|
|
{
|
|
public Rigidbody2D RB;
|
|
|
|
[SerializeField] private float bounceForce = 2;
|
|
|
|
void OnCollisionEnter2D(Collision2D col)
|
|
{
|
|
Bounce();
|
|
}
|
|
|
|
private void Bounce()
|
|
{
|
|
/*RB.velocity = new Vector2(RB.velocity.x, -(RB.velocity.y));
|
|
RB.AddForce(RB.velocity * bounceForce, ForceMode2D.Impulse);*/
|
|
}
|
|
}
|