ofb/Assets/Scripts/BounceBehavior.cs
allylikesfrogs 96acb9ba5f boing
2023-05-04 13:53:37 -07:00

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);*/
}
}