コード例 #1
0
 // Token: 0x06001FD4 RID: 8148 RVA: 0x00184AA8 File Offset: 0x00182CA8
 private void OnTriggerEnter2D(Collider2D collision)
 {
     this.interactionIndicator.gameObject.SetActive(true);
     this.interactionIndicator.transform.position = this.interactionIndicatorStartingPos;
     this.interactionRange = true;
     InteractionMenu.SetAButton(InteractionMenu.AButtonText.KitchenMenu);
 }
コード例 #2
0
 // Token: 0x06001FBE RID: 8126 RVA: 0x00183C80 File Offset: 0x00181E80
 private void Update()
 {
     YandereController.rightButton = false;
     YandereController.leftButton  = false;
     if (Input.GetAxisRaw("Horizontal") > 0f || Input.GetKey("right") || Input.GetAxis("DpadX") > 0.5f)
     {
         if (!this.rightButtonPast)
         {
             this.rightButtonPast          = true;
             YandereController.rightButton = true;
         }
     }
     else if (Input.GetAxisRaw("Horizontal") < 0f || Input.GetKey("left") || Input.GetAxis("DpadX") < -0.5f)
     {
         if (!this.leftButtonPast)
         {
             this.leftButtonPast          = true;
             YandereController.leftButton = true;
         }
     }
     else
     {
         this.leftButtonPast  = false;
         this.rightButtonPast = false;
     }
     if (base.transform.position.x < this.leftBounds.position.x)
     {
         base.transform.position = new Vector3(this.leftBounds.position.x, base.transform.position.y, base.transform.position.z);
     }
     if (base.transform.position.x > this.rightBounds.position.x)
     {
         base.transform.position = new Vector3(this.rightBounds.position.x, base.transform.position.y, base.transform.position.z);
     }
     if (Input.GetButtonDown("A") && this.aiTarget != null)
     {
         if (this.aiTarget.state == AIController.AIState.Menu)
         {
             this.aiTarget.TakeOrder();
             InteractionMenu.SetAButton(InteractionMenu.AButtonText.None);
         }
         else if (this.aiTarget.state == AIController.AIState.Waiting && this.heldItem != null)
         {
             this.aiTarget.DeliverFood(this.heldItem);
             SFXController.PlaySound(SFXController.Sounds.Plate);
             InteractionMenu.SetAButton(InteractionMenu.AButtonText.None);
             this.DropTray();
         }
     }
     if (this.aiTarget != null)
     {
         this.interactionIndicator.gameObject.SetActive(true);
         this.interactionIndicator.position = new Vector3(this.aiTarget.transform.position.x, this.aiTarget.transform.position.y + 0.6f, this.aiTarget.transform.position.z);
         return;
     }
     this.interactionIndicator.gameObject.SetActive(false);
 }
コード例 #3
0
        // Token: 0x06001FC3 RID: 8131 RVA: 0x001840A8 File Offset: 0x001822A8
        private void OnTriggerExit2D(Collider2D collision)
        {
            AIController component = collision.GetComponent <AIController>();

            if (component != null && component == this.aiTarget)
            {
                this.aiTarget = null;
                InteractionMenu.SetAButton(InteractionMenu.AButtonText.None);
            }
        }
コード例 #4
0
        // Token: 0x06001FC2 RID: 8130 RVA: 0x00184050 File Offset: 0x00182250
        private void OnTriggerEnter2D(Collider2D collision)
        {
            AIController component = collision.GetComponent <AIController>();

            if (component != null)
            {
                if (component.state == AIController.AIState.Menu)
                {
                    this.aiTarget = component;
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.TakeOrder);
                }
                if (component.state == AIController.AIState.Waiting && this.heldItem != null)
                {
                    this.aiTarget = component;
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.GiveFood);
                }
            }
        }
コード例 #5
0
 private void Awake()
 {
     InteractionMenu.SetAButton(InteractionMenu.AButtonText.None);
     InteractionMenu.SetBButton(false);
     InteractionMenu.SetADButton(true);
 }
コード例 #6
0
        // Token: 0x06001FCF RID: 8143 RVA: 0x00184368 File Offset: 0x00182568
        private void Update()
        {
            switch (this.state)
            {
            case ServingCounter.KitchenState.None:
                if (this.isPaused)
                {
                    return;
                }
                if (this.interactionRange && Input.GetButtonDown("A"))
                {
                    this.state         = ServingCounter.KitchenState.SelectingInteraction;
                    this.selectedIndex = ((this.plates.Count == 0) ? 2 : 0);
                    this.kitchenModeHide.gameObject.SetActive(true);
                    this.SetMask(this.selectedIndex);
                    SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                    if (this.plates.Count == 0 && YandereController.Instance.heldItem == null)
                    {
                        this.interactionIndicator.transform.position = Chef.Instance.transform.position + Vector3.up * 0.8f;
                        InteractionMenu.SetAButton(InteractionMenu.AButtonText.PlaceOrder);
                        this.state = ServingCounter.KitchenState.Chef;
                        FoodMenu.Instance.gameObject.SetActive(true);
                    }
                    GameController.SetPause(true);
                    InteractionMenu.SetBButton(true);
                    return;
                }
                break;

            case ServingCounter.KitchenState.SelectingInteraction:
                switch (this.selectedIndex)
                {
                case 0:
                    this.interactionIndicator.transform.position = this.interactionIndicatorStartingPos;
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.ChoosePlate);
                    this.SetMask(this.selectedIndex);
                    if (Input.GetButtonDown("A"))
                    {
                        this.state         = ServingCounter.KitchenState.Plates;
                        this.selectedIndex = 0;
                        InteractionMenu.SetAButton(InteractionMenu.AButtonText.GrabPlate);
                        SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                    }
                    break;

                case 1:
                    this.interactionIndicator.transform.position = this.trash.transform.position + Vector3.up * 0.5f;
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.TossPlate);
                    this.SetMask(this.selectedIndex);
                    if (Input.GetButtonDown("A"))
                    {
                        this.state = ServingCounter.KitchenState.Trash;
                        SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                    }
                    break;

                case 2:
                    this.interactionIndicator.transform.position = Chef.Instance.transform.position + Vector3.up * 0.8f;
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.PlaceOrder);
                    this.SetMask(this.selectedIndex);
                    if (Input.GetButtonDown("A"))
                    {
                        this.state = ServingCounter.KitchenState.Chef;
                        InteractionMenu.SetAButton(InteractionMenu.AButtonText.PlaceOrder);
                        FoodMenu.Instance.gameObject.SetActive(true);
                        SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                    }
                    break;
                }
                if (Input.GetButtonDown("B"))
                {
                    InteractionMenu.SetBButton(false);
                    InteractionMenu.SetAButton(InteractionMenu.AButtonText.KitchenMenu);
                    this.state = ServingCounter.KitchenState.None;
                    GameController.SetPause(false);
                    this.kitchenModeHide.gameObject.SetActive(false);
                    this.interactionIndicator.transform.position = this.interactionIndicatorStartingPos;
                    SFXController.PlaySound(SFXController.Sounds.MenuBack);
                }
                if (YandereController.rightButton)
                {
                    this.selectedIndex = (this.selectedIndex + 1) % 3;
                    if (this.selectedIndex == 0 && this.plates.Count == 0)
                    {
                        this.selectedIndex = (this.selectedIndex + 1) % 3;
                    }
                    if (this.selectedIndex == 1 && YandereController.Instance.heldItem == null)
                    {
                        this.selectedIndex = (this.selectedIndex + 1) % 3;
                    }
                    SFXController.PlaySound(SFXController.Sounds.MenuSelect);
                }
                if (YandereController.leftButton)
                {
                    if (this.selectedIndex == 0)
                    {
                        this.selectedIndex = 2;
                    }
                    else
                    {
                        this.selectedIndex--;
                    }
                    if (this.selectedIndex == 1 && YandereController.Instance.heldItem == null)
                    {
                        this.selectedIndex--;
                    }
                    if (this.selectedIndex == 0 && this.plates.Count == 0)
                    {
                        this.selectedIndex = 2;
                    }
                    SFXController.PlaySound(SFXController.Sounds.MenuSelect);
                    return;
                }
                break;

            case ServingCounter.KitchenState.Plates:
                this.interactionIndicator.gameObject.SetActive(true);
                this.interactionIndicator.transform.position = this.plates[this.selectedIndex].transform.position + Vector3.up * 0.25f;
                this.SetMask(3);
                this.plateMask.transform.position = this.plates[this.selectedIndex].transform.position + Vector3.up * 0.05f;
                if (YandereController.rightButton)
                {
                    if (this.selectedIndex == 0)
                    {
                        this.selectedIndex = this.plates.Count - 1;
                    }
                    else
                    {
                        this.selectedIndex--;
                    }
                    SFXController.PlaySound(SFXController.Sounds.MenuSelect);
                }
                else if (YandereController.leftButton)
                {
                    this.selectedIndex = (this.selectedIndex + 1) % this.plates.Count;
                    SFXController.PlaySound(SFXController.Sounds.MenuSelect);
                }
                if (Input.GetButtonDown("A") && YandereController.Instance.heldItem == null)
                {
                    YandereController.Instance.PickUpTray(this.plates[this.selectedIndex].food);
                    this.RemovePlate(this.selectedIndex);
                    this.selectedIndex = 2;
                    this.state         = ServingCounter.KitchenState.SelectingInteraction;
                    SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                }
                if (Input.GetButtonDown("B"))
                {
                    this.state = ServingCounter.KitchenState.SelectingInteraction;
                    SFXController.PlaySound(SFXController.Sounds.MenuBack);
                    return;
                }
                break;

            case ServingCounter.KitchenState.Chef:
                if (Input.GetButtonDown("B"))
                {
                    this.state = ServingCounter.KitchenState.SelectingInteraction;
                    FoodMenu.Instance.gameObject.SetActive(false);
                    this.state = ServingCounter.KitchenState.SelectingInteraction;
                    SFXController.PlaySound(SFXController.Sounds.MenuBack);
                }
                if (Input.GetButtonDown("A"))
                {
                    this.state = ServingCounter.KitchenState.SelectingInteraction;
                    Chef.AddToQueue(FoodMenu.Instance.GetActiveFood());
                    FoodMenu.Instance.gameObject.SetActive(false);
                    SFXController.PlaySound(SFXController.Sounds.MenuOpen);
                    return;
                }
                break;

            case ServingCounter.KitchenState.Trash:
                YandereController.Instance.DropTray();
                this.state         = ServingCounter.KitchenState.SelectingInteraction;
                this.selectedIndex = 2;
                break;

            default:
                return;
            }
        }
コード例 #7
0
 // Token: 0x06001FD5 RID: 8149 RVA: 0x00184ADE File Offset: 0x00182CDE
 private void OnTriggerExit2D(Collider2D collision)
 {
     this.interactionIndicator.gameObject.SetActive(false);
     this.interactionRange = false;
     InteractionMenu.SetAButton(InteractionMenu.AButtonText.None);
 }