// Start is called before the first frame update void Start() { baby = GameObject.FindGameObjectWithTag("Baby"); babyHealth = baby.GetComponent <BabyHealthBar>(); babyPoo = baby.GetComponent <BabyPooBar>(); babyWeight = baby.GetComponent <BabyWeight>(); }
// Start is called before the first frame update void Start() { baby = GameObject.FindGameObjectWithTag("Baby"); babyHealth = baby.GetComponent <BabyHealthBar>(); babyPoo = baby.GetComponent <BabyPooBar>(); evanescent = lifetime > 0; var rb = GetComponent <Rigidbody>(); rb.AddForce(new Vector3(velX, 0, velZ) * rb.mass, ForceMode.Impulse); }