void OnUiEvent(object source, UiEventArgs args)
 {
     if (!craftingMenuOpened && args.MenuTypeLoaded.Equals(MenuType.Crafting) && args.Load)
     {
         craftingMenuOpened = true;
         // StartCoroutine(IntroductionToCraftingAndCustomers());
     }
 }
 private void OnCraftingMenuStatusChange(object source, UiEventArgs args)
 {
     craftingConversationBehavior.enabled = args.Load;
     try
     {
         craftingConversationBehavior.SetActiveConversation(CustomerOrderManager.GetActiveOrder());
     }
     catch (InvalidOperationException)
     {
         Debug.Log("No Active Orders!");
     }
 }
Example #3
0
    private void BroadcastUiEvent(bool load)
    {
        UiEventArgs eventToSend = new UiEventArgs {
            Load           = load,
            MenuTypeLoaded = MenuType,
            UiMenuName     = this.GetType().ToString()
        };

        if (UiEvent != null)
        {
            Debug.LogFormat("{0} a menu of type: " + MenuType, load ? "Loading": "Closing");
            UiEvent(this, eventToSend);
        }

        TailoredUiEvent.BroadcastEvent(this, eventToSend);

        Active = load;
    }
    private void OnUiEvent(object source, UiEventArgs args)
    {
        if (UIManager.MenuActive)
        {
            TryTakeControlOfCamera(args.UiMenuName);
        }
        else
        {
            basicCameraFollow.SetRotationToOriginal();
        }

        if (args.MenuTypeLoaded == MenuType.Crafting)
        {
            if (args.Load)
            {
                ChangeViewTo();
            }
        }
    }
Example #5
0
 private void OnUiEvent(object source, UiEventArgs args)
 {
     ActiveMenus.HandleInstanceObjectInList(args.MenuTypeLoaded, args.Load);
 }
Example #6
0
 public void onClick(object sender, UiEventArgs e)
 {
     DebugMessage = "Clicked";
     a.Start();
 }
Example #7
0
 public void onLeave(object sender, UiEventArgs e)
 {
     Texture = Assets.getColorTexture(game, Color.Blue);
 }
Example #8
0
 public void onHover(object sender, UiEventArgs e)
 {
     Texture = Assets.getColorTexture(game, Color.Yellow);
 }
 void OnUiEvent(object source, UiEventArgs args)
 {
     FreezePlayerMovementController(args.Load);
 }