private void setRatValues(GameObject rat) { ratScript = rat.GetComponent <Rat_Movement_Logic>(); setRatDestinations(); ratScript.chooseNewTarget(); ratScript.DespawnPoint = despawnPoint; }
private void OnTriggerEnter(Collider other) { Rat_Movement_Logic ratMovementScript = other.gameObject.GetComponent <Rat_Movement_Logic>(); if (ratMovementScript != null) { ratMovementScript.DespawnRat(1000); } }
public void Start() { ResetRatHealth(); topHeadHealthBar.sizeDelta = new Vector2(health * 2, topHeadHealthBar.sizeDelta.y); ratMovementScript = GetComponent <Rat_Movement_Logic>(); }