Exemple #1
0
    //turn off the alarm
    //if a player is sleeping in the pod, automatically wake player up
    protected override void Interact()
    {
        //make sure that a player is sleeping in the bed of the same pod
        Customer customer = bed.GetComponentInChildren <Customer>();

        if (!customer)
        {
            return;
        }

        UpdateCustomerSatisfaction(customer);

        if (!customer.GetComponent <Sleeping>())
        {
            return;
        }

        //transport player to corresponding bed node to wake player up
        bed.OnClick();
    }