Esempio n. 1
0
        public static void Notify(object sender, GameEventArgs e)
        {
            switch (e.type)
            {
            case BLOCK_INPUT:
                BlockInput?.Invoke(sender, e);
                break;

            case UNBLOCK_INPUT:
                UnblockInput?.Invoke(sender, e);
                break;

            case BLOCK_HUD:
                BlockHUD?.Invoke(sender, e);
                break;

            case UNBLOCK_HUD:
                UnblockHUD?.Invoke(sender, e);
                break;

            case HIDE_HUD:
                HideHUD?.Invoke(sender, e);
                break;

            case SHOW_HUD:
                ShowHUD?.Invoke(sender, e);
                break;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Use it for notify from EventTrigger Component. Requires to be component on GameObject!
        /// </summary>
        /// <param name="sender">The sender object.</param>
        /// <param name="e">Event arguments</param>
        public void Notify(string type)
        {
            switch (type)
            {
            case BLOCK_INPUT:
                BlockInput?.Invoke(null, new GameEventArgs(type));
                break;

            case UNBLOCK_INPUT:
                UnblockInput?.Invoke(null, new GameEventArgs(type));
                break;

            case BLOCK_HUD:
                BlockHUD?.Invoke(null, new GameEventArgs(type));
                break;

            case UNBLOCK_HUD:
                UnblockHUD?.Invoke(null, new GameEventArgs(type));
                break;

            case HIDE_HUD:
                HideHUD?.Invoke(null, new GameEventArgs(type));
                break;

            case SHOW_HUD:
                ShowHUD?.Invoke(null, new GameEventArgs(type));
                break;
            }
        }