using System.Collections; using System.Collections.Generic; using UnityEngine; public class Porkamine1 : MonoBehaviour { // Start is called before the first frame update void Start() { } void OnCollisionEnter(Collision porge){ porge.collider.GetComponent().material.color=Color.blue; porge.collider.GetComponent().AddForce(0, 5, 0, ForceMode.Impulse); } // Update is called once per frame void Update() { } }