示例#1
0
    /// <summary>
    /// 设置意图
    /// </summary>
    /// <param name="workerIntent"></param>
    /// <param name="orderForCustomer"></param>
    /// <param name="npcAIRascal"></param>
    public void SetIntent(WorkerIntentEnum workerIntent, OrderForCustomer orderForCustomer, NpcAIRascalCpt npcAIRascal, OrderForHotel orderForHotel)
    {
        StopAllCoroutines();
        RemoveStatusIconByType(CharacterStatusIconEnum.Pro);
        this.workerIntent = workerIntent;
        switch (workerIntent)
        {
        case WorkerIntentEnum.Idle:
            SetIntentForIdle();
            break;

        case WorkerIntentEnum.Daze:
            SetIntentForDaze();
            break;

        case WorkerIntentEnum.Cook:
            SetIntentForCook(orderForCustomer);
            break;

        case WorkerIntentEnum.WaiterSend:
            SetIntentForWaiterSend(orderForCustomer);
            break;

        case WorkerIntentEnum.WaiterClean:
            SetIntentForWaiterCleanTable(orderForCustomer);
            break;

        case WorkerIntentEnum.WaiterBed:
            SetIntentForWaiterCleanBed(orderForHotel);
            break;

        case WorkerIntentEnum.Accounting:
            if (orderForCustomer != null)
            {
                SetIntentForAccounting(orderForCustomer);
            }
            else if (orderForHotel != null)
            {
                SetIntentForAccounting(orderForHotel);
            }
            break;

        case WorkerIntentEnum.AccostSolicit:
            SetIntentForAccostSolicit();
            break;

        case WorkerIntentEnum.AccostGuide:
            SetIntentForAccostGuide(orderForHotel);
            break;

        case WorkerIntentEnum.Beater:
            SetIntentForBeater(npcAIRascal);
            break;
        }
        NotifyAllObserver((int)WorkerNotifyEnum.StatusChange, (int)workerIntent);
    }
示例#2
0
 public void SetIntent(WorkerIntentEnum workerIntent, NpcAIRascalCpt npcAIRascal)
 {
     SetIntent(workerIntent, null, npcAIRascal);
 }
示例#3
0
 public void SetIntent(WorkerIntentEnum workerIntent, OrderForHotel orderForHotel)
 {
     SetIntent(workerIntent, null, null, orderForHotel);
 }
示例#4
0
 public void SetIntent(WorkerIntentEnum workerIntent, OrderForCustomer orderForCustomer)
 {
     SetIntent(workerIntent, orderForCustomer, null);
 }
示例#5
0
 public void SetIntent(WorkerIntentEnum workerIntent)
 {
     SetIntent(workerIntent, null, null);
 }
示例#6
0
 public void SetIntent(WorkerIntentEnum workerIntent, OrderForCustomer orderForCustomer, NpcAIRascalCpt npcAIRascal)
 {
     SetIntent(workerIntent, orderForCustomer, npcAIRascal, null);
 }