Example #1
0
    public void EndFullfillment()
    {
        Inventory.Money += NPC.DuePayment * Mathf.Clamp(NPC.ComfortLevel, 0, 2.0f);
        Debug.Log(NPC.DuePayment);
        Debug.Log(NPC.ComfortLevel);

        if (NPC.ComfortLevel < 1)
        {
            pool.AnnihilateNPC(NPC.ID);

            if (NPC.Satisfied)
            {
                Inventory.SatisfiedCustomers--;
                NPC.Satisfied = false;
            }
        }
        else
        {
            if (!NPC.Satisfied)
            {
                Inventory.SatisfiedCustomers++;
                NPC.Satisfied = true;
            }
        }

        pool.HideNPC(NPC);

        pool.UpdateNPC(NPC);
        NPC = null;
        EndedFullfillment.Invoke();
    }
Example #2
0
 /// <summary>
 /// Handles the end of dialog.
 /// </summary>
 /// <param name="npc">Npc.</param>
 /// <param name="isLeaving">Is leaving.</param>
 public void HandleEndOfDialog(ConversationOverData cod)
 {
     if (cod.isLeaving)
     {
         pool.AnnihilateNPC(cod.npc.ID);
         GenerateNextCustomer();
         ReadyToProceedEvent.Invoke(NextCustomer.ID);
     }
     else
     {
         StartFullfillment(cod.npc);
     }
 }