Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class HitStomp : MonoBehaviour
- {
- public float bounce;
- public Rigidbody rb;
- void Start()
- {
- }
- // Update is called once per frame
- void Update()
- {
- }
- void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.tag == "WeakPoint")
- {
- Destroy(other.transform.parent.gameObject);
- rb.velocity = new Vector2(rb.velocity.x, bounce);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement