void AdoptBaby() { BabyController baby = GameMaster.instance.CreateBaby(); baby.transform.position = GlobalAdoptionCenter; baby.SetAttachment(gameObject, ClingArea); babyFruits.Add(baby); }
void Start() { strollerLocalOffset = stroller.transform.localPosition; strollerSpriteRenderer = stroller.GetComponent <SpriteRenderer> (); pregnipushSpriteRenderer = GetComponent <SpriteRenderer>(); baby = GameMaster.instance.CreateBaby(); baby.transform.position = transform.position; baby.SetAttachment(stroller, attachment); baby.DoNotRemove = true; }
public void PickupBaby(BabyController baby) { if (!isAlive) { return; } babies.Add(baby); baby.SetAttachment(gameObject, attachmentArea); baby.gameObject.layer = LayerMask.NameToLayer("Carried"); baby.DoNotRemove = true; }