using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class StandardProjectileController : MonoBehaviour { private float speed; private Rigidbody2D rb; void Start() { rb = GetComponent(); rb.velocity = transform.right * speed ; } void Update() { } public void setSpeed( float speedIn) { speed = speedIn; } private void OnTriggerEnter2D(Collider2D col) { Destroy(col.gameObject); Destroy(gameObject); } }