public void KillChicken(Recruitable recruitable) { recruitable.DidDie(); var follow = recruitable.GetComponent <VerletFollow>(); if (follow) { follow.enabled = false; } var v = recruitable.GetComponent <Verlet3D>(); if (v) { v.enabled = false; } if (featherExplosion) { Instantiate(featherExplosion, recruitable.transform.position, Quaternion.identity); } chickensFollowingYou.Remove(recruitable); }
public void AddFollowingChicken(Recruitable recruitable) { recruitable.GetComponent <Rigidbody>().isKinematic = false; chickensFollowingYou.Add(recruitable); }
void OnNir(Recruitable r) { ChickensSaved++; TotalPointsWon += r.GetComponent <ChickenProperties>().Points; Debug.Log("chickens: " + ChickensSaved + " points total:" + TotalPointsWon); }