void OnTriggerEnter2D(Collider2D other) { if(other.tag == "TravelPoint") { TBP_Script = other.GetComponent<TravelPointBehaviour>(); } }
// Use this for initialization void Start() { LM_Script = GameObject.Find("LevelManager").GetComponent<LevelManager>(); transform.position = startingPos.position; TBP_Script = startingPos.GetComponent<TravelPointBehaviour>(); shape_PS = GetComponent<ParticleSystem>(); }
public void NewTravelPoint(GameObject HitTravelPoint) { activeShape.GetComponent<Rigidbody2D>().velocity = Vector3.zero; SnapToTravelPoint(HitTravelPoint); TPB_Script = HitTravelPoint.GetComponent<TravelPointBehaviour>(); }
public void ChangeShape() { TPB_Script = activeShape.GetComponent<ShapeBehaviour>().GetTBD_Script(); activeShape.GetComponent<Rigidbody2D>().velocity = Vector3.zero; }