boing
This commit is contained in:
		@@ -2,6 +2,8 @@ using System.Collections;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
// MIGHT NOT NEED THIS LOL
 | 
			
		||||
 | 
			
		||||
public class WaterBehavior : MonoBehaviour
 | 
			
		||||
{
 | 
			
		||||
    public Rigidbody2D RB;
 | 
			
		||||
@@ -15,7 +17,7 @@ public class WaterBehavior : MonoBehaviour
 | 
			
		||||
 | 
			
		||||
    private void Bounce()
 | 
			
		||||
    {
 | 
			
		||||
        RB.velocity = new Vector2(RB.velocity.x, -(RB.velocity.y));
 | 
			
		||||
        RB.AddForce(RB.velocity * bounceForce, ForceMode2D.Impulse);
 | 
			
		||||
        /*RB.velocity = new Vector2(RB.velocity.x, -(RB.velocity.y));
 | 
			
		||||
        RB.AddForce(RB.velocity * bounceForce, ForceMode2D.Impulse);*/
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -222,6 +222,11 @@ public class PlayerBehavior : MonoBehaviour
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Bounce()
 | 
			
		||||
    {
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void OnTriggerEnter2D(Collider2D col)
 | 
			
		||||
    {
 | 
			
		||||
        if (col.tag == "grappleSurface")
 | 
			
		||||
@@ -243,6 +248,10 @@ public class PlayerBehavior : MonoBehaviour
 | 
			
		||||
            this.playerController.in_range = true;
 | 
			
		||||
            this.playerController.enemy = col.transform.parent.gameObject;
 | 
			
		||||
        }
 | 
			
		||||
        else if (col.tag == "bouncy")
 | 
			
		||||
        {
 | 
			
		||||
            Bounce();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void OnTriggerExit2D(Collider2D col)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user