Esempio n. 1
0
 // 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>();
 }
Esempio n. 2
0
    // 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);
    }